From bed8d3b38c1148709866d442c880a19282d44308 Mon Sep 17 00:00:00 2001 From: Hongbin Lu Date: Mon, 17 Apr 2017 18:24:54 -0400 Subject: [PATCH] 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: I4d6806e300d23fa69757cc328f3a0d142ff7b425 --- devstack/plugin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 337f682..1e43d15 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -103,7 +103,7 @@ if is_service_enabled fuxi; then configure_fuxi # 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:$FUXI_ETCD_PORT --listen-client-urls http://0.0.0.0:$FUXI_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:$FUXI_ETCD_PORT --listen-client-urls http://0.0.0.0:$FUXI_ETCD_PORT" # FIXME(mestery): By default, Ubuntu ships with /bin/sh pointing to # the dash shell.