Skip to content

Commit 1021deb

Browse files
committed
OCPBUGS-32517: Ensure worker BMH's get unpaused
Use a kubeconfig that points to api-int and retry on failure.
1 parent 7078bae commit 1021deb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

data/data/bootstrap/baremetal/files/usr/local/bin/master-bmh-update.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -euo pipefail
44

5-
export KUBECONFIG=/opt/openshift/auth/kubeconfig-loopback
5+
export KUBECONFIG=/opt/openshift/auth/kubeconfig
66

77
# Wait till the baremetalhosts are populated
88
until oc get baremetalhosts -n openshift-machine-api; do
@@ -32,4 +32,7 @@ while systemctl is-active metal3-baremetal-operator.service; do
3232
done
3333

3434
echo "Unpause all baremetal hosts"
35-
oc annotate --overwrite -n openshift-machine-api baremetalhosts --all "baremetalhost.metal3.io/paused-"
35+
while ! oc annotate --overwrite -n openshift-machine-api baremetalhosts --all "baremetalhost.metal3.io/paused-" ; do
36+
sleep 5
37+
echo "Unpause failed, retrying"
38+
done

0 commit comments

Comments
 (0)