Skip to content

Commit e0132da

Browse files
committed
Add set_slower_etcd_profile rule to Makefile
The 'set_slower_etcd_profile' rule adjusts the etcd profile to 'Slower' . That would be mostly used in CI jobs to mitigate instability (e.g. OpenShift API restarts because etcd crashed earlier) or sometimes caused by slow disks (noisy neighbors or old hardware), to which etcd is highly sensitive. Signed-off-by: Daniel Pawlik <[email protected]>
1 parent 3ab4f51 commit e0132da

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)