Bug 1848885 - OCPRHV-205: Exit installation once we receive 404 when trying to contact engine
Summary: OCPRHV-205: Exit installation once we receive 404 when trying to contact engine
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.6
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 4.6.0
Assignee: Douglas Schilling Landgraf
QA Contact: Guilherme Santos
URL: https://issues.redhat.com/browse/OCPR...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-19 07:33 UTC by Jan Zmeskal
Modified: 2020-10-27 16:08 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 16:08:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift installer pull 3874 0 None closed Bug 1848885: check if 404 returned before ask users questions 2020-10-22 06:46:11 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:08:29 UTC

Description Jan Zmeskal 2020-06-19 07:33:20 UTC
Description of problem:
We can recieve 404 in two cases that come to mind:
1. The RHV engine is down and does not serve the expected endpoint
2. User provided wrong FQDN
In both cases, there's no point in prompting the user for credentials again as we can never get to success this way.

Version-Release number of the following components:
openshift-install-linux-4.6.0-0.nightly-2020-06-19-020835

How reproducible:
100 %

Steps to Reproduce:
1. Run openshift-install create install-config
2. Provide a FQDN that can be resolved but does not serve /ovirt-engine/api endpoint
3. Provide valid credentials

Actual results:

[root@ocp-qe-1 primary]# ./openshift-install create install-config
? SSH Public Key /root/.ssh/id_rsa.pub
? Platform ovirt
? Engine FQDN[:PORT] google.com
? Engine username 123456
? Engine password ******
X Sorry, your reply was invalid: failed to connect to Engine platform Failed to parse non-array sso with response <!DOCTYPE html>
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
  <title>Error 404 (Not Found)!!1</title>
  <style>
X Sorry, your reply was invalid: failed to connect to Engine platform Failed to parse non-array sso with response <!DOCTYPE html>
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
  <title>Error 404 (Not Found)!!1</title>
  <style>
X Sorry, your reply was invalid: failed to connect to Engine platform Failed to parse non-array sso with response <!DOCTYPE html>
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
  <title>Error 404 (Not Found)!!1</title>
  <style>
X Sorry, your reply was invalid: failed to connect to Engine platform Failed to parse non-array sso with response <!DOCTYPE html>
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
  <title>Error 404 (Not Found)!!1</title>
  <style>
    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
  </style>
  <a href=//www.google.com/><span id=logo aria-label=Google></span></a>
  <p><b>404.</b> <ins>That’s an error.</ins>
  <p>The requested URL <code>/ovirt-engine/sso/oauth/token</code> was not found on this server.  <ins>That’s all we know.</ins>

? Engine password


Expected results:
When we receive 404, we should give up right away and inform user that the provided FQDN cannot be contacted at /ovirt-engine/api

Comment 1 Douglas Schilling Landgraf 2020-07-09 12:05:10 UTC
due to capacity constraints we will be revisiting this bug in the upcoming sprint

Comment 4 Guilherme Santos 2020-07-23 13:54:40 UTC
Verified on:
4.6.0-0.nightly-2020-07-22-074636

Steps:
# openshift-install create cluster --log-level=debug --dir=resources
? SSH Public Key /root/.ssh/id_rsa.pub
? Platform ovirt
? Engine FQDN[:PORT] redhat.com

Results:
installation canceled with:
FATAL failed to fetch Metadata: failed to fetch dependency of "Metadata": failed to fetch dependency of "Cluster ID": failed to fetch dependency of "Install Config": failed to fetch dependency of "Base Domain": failed to generate asset "Platform": https://redhat.com/ovirt-engine/services/pki-resource?resource=ca-certificate&format=X509-PEM-CA: http response 404

Comment 6 errata-xmlrpc 2020-10-27 16:08:08 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 (OpenShift Container Platform 4.6 GA Images), and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHBA-2020:4196


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