Skip to content

Commit 57bbe6a

Browse files
authored
[#3935] use fully qualified name for machinesets (#3936)
fixes #3935 With shortname only it is failing on OCP 4.21 nightly ``` $ oc get machineset -n openshift-machine-api No resources found in openshift-machine-api namespace. $ oc get machineset.machine.openshift.io -n openshift-machine-api NAME DESIRED CURRENT READY AVAILABLE AGE msimka-1194-qmbmc-worker-0 4 4 4 4 4h10m $ oc get machineset.v1beta1.machine.openshift.io -n openshift-machine-api NAME DESIRED CURRENT READY AVAILABLE AGE msimka-1194-qmbmc-worker-0 4 4 4 4 4h10m ```
1 parent 63b8519 commit 57bbe6a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

hack/lib/scaleup.bash

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function scale_up_workers {
2222
# (us-east-1e). Please retry your request by not specifying an Availability Zone
2323
# or choosing us-east-1a, us-east-1b, us-east-1c, us-east-1d, us-east-1f."
2424
ignored_zone="us-east-1e"
25-
az_total="$(oc get machineset -n openshift-machine-api -oname | grep -cv "$ignored_zone")"
25+
az_total="$(oc get machineset.machine.openshift.io -n openshift-machine-api -oname | grep -cv "$ignored_zone")"
2626

2727
logger.debug "ready machine count: ${current_total}, number of available zones: ${az_total}"
2828

@@ -32,7 +32,7 @@ function scale_up_workers {
3232
fi
3333

3434
idx=0
35-
for mset in $(oc get machineset -n openshift-machine-api -o name | grep -v "$ignored_zone"); do
35+
for mset in $(oc get machineset.machine.openshift.io -n openshift-machine-api -o name | grep -v "$ignored_zone"); do
3636
replicas=$(( SCALE_UP / az_total ))
3737
if [ ${idx} -lt $(( SCALE_UP % az_total )) ];then
3838
(( replicas++ )) || true
@@ -88,7 +88,7 @@ function use_spot_instances {
8888
return
8989
fi
9090

91-
if [[ $(oc get machineset -n openshift-machine-api -ojsonpath='{.items[*].spec.template.spec.providerSpec.value.spotMarketOptions}') != "" ]]; then
91+
if [[ $(oc get machineset.machine.openshift.io -n openshift-machine-api -ojsonpath='{.items[*].spec.template.spec.providerSpec.value.spotMarketOptions}') != "" ]]; then
9292
logger.info "Spot instances already configured."
9393
return
9494
fi
@@ -101,7 +101,7 @@ function use_spot_instances {
101101
local available
102102
available=$(oc get machineconfigpool worker -o jsonpath='{.status.readyMachineCount}')
103103

104-
for mset in $(oc get machineset -n openshift-machine-api -oname); do
104+
for mset in $(oc get machineset.machine.openshift.io -n openshift-machine-api -oname); do
105105
oc get "${mset}" -n openshift-machine-api -ojson > "$mset_file"
106106
oc delete "${mset}" -n openshift-machine-api
107107
jq ".spec.template.spec.providerSpec.value.spotMarketOptions |= {}" "$mset_file" | oc create -f -

0 commit comments

Comments
 (0)