Bug 1828947 - show users actual error when API fails to come up
Summary: show users actual error when API fails to come up
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.5
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.5.0
Assignee: Abhinav Dahiya
QA Contact: jima
Depends On:
Blocks: 1828948
TreeView+ depends on / blocked
Reported: 2020-04-28 16:03 UTC by Abhinav Dahiya
Modified: 2020-07-13 17:32 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1828948 (view as bug list)
Last Closed: 2020-07-13 17:32:22 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift installer pull 3518 0 None closed Bug 1828947: cmd/openshift-install/create.go: return lastErr when waiting API fails 2021-01-20 07:35:04 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:32:40 UTC

Description Abhinav Dahiya 2020-04-28 16:03:15 UTC
Description of problem:

previously all the errors were context Deadline exceeded, with this change the error returned is the last tracked error.

This is useful as the user has more information about what the failure could be.

For example, BZ https://bugzilla.redhat.com/show_bug.cgi?id=1810318#c8
the `.openshift_install.log` had the following debug log.
time="2020-03-04T21:08:13Z" level=debug msg="Still waiting for the Kubernetes API: Get https://api.openshift10.az.test-am-cloudpak.io:6443/version?timeout=32s: dial tcp: lookup api.openshift10.az.test-am-cloudpak.io on no such host"
but the error returned to the use was
FATAL Bootstrap failed to complete: waiting for Kubernetes API: context deadline exceeded

returning the last tracked error would help users as they don't have to look into log file for most errors.

Version-Release number of the following components:
rpm -q openshift-ansible
rpm -q ansible
ansible --version

How reproducible:

Steps to Reproduce:

Actual results:
Please include the entire output from the last TASK line through the end of output if an error is generated

Expected results:

Additional info:
Please attach logs from ansible-playbook with the -vvv flag

Comment 3 jima 2020-05-07 07:34:09 UTC
The issue has been verified on nightly build: 4.5.0-0.nightly-2020-05-07-033157.
During cluster installation, after lb server is powered on, shutdown it and let installation failed.
The console output print the last error instead of "context deadline exceeded"
https://mastern-jenkins-csb-openshift-qe.cloud.paas.psi.redhat.com/job/Launch Environment Flexy/91931/console

On previous load, we can see "context deadline exceeded" when haproxy service is not started on lb server.
https://mastern-jenkins-csb-openshift-qe.cloud.paas.psi.redhat.com/job/Launch Environment Flexy/91131/console

Comment 4 errata-xmlrpc 2020-07-13 17:32:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.