File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4141
4242# start_etcd3() - Starts to run the etcd process
4343function 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -813,6 +813,10 @@ if is_service_enabled neutron; then
813813 install_neutron_agent_packages
814814fi
815815
816+ if is_service_enabled etcd3; then
817+ install_etcd3
818+ fi
819+
816820# Check Out and Install Source
817821# ----------------------------
818822
You can’t perform that action at this time.
0 commit comments