Bläddra i källkod

test/aws/scaleup: gather machineconfigpool/worker on failure

Russell Teague 5 år sedan
förälder
incheckning
5b32103f53
1 ändrade filer med 18 tillägg och 2 borttagningar
  1. 18 2
      test/aws/scaleup.yml

+ 18 - 2
test/aws/scaleup.yml

@@ -108,5 +108,21 @@
       state: absent
     with_items: "{{ pre_scaleup_machineset_names }}"
 
-  - name: Wait for worker configs to roll out
-    command: oc wait machineconfigpool/worker --for=condition=Updated --timeout=5m
+  - block:
+    - name: Wait for worker configs to roll out
+      command: >
+        oc wait machineconfigpool/worker
+        --kubeconfig={{ kubeconfig_path }}
+        --for=condition=Updated
+        --timeout=5m
+
+    rescue:
+    - name: DEBUG - Get worker machine config pool
+      command: >
+        oc get machineconfigpool/worker
+        --kubeconfig={{ kubeconfig_path }}
+        --output=json
+
+    - name: DEBUG - Worker config rollout failed
+      fail:
+        msg: "Worker config rollout failed"