-
Bug
-
Resolution: Done
-
Major
-
DO280 - OCP 4.2 1 20200123
-
None
-
ILT, ROLE, VT
-
en-US (English)
URL:
Reporter RHNID:
Section: -
Language: en-US (English)
Workaround: Patch the lab script with the provided fix below.
Description: The scale-automatic script assumes there are two availability zones in AWS, which is not true for some regions (and/or deployment scenarios).
Consequently, it scales the first MachineSet it finds to 1 instance, shrinking the number of available worker nodes to just one.
Here's a patch for lab-scale-automatic:
--- lab-scale-automatic-orig 2020-03-12 14:31:43.180000000 +0000 +++ lab-scale-automatic 2020-03-12 14:27:13.354000000 +0000 @@ -62,15 +62,19 @@ ocp4_cleanup_lab_files ocp4_delete_project "${this}" - # Scale worker nodes down to 1 for each machine set where the replica count is greater than 1 + # Scale worker nodes down for each machine set where the replica count is increased + TARGET_COUNT=1 + if [ $(oc get machinesets -n openshift-machine-api -o name | wc -l) -lt 2 ]; then + TARGET_COUNT=2 + fi for MACHINE in $(oc get machinesets -n openshift-machine-api -o name) do # Check if replica count is greater than 1 replica_count="$(oc get ${MACHINE} -n openshift-machine-api -o jsonpath='{.spec.replicas}')" - if [ ${replica_count} -gt 1 ] + if [ ${replica_count} -gt ${TARGET_COUNT} ] then - pad2 "Scaling '${MACHINE}' to 1 replica" - if oc scale --replicas 1 ${MACHINE} -n openshift-machine-api + pad2 "Scaling '${MACHINE}' to ${TARGET_COUNT} replica(s)" + if oc scale --replicas ${TARGET_COUNT} ${MACHINE} -n openshift-machine-api then print_SUCCESS else
That should fix it.