Commit 3013859
committed
ci-operator/templates/openshift/installer/cluster-launch-installer-upi-e2e: Gather on bootstrap failure
Currently UPI bootstrap failures die with [1]:
time="2019-08-13T20:38:56Z" level=debug msg="Still waiting for the Kubernetes API: the server could not find the requested resource"
time="2019-08-13T20:39:12Z" level=info msg="Use the following commands to gather logs from the cluster"
time="2019-08-13T20:39:12Z" level=info msg="openshift-install gather bootstrap --help"
time="2019-08-13T20:39:12Z" level=fatal msg="waiting for Kubernetes API: context deadline exceeded"
but don't actually gather those recommended logs [2]. With this
commit, I've added a setup-script global GATHER_BOOTSTRAP_ARGS which
the various per-platform flows can populate as they create resources.
Then if the wait-for-bootstrap command dies and that variable is
non-empty, we run the gather to store the logs in the installer's
artifact directory.
We can't use:
--master ${CONTROL_PLANE_0_IP},${CONTROL_PLANE_1_IP},${CONTROL_PLANE_2_IP}
because the backing installer code [3] uses StringArrayVar [4], which
does not perform StringSliceVar's [5] comma-splitting.
The GATHER_BOOTSTRAP_ARGS approach is a bit of a cludge, because the
expansion in gather-bootstrap-and-fail is not quoted; relying instead
on a lack of shell-sensitive characters in the IP arguments. That's
likely fine in practice, but if we wanted to tighten it down we could
switch the script from sh to Bash and use an array variable. For now;
I'm punting that to future work.
There's also crufy Terraform business around this in the teardown
container, which I've left alone for now.
[1]: https://storage.googleapis.com/origin-ci-test/pr-logs/pull/openshift_release/4719/rehearse-4719-pull-ci-openshift-installer-master-e2e-aws-proxy/5/artifacts/e2e-aws-proxy/installer/.openshift_install.log
[2]: https://gcsweb-ci.svc.ci.openshift.org/gcs/origin-ci-test/pr-logs/pull/openshift_release/4719/rehearse-4719-pull-ci-openshift-installer-master-e2e-aws-proxy/5/artifacts/e2e-aws-proxy/installer/
[3]: https://github.com/openshift/installer/blob/8f972b45987a32cc91bc61c39a727e9a1224693d/cmd/openshift-install/gather.go#L71
[4]: https://godoc.org/github.com/spf13/pflag#FlagSet.StringArrayVar
[5]: https://godoc.org/github.com/spf13/pflag#FlagSet.StringSliceVar1 parent be9e978 commit 3013859
File tree
1 file changed
+14
-1
lines changed- ci-operator/templates/openshift/installer
1 file changed
+14
-1
lines changedLines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
| 343 | + | |
| 344 | + | |
343 | 345 | | |
344 | 346 | | |
345 | 347 | | |
| |||
363 | 365 | | |
364 | 366 | | |
365 | 367 | | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
366 | 377 | | |
367 | 378 | | |
368 | 379 | | |
| |||
591 | 602 | | |
592 | 603 | | |
593 | 604 | | |
| 605 | + | |
594 | 606 | | |
595 | 607 | | |
596 | 608 | | |
| |||
622 | 634 | | |
623 | 635 | | |
624 | 636 | | |
| 637 | + | |
625 | 638 | | |
626 | 639 | | |
627 | 640 | | |
| |||
708 | 721 | | |
709 | 722 | | |
710 | 723 | | |
711 | | - | |
| 724 | + | |
712 | 725 | | |
713 | 726 | | |
714 | 727 | | |
| |||
0 commit comments