make USE_SCREEN=False imply USE_SYSTEMD=True
In order to start making the transition in the gate make USE_SCREEN=False also mean USE_SYSTEMD=True. We'll never actually declare USE_SYSTEMD=True in the gate (as that doesn't exist for stable branches), but this will let us roll over the existing transition. We also have to install systemd-python 234 because we are recording exception info in the journal, and all versions before that had a bug in processing that. Remove the somewhat pointless screen following journalctl commands. We really don't want or need those, and they tend to build up over time. Depends-On: I24513f5cbac2c34cf0130bf812ff2df6ad76657c Change-Id: I6af6d1857effaf662a9d72bd394864934eacbe70
This commit is contained in:
parent
2eb322ab2e
commit
c006bbdeb2
@ -17,6 +17,7 @@ libjpeg-dev # Pillow 3.0.0
|
||||
libmysqlclient-dev # MySQL-python
|
||||
libpq-dev # psycopg2
|
||||
libssl-dev # for pyOpenSSL
|
||||
libsystemd-dev # for systemd-python
|
||||
libxml2-dev # lxml
|
||||
libxslt1-dev # lxml
|
||||
libyaml-dev
|
||||
@ -26,10 +27,8 @@ openssl
|
||||
pkg-config
|
||||
psmisc
|
||||
python2.7
|
||||
python3-systemd
|
||||
python-dev
|
||||
python-gdbm # needed for testr
|
||||
python-systemd
|
||||
screen
|
||||
tar
|
||||
tcpdump
|
||||
|
@ -29,7 +29,7 @@ pyOpenSSL # version in pip uses too much memory
|
||||
python-devel
|
||||
redhat-rpm-config # missing dep for gcc hardening flags, see rhbz#1217376
|
||||
screen
|
||||
systemd-python
|
||||
systemd-devel # for systemd-python
|
||||
tar
|
||||
tcpdump
|
||||
unzip
|
||||
|
@ -1495,22 +1495,6 @@ function _run_under_systemd {
|
||||
|
||||
$SYSTEMCTL enable $systemd_service
|
||||
$SYSTEMCTL start $systemd_service
|
||||
_journal_log $service $systemd_service
|
||||
}
|
||||
|
||||
function _journal_log {
|
||||
local service=$1
|
||||
local unit=$2
|
||||
local logfile="${service}.log.${CURRENT_LOG_TIME}"
|
||||
local real_logfile="${LOGDIR}/${logfile}"
|
||||
if [[ -n ${LOGDIR} ]]; then
|
||||
$JOURNALCTL_F $2 > "$real_logfile" &
|
||||
bash -c "cd '$LOGDIR' && ln -sf '$logfile' ${service}.log"
|
||||
if [[ -n ${SCREEN_LOGDIR} ]]; then
|
||||
# Drop the backward-compat symlink
|
||||
ln -sf "$real_logfile" ${SCREEN_LOGDIR}/screen-${service}.log
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Helper to remove the ``*.failure`` files under ``$SERVICE_DIR/$SCREEN_NAME``.
|
||||
@ -1700,8 +1684,10 @@ function stop_process {
|
||||
# Only do this for units which appear enabled, this also
|
||||
# catches units that don't really exist for cases like
|
||||
# keystone without a failure.
|
||||
$SYSTEMCTL stop devstack@$service.service
|
||||
$SYSTEMCTL disable devstack@$service.service
|
||||
if $SYSTEMCTL is-enabled devstack@$service.service; then
|
||||
$SYSTEMCTL stop devstack@$service.service
|
||||
$SYSTEMCTL disable devstack@$service.service
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -r $SERVICE_DIR/$SCREEN_NAME/$service.pid ]]; then
|
||||
|
3
stack.sh
3
stack.sh
@ -746,6 +746,9 @@ fi
|
||||
# Do the ugly hacks for broken packages and distros
|
||||
source $TOP_DIR/tools/fixup_stuff.sh
|
||||
|
||||
if [[ "$USE_SYSTEMD" == "True" ]]; then
|
||||
pip_install_gr systemd-python
|
||||
fi
|
||||
|
||||
# Virtual Environment
|
||||
# -------------------
|
||||
|
9
stackrc
9
stackrc
@ -157,6 +157,15 @@ elif [[ -f $RC_DIR/.localrc.auto ]]; then
|
||||
source $RC_DIR/.localrc.auto
|
||||
fi
|
||||
|
||||
# if we are forcing off USE_SCREEN (as we do in the gate), force on
|
||||
# systemd. This allows us to drop one of 3 paths through the code.
|
||||
if [[ "$USE_SCREEN" == "False" ]]; then
|
||||
# Remove in Pike: this gets us through grenade upgrade
|
||||
if [[ "$GRENADE_PHASE" != "target" ]]; then
|
||||
USE_SYSTEMD="True"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Default for log coloring is based on interactive-or-not.
|
||||
# Baseline assumption is that non-interactive invocations are for CI,
|
||||
# where logs are to be presented as browsable text files; hence color
|
||||
|
Loading…
x
Reference in New Issue
Block a user