Skip to content

Commit 362d0de

Browse files
Merge pull request #1037 from danpawlik/add-slow-etcd-profile
Add set_slower_etcd_profile rule to Makefile
2 parents 6557938 + e0132da commit 362d0de

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2759,3 +2759,11 @@ redis_deploy_cleanup: namespace ## cleans up the service instance, Does not affe
27592759
$(eval $(call vars,$@,infra))
27602760
oc kustomize ${OUT}/${NAMESPACE}/infra-redis/cr | oc delete --ignore-not-found=true -f -
27612761
${CLEANUP_DIR_CMD} ${OPERATOR_BASE_DIR}/infra-operator-redis ${OUT}/${NAMESPACE}/infra-redis/cr
2762+
2763+
## etcd
2764+
.PHONY: set_slower_etcd_profile
2765+
set_slower_etcd_profile: ## that is a helper for the CI jobs, where OpenShift API is restarting because etcd crashed earlier.
2766+
oc patch etcd/cluster --type=merge -p '{ "spec": { "controlPlaneHardwareSpeed": "Slower" }}'
2767+
# need to wait until the etcd pod would apply new rules
2768+
sleep 60
2769+
timeout $(TIMEOUT) bash -c "while ! (timeout 5 oc get pods -n openshift-etcd -o jsonpath='{.items[*].status.phase}' | grep -qE '^Running'); do sleep 10; done"

0 commit comments

Comments
 (0)