Bug 1445032

Summary: Add RHV API V4 support to Satellite
Product: Red Hat Satellite Reporter: Oved Ourfali <oourfali>
Component: Compute Resources - RHEVAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Lukáš Hellebrandt <lhellebr>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: bkearney, iheim, inecas, jcallaha, juan.hernandez, lhellebr, mperina, ohadlevy
Target Milestone: 6.4.0Keywords: Reopened, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-16 19:08:29 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:    
Bug Blocks: 1486353, 1578187    

Description Oved Ourfali 2017-04-24 18:45:01 UTC
Description of problem:
Starting RHV 4.2, the v3 of the RHV API will no longer exist.
Please move all requests to work with v4.
v4 is supported since RHV 4.0, so for the basic requests you're using, it will work with RHV 4.0 and above.

Depending on the release schedule of Satellite, and the required support matrix, consider keeping both the v3 and v4 code.

Comment 1 Itamar Heim 2017-04-28 13:05:54 UTC
what do you mean by "move"?
wouldn't this break satellite 6 compatibility for rhev 3 ?
i can understand "add"?

Comment 2 Oved Ourfali 2017-04-28 17:07:00 UTC
(In reply to Itamar Heim from comment #1)
> what do you mean by "move"?
> wouldn't this break satellite 6 compatibility for rhev 3 ?
> i can understand "add"?

That's exactly what I meant when I wrote :
" Depending on the release schedule of Satellite, and the required support matrix, consider keeping both the v3 and v4 code."

Because I don't know when is the next satellite release, and what RHV versions it should support.

Comment 3 Brad Buckingham 2017-04-28 18:17:45 UTC
Hi Ohad, Any thoughts on what release of Satellite 6 this should get aligned to?  Thanks!

Comment 4 Bryan Kearney 2017-06-06 13:37:50 UTC

*** This bug has been marked as a duplicate of bug 1405489 ***

Comment 5 Yaniv Kaul 2017-06-06 13:41:42 UTC
Bryan, this is not a dup. Bug 1405489 merely changed the end point from /api to /ovirt-engine/api or so, so it'll still work with RHV 4.0 using the v3 API.
This specific bug is a request to move to v4 API altogether.

Comment 6 Juan Hernández 2017-06-06 13:53:59 UTC
To avoid disruption and risks I'd suggest to add to Satellite a new provider for oVirt 4 (not sure if "provider" is the right term in the Satellite architecture), while preserving the existing oVirt 3 provider.

Both should available in the GUI, temporarely, till we completely drop support for version 3 of the API. The user should be ableo choose which one to use. We should also provide a documented procedure to manually switch from the old one to the new one.

If I understand correctly the current support for RHV is based in the 'ovirt' provider of the 'fog' gem. If that is correct then I'd suggest the same approach there: add a new 'ovirt4' provider to 'fog', while preserving the existing 'ovirt' one. That new 'ovirt4' provider should use the 'ovirt-engine-sdk' gem instead of 'rbovirt'.

Comment 12 Ivan Necas 2018-04-24 07:39:37 UTC
The feature has been merged into the foreman: it's currently marked as experimental, and users still can use the v3 (which is set by default), until we get confirmation from QE that the v4 can fully replace v3,

we are tracking the v4-related issues in http://projects.theforeman.org/issues/19568.

Regardless, it's possible now to start using the API v4 in current upstream, and I'm marking this PZ as POST

Comment 13 Yaniv Kaul 2018-04-24 08:29:57 UTC
(In reply to Ivan Necas from comment #12)
> The feature has been merged into the foreman: it's currently marked as
> experimental, and users still can use the v3 (which is set by default),
> until we get confirmation from QE that the v4 can fully replace v3,

When will this happen?

> 
> we are tracking the v4-related issues in
> http://projects.theforeman.org/issues/19568.
> 
> Regardless, it's possible now to start using the API v4 in current upstream,
> and I'm marking this PZ as POST

Comment 14 jcallaha 2018-04-24 18:40:46 UTC
This change would likely make it into 6.4, pending testing.

Comment 16 Lukáš Hellebrandt 2018-08-28 12:41:17 UTC
Verified with Sat 6.4 snap 18.

The CR edit page now contains a checkbox for API version selection. Version 4 is marked as experimental.

While there are some bugs (BZs reported), it is now generally possible to do the same using API v3 and v4.

Comment 18 Bryan Kearney 2018-10-16 19:08:29 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.

https://access.redhat.com/errata/RHSA-2018:2927