Skip to content

Commit

Permalink
ci-operator/templates/openshift/installer/cluster-launch-installer-e2…
Browse files Browse the repository at this point in the history
…e: Gather console logs from Machine providerID too

To help debug cases like [1,2]:

  spec:
    ...
    providerID: aws:///us-east-1b/i-078909486b3234e41
    ...
  status:
    ...
    phase: Provisioned
    ...

where the machine seems to have come up (per AWS), but not requested
an Ignition config from the machine-config server [3], and therefore
not joined the cluster as a node.

[1]: https://bugzilla.redhat.com/show_bug.cgi?id=1796147#c1
[2]: https://storage.googleapis.com/origin-ci-test/logs/release-openshift-origin-installer-e2e-aws-upgrade/15825/artifacts/e2e-aws-upgrade/must-gather/registry-svc-ci-openshift-org-ocp-4-4-2020-01-29-015253-sha256-dd03a9e0ac7b6e710037d8f0d0a5001b47c27bf859e49b0256e8ac54f5bd8198/namespaces/openshift-machine-api/machine.openshift.io/machines/ci-op-i8jwk853-77109-rh9g6-worker-us-east-1b-g9sm8.yaml
[3]: https://bugzilla.redhat.com/show_bug.cgi?id=1796147#c3
  • Loading branch information
wking committed Jan 29, 2020
1 parent 772faca commit a469f53
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,7 @@ objects:
oc --insecure-skip-tls-verify --request-timeout=5s get nodes -o jsonpath --template '{range .items[*]}{.metadata.name}{"\n"}{end}' > /tmp/nodes
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
oc --insecure-skip-tls-verify --request-timeout=5s -n openshift-machine-api get machines -o jsonpath --template '{range .items[*]}{.spec.providerID}{"\n"}{end}' | sed 's|.*/||' >> /tmp/node-provider-IDs
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
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
Expand Down Expand Up @@ -892,7 +893,7 @@ objects:
if [[ "${CLUSTER_TYPE}" = "aws" ]]; then
queue /tmp/artifacts/nodes/$i/console aws ec2 get-console-output --instance-id "${i}" --output text
fi
done < /tmp/node-provider-IDs
done < <(sort /tmp/node-provider-IDs | uniq)
FILTER=gzip queue /tmp/artifacts/nodes/masters-journal.gz oc --insecure-skip-tls-verify adm node-logs --role=master --unify=false
FILTER=gzip queue /tmp/artifacts/nodes/workers-journal.gz oc --insecure-skip-tls-verify adm node-logs --role=worker --unify=false
Expand Down

0 comments on commit a469f53

Please sign in to comment.