Avoid running more than one etcd process

If both Fuxi and Kuryr-libnetwork are enabled in devstack, the script
will fail since etcd-server was spawned twice. This commit added a
check for existing etcd process and spawn one if not existed.

Closes-Bug: #1683852
Change-Id: Iecef71df1c0b58db62c20462932ba179c91a1695
This commit is contained in:
Hongbin Lu 2017-04-17 18:22:18 -04:00
parent 1f0d06c9f7
commit 5c45b19273
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ if is_service_enabled kuryr-libnetwork; then
configure_kuryr "${DISTRO_DISTUTILS_DATA_PATH}"
# Run etcd first
run_process etcd-server "$DEST/etcd/etcd-$ETCD_VERSION-linux-amd64/etcd --data-dir $DEST/etcd/db.etcd --advertise-client-urls http://0.0.0.0:$KURYR_ETCD_PORT --listen-client-urls http://0.0.0.0:$KURYR_ETCD_PORT"
pgrep -x "etcd" >/dev/null || run_process etcd-server "$DEST/etcd/etcd-$ETCD_VERSION-linux-amd64/etcd --data-dir $DEST/etcd/db.etcd --advertise-client-urls http://0.0.0.0:$KURYR_ETCD_PORT --listen-client-urls http://0.0.0.0:$KURYR_ETCD_PORT"
# FIXME(mestery): By default, Ubuntu ships with /bin/sh pointing to
# the dash shell.