Add SYSTEMD_ENV_VARS dictionary
This will allow to pass env variables from zuul job definitions to to systemd service files via the local conf. The first use case of this is to pass OS_NOVA_DISABLE_EVENTLET_PATCHING=true to nova services that already supports running in native threading mode instead of with Eventlet. During the Eventlet removal effort this will allow us to have separate jobs testing the same service in different concurrency mode. Change-Id: I675043e42006286bb7e1190ea9462fb8d8daa38c
This commit is contained in:
@@ -43,6 +43,9 @@ declare -A -g GITREPO
|
||||
declare -A -g GITBRANCH
|
||||
declare -A -g GITDIR
|
||||
|
||||
# Systemd service file environment variables per service
|
||||
declare -A -g SYSTEMD_ENV_VARS
|
||||
|
||||
KILL_PATH="$(which kill)"
|
||||
|
||||
# Save these variables to .stackenv
|
||||
@@ -1642,6 +1645,9 @@ function _run_under_systemd {
|
||||
user=$STACK_USER
|
||||
fi
|
||||
local env_vars="$5"
|
||||
if [[ -v SYSTEMD_ENV_VARS[$service] ]]; then
|
||||
env_vars="${SYSTEMD_ENV_VARS[$service]} $env_vars"
|
||||
fi
|
||||
if [[ "$command" =~ "uwsgi" ]] ; then
|
||||
if [[ "$GLOBAL_VENV" == "True" ]] ; then
|
||||
cmd="$cmd --venv $DEVSTACK_VENV"
|
||||
|
Reference in New Issue
Block a user