Drop use of USE_SYSTEMD var in devstack plugin

The USE_SYSTEMD variable is to be dropped from devstack[0], as running
with systemd is the only option now. Drop it's usage in our plugin.

[0] https://review.opendev.org/703734

Change-Id: I79085c247f64cf52ad7d4ee66a775607491faa2f
This commit is contained in:
Dr. Jens Harbott 2020-01-27 14:40:38 +00:00
parent 0388766386
commit c04754769b
2 changed files with 5 additions and 50 deletions

View File

@ -785,16 +785,7 @@ function run_openshift_master {
wait_for "etcd" "http://${SERVICE_HOST}:${ETCD_PORT}/v2/machines"
if [[ "$USE_SYSTEMD" = "True" ]]; then
# If systemd is being used, proceed as normal
run_process openshift-master "$cmd" root root
else
# If screen is being used, there is a possibility that the devstack
# environment is on a stable branch. Older versions of run_process have
# a different signature. Sudo is used as a workaround that works in
# both older and newer versions of devstack.
run_process openshift-master "sudo $cmd"
fi
run_process openshift-master "$cmd" root root
}
# make_admin_cluster_admin
@ -866,16 +857,7 @@ function run_openshift_node {
sudo ln -fs "${CNI_BIN_DIR}" /opt/cni/bin
if [[ "$USE_SYSTEMD" = "True" ]]; then
# If systemd is being used, proceed as normal
run_process openshift-node "$command" root root
else
# If screen is being used, there is a possibility that the devstack
# environment is on a stable branch. Older versions of run_process have
# a different signature. Sudo is used as a workaround that works in
# both older and newer versions of devstack.
run_process openshift-node "sudo $command"
fi
run_process openshift-node "$command" root root
}
# lb_state
@ -1186,16 +1168,7 @@ EOF
dnsmasq_binary="$(command -v dnsmasq)"
cmd="${dnsmasq_binary} -k -C ${openshift_dnsmasq_conf_path}"
if [[ "$USE_SYSTEMD" = "True" ]]; then
# If systemd is being used, proceed as normal
run_process openshift-dnsmasq "$cmd" root root
else
# If screen is being used, there is a possibility that the devstack
# environment is on a stable branch. Older versions of run_process have
# a different signature. Sudo is used as a workaround that works in
# both older and newer versions of devstack.
run_process openshift-dnsmasq "sudo $cmd"
fi
run_process openshift-dnsmasq "$cmd" root root
sudo cp /etc/resolv.conf /etc/resolv.conf.orig
search_domains=$(awk '/search/ {for (i=2; i<NF; i++) printf $i " "; print $NF}' /etc/resolv.conf.orig)
@ -1222,16 +1195,7 @@ function run_openshift_dns {
--config=${OPENSHIFT_DATA_DIR}/node/node-config.yaml \
--kubeconfig=${OPENSHIFT_DATA_DIR}/node/node.kubeconfig"
if [[ "$USE_SYSTEMD" = "True" ]]; then
# If systemd is being used, proceed as normal
run_process openshift-dns "$command" root root
else
# If screen is being used, there is a possibility that the devstack
# environment is on a stable branch. Older versions of run_process have
# a different signature. Sudo is used as a workaround that works in
# both older and newer versions of devstack.
run_process openshift-dns "sudo $command"
fi
run_process openshift-dns "$command" root root
}
# cleanup_kuryr_devstack_iptables

View File

@ -799,16 +799,7 @@ function run_k8s_kubelet {
fi
wait_for "Kubernetes API Server" "$KURYR_K8S_API_URL"
if [[ "$USE_SYSTEMD" = "True" ]]; then
# If systemd is being used, proceed as normal
run_process kubelet "$command" root root
else
# If screen is being used, there is a possibility that the devstack
# environment is on a stable branch. Older versions of run_process have
# a different signature. Sudo is used as a workaround that works in
# both older and newer versions of devstack.
run_process kubelet "sudo $command"
fi
run_process kubelet "$command" root root
}
function run_coredns {