Skip to content

Commit 3603bf5

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "rework etcd3 install to be like other devstack services"
2 parents 805304f + 62b5660 commit 3603bf5

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

lib/etcd3

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,6 @@ fi
4141

4242
# start_etcd3() - Starts to run the etcd process
4343
function start_etcd3 {
44-
# Don't install in sub nodes (multinode scenario)
45-
if [ "$SERVICE_HOST" != "$HOST_IP" ]; then
46-
return
47-
fi
48-
49-
_install_etcd
50-
5144
local cmd="$ETCD_BIN_DIR/etcd"
5245
cmd+=" --name $HOSTNAME --data-dir $ETCD_DATA_DIR"
5346
cmd+=" --initial-cluster-state new --initial-cluster-token etcd-cluster-01"
@@ -96,7 +89,7 @@ function cleanup_etcd3 {
9689
sudo rm -rf $ETCD_DATA_DIR
9790
}
9891

99-
function _install_etcd {
92+
function install_etcd3 {
10093
echo "Installing etcd"
10194

10295
# Make sure etcd3 downloads the correct architecture
@@ -115,10 +108,6 @@ function _install_etcd {
115108

116109
ETCD_NAME=etcd-$ETCD_VERSION-linux-$ETCD_ARCH
117110

118-
# Install the libraries needed. Note: tooz for example does not have a hard dependency on these libraries
119-
pip_install etcd3
120-
pip_install etcd3gw
121-
122111
# Create the necessary directories
123112
sudo mkdir -p $ETCD_BIN_DIR
124113
sudo mkdir -p $ETCD_DATA_DIR

lib/oslo

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,14 @@ function install_oslo {
109109
_do_install_oslo_lib "stevedore"
110110
_do_install_oslo_lib "taskflow"
111111
_do_install_oslo_lib "tooz"
112+
# installation of additional libraries
113+
#
114+
# os-traits for nova
112115
_do_install_oslo_lib "os-traits"
116+
117+
# etcd (because tooz does not have a hard dependency on these)
118+
pip_install etcd3
119+
pip_install etcd3gw
113120
}
114121

115122
# Restore xtrace

stack.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,10 @@ if is_service_enabled neutron; then
813813
install_neutron_agent_packages
814814
fi
815815

816+
if is_service_enabled etcd3; then
817+
install_etcd3
818+
fi
819+
816820
# Check Out and Install Source
817821
# ----------------------------
818822

0 commit comments

Comments
 (0)