Skip to content

Commit 18ab37b

Browse files
committed
Workaround random issues in nmstate-handler setup
In Downstream we randomly hitting issues where nmstate-handler setup fails due to missing scc rule in 'nmstate-handler' cluster role. The scc rule creation is conditional[1], and if openshift-apiserver is not running or is being re created the condition evaluates to false and then nmstate-handler setup just stucks. In order to workaround this adding a wait condition for api server pod. [1] nmstate/kubernetes-nmstate#1113 Related-Issue: OSPCIX-554
1 parent 4d9c05b commit 18ab37b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2320,6 +2320,7 @@ else
23202320
oc apply -f ${OPERATOR_DIR}
23212321
timeout ${TIMEOUT} bash -c "while ! (oc get deployments/nmstate-operator -n ${NAMESPACE}); do sleep 10; done"
23222322
oc wait deployments/nmstate-operator -n ${NAMESPACE} --for condition=Available --timeout=${TIMEOUT}
2323+
timeout ${TIMEOUT} bash -c "while ! (oc wait pod -n openshift-apiserver -l apiserver=true --for condition=Ready); do sleep 10; done"
23232324
oc apply -f ${DEPLOY_DIR}
23242325
timeout ${TIMEOUT} bash -c "while ! (oc get pod --no-headers=true -l component=kubernetes-nmstate-handler -n ${NAMESPACE}| grep nmstate-handler); do sleep 10; done"
23252326
oc wait pod -n ${NAMESPACE} -l component=kubernetes-nmstate-handler --for condition=Ready --timeout=$(TIMEOUT)

0 commit comments

Comments
 (0)