You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo"$(date -u --rfc-3339=seconds) - INFO: Filtering zones by the exclusion pattern '${ZONES_EXCLUSION_PATTERN}'"
22
25
mapfile -t AVAILABILITY_ZONES <<(gcloud compute zones list --filter="region:${GCP_REGION} AND status:UP" --format='value(name)'| grep -v "${ZONES_EXCLUSION_PATTERN}"| shuf)
@@ -26,14 +29,15 @@ function get_zones_from_region() {
26
29
27
30
echo"$(date -u --rfc-3339=seconds) - INFO: Take the first ${ZONES_COUNT} zones"
if [[ ${#ZONES_ARRAY1[@]}-eq 0 ]] && [[ -n"${ZONES_EXCLUSION_PATTERN}" ]];then
171
+
echo"$(date -u --rfc-3339=seconds) - INFO: Found no zone for machine type '${MACHINE_TYPE1}', possibly a custom machine type. Filtering among all zones instead..."
172
+
get_zones_from_region ZONES_ARRAY1
173
+
fi
174
+
echo"$(date -u --rfc-3339=seconds) - INFO: As a temporary workaround of https://redhat.atlassian.net/browse/OCPBUGS-78431, ensure the zones of compute & controlPlane machines are the same"
echo"$(date -u --rfc-3339=seconds) - INFO: CONTROL_PLANE_ZONES unspecified, getting the candidate zones by control-plane machine type '${MACHINE_TYPE2}'"
if [[ ${#ZONES_ARRAY2[@]}-eq 0 ]] && [[ -n"${ZONES_EXCLUSION_PATTERN}" ]];then
183
+
echo"$(date -u --rfc-3339=seconds) - INFO: Found no zone for machine type '${MACHINE_TYPE2}', possibly a custom machine type. Filtering among all zones instead..."
184
+
get_zones_from_region ZONES_ARRAY2
103
185
fi
186
+
echo"$(date -u --rfc-3339=seconds) - INFO: As a temporary workaround of https://redhat.atlassian.net/browse/OCPBUGS-78431, ensure the zones of compute & controlPlane machines are the same"
if [[ -z"${ZONES_STR}" ]] && [[ -n"${ZONES_EXCLUSION_PATTERN}" ]];then
107
-
echo"$(date -u --rfc-3339=seconds) - INFO: Found no zone for machine type '${MACHINE_TYPE}', possibly a custom machine type. Filtering among all zones instead..."
108
-
get_zones_from_region
189
+
190
+
if [[ -n"${COMPUTE_ZONES}" ]];then
191
+
echo"$(date -u --rfc-3339=seconds) - INFO: COMPUTE_ZONES specified, '${COMPUTE_ZONES}', using it for compute/worker machines"
echo"$(date -u --rfc-3339=seconds) - INFO: Skipped setting zones for compute"
122
208
fi
123
209
124
-
ZONES_STR=""
125
-
MACHINE_TYPE=""
126
210
if [[ -n"${CONTROL_PLANE_ZONES}" ]];then
127
-
ZONES_STR="${CONTROL_PLANE_ZONES}"
128
-
elif [[ -n"${CONTROL_PLANE_NODE_TYPE}" ]];then
129
-
MACHINE_TYPE="${CONTROL_PLANE_NODE_TYPE}"
130
-
elif [[ -n"${ZONES_EXCLUSION_PATTERN}" ]];then
131
-
echo"$(date -u --rfc-3339=seconds) - INFO: Extracting control-plane node type from install-config"
132
-
MACHINE_TYPE=$(yq-go r "${CONFIG}" controlPlane.platform.gcp.type)
133
-
if [[ -z"${MACHINE_TYPE}" ]];then
134
-
MACHINE_TYPE=$(yq-go r "${CONFIG}" platform.gcp.defaultMachinePlatform.type)
135
-
fi
136
-
fi
137
-
get_zones_by_machine_type "${MACHINE_TYPE}"
138
-
if [[ -z"${ZONES_STR}" ]] && [[ -n"${ZONES_EXCLUSION_PATTERN}" ]];then
139
-
echo"$(date -u --rfc-3339=seconds) - INFO: Found no zone for machine type '${MACHINE_TYPE}', possibly a custom machine type. Filtering among all zones instead..."
140
-
get_zones_from_region
211
+
echo"$(date -u --rfc-3339=seconds) - INFO: CONTROL_PLANE_ZONES specified, '${CONTROL_PLANE_ZONES}', using it for control-plane machines"
0 commit comments