Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1838649

Summary: OCPRHV-118: RFE: installer should avoid ask users oVirt API URL
Product: OpenShift Container Platform Reporter: Douglas Schilling Landgraf <dougsland>
Component: InstallerAssignee: Douglas Schilling Landgraf <dougsland>
Installer sub component: OpenShift on RHV QA Contact: Guilherme Santos <gdeolive>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: low CC: gzaidman, hpopal, rgolan
Version: unspecified   
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 16:00:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1846366, 1850723    
Bug Blocks:    

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