@@ -711,6 +711,10 @@ objects:
711
711
value : /etc/openshift-installer/gce.json
712
712
- name : KUBECONFIG
713
713
value : /tmp/artifacts/installer/auth/kubeconfig
714
+ - name : USER
715
+ value : test
716
+ - name : HOME
717
+ value : /tmp
714
718
command :
715
719
- /bin/bash
716
720
- -c
@@ -778,6 +782,7 @@ objects:
778
782
fi
779
783
780
784
oc --insecure-skip-tls-verify --request-timeout=5s get nodes -o jsonpath --template '{range .items[*]}{.metadata.name}{"\n"}{end}' > /tmp/nodes
785
+ oc --insecure-skip-tls-verify --request-timeout=5s get nodes -o jsonpath --template '{range .items[*]}{.spec.providerID}{"\n"}{end}' | sed 's|.*/||' > /tmp/node-provider-IDs
781
786
oc --insecure-skip-tls-verify --request-timeout=5s get pods --all-namespaces --template '{{ range .items }}{{ $name := .metadata.name }}{{ $ns := .metadata.namespace }}{{ range .spec.containers }}-n {{ $ns }} {{ $name }} -c {{ .name }}{{ "\n" }}{{ end }}{{ range .spec.initContainers }}-n {{ $ns }} {{ $name }} -c {{ .name }}{{ "\n" }}{{ end }}{{ end }}' > /tmp/containers
782
787
oc --insecure-skip-tls-verify --request-timeout=5s get pods -l openshift.io/component=api --all-namespaces --template '{{ range .items }}-n {{ .metadata.namespace }} {{ .metadata.name }}{{ "\n" }}{{ end }}' > /tmp/pods-api
783
788
@@ -818,6 +823,21 @@ objects:
818
823
queue /tmp/artifacts/nodes/$i/heap oc --insecure-skip-tls-verify get --request-timeout=20s --raw /api/v1/nodes/$i/proxy/debug/pprof/heap
819
824
done < /tmp/nodes
820
825
826
+ if [[ "${CLUSTER_TYPE}" = "aws" ]]; then
827
+ # FIXME: get epel-release or otherwise add awscli to our teardown image
828
+ export PATH="${HOME}/.local/bin:${PATH}"
829
+ easy_install --user pip # our Python 2.7.5 is even too old for ensurepip
830
+ pip install --user awscli
831
+ export AWS_REGION="$(python -c 'import json; data = json.load(open("/tmp/artifacts/installer/metadata.json")); print(data["aws"]["region"])')"
832
+ fi
833
+
834
+ while IFS= read -r i; do
835
+ mkdir -p "/tmp/artifacts/nodes/${i}"
836
+ if [[ "${CLUSTER_TYPE}" = "aws" ]]; then
837
+ queue /tmp/artifacts/nodes/$i/console aws ec2 get-console-output --instance-id "${i}"
838
+ fi
839
+ done < /tmp/node-provider-IDs
840
+
821
841
FILTER=gzip queue /tmp/artifacts/nodes/masters-journal.gz oc --insecure-skip-tls-verify adm node-logs --role=master --unify=false
822
842
FILTER=gzip queue /tmp/artifacts/nodes/workers-journal.gz oc --insecure-skip-tls-verify adm node-logs --role=worker --unify=false
823
843
0 commit comments