Skip to content

Commit b5343f7

Browse files
Merge pull request #1050 from abays/cix_797_workaround
[OSPCIX-797] Workaround to stabilize Openstack init for 18.0 jobs
2 parents c4c962f + 7788edb commit b5343f7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,12 @@ openstack_wait: ## waits openstack CSV to succeed.
755755
openstack_init: openstack_wait
756756
bash -c 'test -f ${OPERATOR_BASE_DIR}/openstack-operator/config/samples/operator_v1beta1_openstack.yaml || make openstack_repo'
757757
oc apply -f ${OPERATOR_BASE_DIR}/openstack-operator/config/samples/operator_v1beta1_openstack.yaml
758+
# FIXME: Ugly hack to prevent OpenStack Baremetal operator from crashing when BMO is not installed
759+
if ! echo "${BMO_CRDS}" | grep -q "baremetalhosts.metal3.io"; then \
760+
curl -o /tmp/bmh_crd.yaml --retry-all-errors --retry 5 --retry-delay 10 https://raw.githubusercontent.com/metal3-io/baremetal-operator/refs/heads/main/config/base/crds/bases/metal3.io_baremetalhosts.yaml; \
761+
oc apply -f /tmp/bmh_crd.yaml; \
762+
rm -f /tmp/bmh_crd.yaml; \
763+
fi
758764
oc wait openstack/openstack -n ${OPERATOR_NAMESPACE} --for condition=Ready --timeout=${TIMEOUT}
759765
timeout ${TIMEOUT} bash -c "while ! (oc get services -n ${OPERATOR_NAMESPACE} | grep -E '^(openstack|openstack-baremetal|infra)-operator-webhook-service' | wc -l | grep -q -e 3); do sleep 5; done"
760766

0 commit comments

Comments
 (0)