Browse Source

test/aws: use machinesets.machine.openshift.io kind

Vadim Rutkovsky 6 years ago
parent
commit
c627cab31b
2 changed files with 11 additions and 3 deletions
  1. 10 2
      test/aws/get_machinesets.yml
  2. 1 1
      test/aws/scaleup.yml

+ 10 - 2
test/aws/get_machinesets.yml

@@ -1,5 +1,5 @@
 ---
-- name: List existing workers
+- name: List existing worker nodes
   oc_obj:
     kubeconfig: "{{ kubeconfig_path }}"
     state: list
@@ -27,11 +27,19 @@
 - name: get existing worker machinesets
   oc_obj:
     state: list
-    kind: machinesets
+    kind: machinesets.machine.openshift.io
     namespace: openshift-cluster-api
     selector: ""
     kubeconfig: "{{ kubeconfig_path }}"
   register: machineset
+  until:
+  - machineset.results is defined
+  - machineset.results.returncode is defined
+  - machineset.results.results is defined
+  - machineset.results.returncode == 0
+  - machineset.results.results[0]['items'] | length > 0
+  retries: 36
+  delay: 5
 
 - set_fact:
     pre_scaleup_machineset_names: "{{ machineset.results.results[0]['items'] |map(attribute='metadata.name') | list }}"

+ 1 - 1
test/aws/scaleup.yml

@@ -121,7 +121,7 @@
   - name: remove existing machinesets
     oc_obj:
       state: absent
-      kind: machinesets
+      kind: machinesets.machine.openshift.io
       namespace: openshift-cluster-api
       name: "{{ item }}"
       kubeconfig: "{{ kubeconfig_path }}"