multi-cell enable/disable compute scheduling

The current way of select compute for enabling/disbling
scheduling depends on the name of the node. This
means that compute-0 and cell1-compute-0 are
picked when the task "Disable scheduling on compute-0"
is executed.

The patch aims to do the grep from the beginning so
the cell1-compute-0 is not picked when compute-0 is
going to be disabled/enabled

Change-Id: I5527e2853ae4baadc808c6a2817197709b21c24a
This commit is contained in:
Juan Badia Payno 2023-07-27 10:48:40 +02:00 committed by Lukas Bezdicka
parent 4ebd1d38a8
commit 867ef36d74
2 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@
shell: |
set -o pipefail
source {{ overcloud_rc }}
HOST="$(openstack compute service list -f value -c Host | grep {{ host }})"
HOST="$(openstack compute service list -f value -c Host | grep '^{{ host }}\.')"
openstack compute service set --disable --disable-reason FFWD "$HOST" nova-compute
# TODO: FIXME: PART OF THT?
@ -74,7 +74,7 @@
shell: |
set -o pipefail
source {{ overcloud_rc }}
HOST="$(openstack compute service list -f value -c Host | grep {{ host }})"
HOST="$(openstack compute service list -f value -c Host | grep '^{{ host }}\.')"
openstack compute service set --enable "$HOST" nova-compute
######## overcloud upgrade run ########

View File

@ -28,7 +28,7 @@ host_quiesced() {
source {{ overcloud_rc }}
## Get exact hostname
HOST=$(openstack compute service list -f value -c Host | grep {{ node_name | regex_replace(',', '\\|') }})
HOST="$(openstack compute service list -f value -c Host | grep ^{{ node_name | regex_replace(',', '\.\\|') }}\.)"
if [ "$HOST" = "" ]; then
echo "No compute hosts are in: {{ node_name }}"