Bug 1838649 - OCPRHV-118: RFE: installer should avoid ask users oVirt API URL
Summary: OCPRHV-118: RFE: installer should avoid ask users oVirt API URL
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: unspecified
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.6.0
Assignee: Douglas Schilling Landgraf
QA Contact: Guilherme Santos
URL:
Whiteboard:
Depends On: OCPRHV-176 1850723
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-21 13:45 UTC by Douglas Schilling Landgraf
Modified: 2020-10-27 16:00 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 16:00:22 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift installer pull 3637 0 None closed oVirt: general improvements 2020-10-31 19:12:22 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:00:42 UTC

Description Douglas Schilling Landgraf 2020-05-21 13:45:38 UTC
Description of problem:

The API URL is static, based on the user FQDN. Instead of asking users for API UR, we should ask FQDN.


How reproducible:

$ ./bin/openshift-install create cluster --log-level=debug

<snip>
? oVirt API endpoint URL [? for help] 

Expected results:

? oVirt FQDN [? for help] foobar.com
Detecting the API endpoint...
Detected: https://foobar.com/ovirt-engine/api
....

Comment 1 Sandro Bonazzola 2020-05-22 13:45:15 UTC
> The API URL is static, based on the user FQDN. Instead of asking users for API UR, we should ask FQDN.

I don't think this is the case.
In engine-setup you can tell the system to serve engine on <fqdn>/ovirt-engine but it's an option.
I would consider closing this as not a bug.

Comment 2 Douglas Schilling Landgraf 2020-05-22 14:19:19 UTC
(In reply to Sandro Bonazzola from comment #1)
> > The API URL is static, based on the user FQDN. Instead of asking users for API UR, we should ask FQDN.
> 
> I don't think this is the case.
> In engine-setup you can tell the system to serve engine on
> <fqdn>/ovirt-engine but it's an option.
> I would consider closing this as not a bug.


We can always do a fallback if required but I see our documentation points the entrypoint to ${fqdb}/ovirt-engine/api
https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.3/html-single/rest_api_guide/index#access_api_entry_point

Comment 3 Douglas Schilling Landgraf 2020-05-22 14:52:33 UTC
(In reply to Douglas Schilling Landgraf from comment #2)
> (In reply to Sandro Bonazzola from comment #1)
> > > The API URL is static, based on the user FQDN. Instead of asking users for API UR, we should ask FQDN.
> > 
> > I don't think this is the case.
> > In engine-setup you can tell the system to serve engine on
> > <fqdn>/ovirt-engine but it's an option.
> > I would consider closing this as not a bug.
> 
> 
> We can always do a fallback if required but I see our documentation points
> the entrypoint to ${fqdb}/ovirt-engine/api
> https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.3/
> html-single/rest_api_guide/index#access_api_entry_point

Looks like we have a bunch of places with static code pointing to ${fqdn}/ovirt-engine/api. I am going to provide a patch into the project so more people can review us.

Few examples: 
https://github.com/oVirt/ovirt-engine/blob/master/backend/manager/modules/services/src/main/java/org/ovirt/engine/core/services/AnsibleServlet.java#L64
https://github.com/oVirt/ovirt-engine/blob/master/packaging/bin/engine-host-update.py.in#L130
https://github.com/oVirt/ovirt-engine/blob/master/packaging/bin/engine-migrate-he.py.in#L48


$ovirt-engine$ grep -Ri 'ovirt-engine/api' | egrep -v 'adoc|Test.java|xml' | wc -l
27

Comment 4 Roy Golan 2020-05-22 18:41:22 UTC
What's wrong with an explicit API endpoint?

Comment 5 Douglas Schilling Landgraf 2020-05-24 10:35:49 UTC
(In reply to Roy Golan from comment #4)
> What's wrong with an explicit API endpoint?


Nothing, just simplify the install. If we can simplify/improve to users, why not? :)

Comment 9 Guilherme Santos 2020-07-22 13:55:33 UTC
Verified on:
4.6.0-0.nightly-2020-07-22-074636

Steps:
1. # openshift-install create cluster --log-level=debug --dir=resources

Results:
installer asked for FQND instead of API URL:
(...)
? Platform ovirt
? Engine FQDN[:PORT] <fqdn>
DEBUG engine FQDN: <fqdn>  
DEBUG Engine URL: https://<fqdn>/ovirt-engine/api

Comment 11 errata-xmlrpc 2020-10-27 16:00: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 (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.