Bug 987917

Summary: [oVirt] [glance] API version not specified in provider dialog
Product: [Retired] oVirt Reporter: Mike Kolesnik <mkolesni>
Component: ovirt-engine-webadminAssignee: Mike Kolesnik <mkolesni>
Status: CLOSED CURRENTRELEASE QA Contact: GenadiC <gcheresh>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.3CC: acathrow, amureini, ecohen, fsimonce, iheim, knesenko, mgoldboi, sbonazzo
Target Milestone: ---   
Target Release: 3.4.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: network
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-08 13:37:11 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:

Description Mike Kolesnik 2013-07-24 12:16:12 UTC
Description of problem:
API version should be specified in the dialog, so that it would be clear to the admin which API version we're using.
Please look at hos it's done for OPenstack Network provider.


Version-Release number of selected component (if applicable):


How reproducible:
Always


Steps to Reproduce:
1. Try to add a new Openstack Image provider
2. 
3.
  
Actual results:
Under the URL field there is no version


Expected results:
There should be a version under the URL field


Additional info:

Comment 1 Federico Simoncelli 2013-09-05 13:03:50 UTC
(In reply to Mike Kolesnik from comment #0)
> Description of problem:
> API version should be specified in the dialog, so that it would be clear to
> the admin which API version we're using.
> Please look at hos it's done for OPenstack Network provider.


At the moment the provider api version implementation is based only on the network provider needs, hard-coding the api version both on the frontend:

 getApiVersion().setItems(Arrays.asList("v2.0"));

and in the backend:

 private static final String API_VERSION = "/v2.0";

These hard-coded values are not valid for glance (and probably for other future providers as well).

Simply put, we're missing all the provider infrastructure that defines the valid versions per-provider and displays them in the UI.
If we want to tackle this properly, then the scope of this bug is the provider implementation (not just glance).


Now, that said, my opinion is that by default the user shouldn't be involved in picking or forcing any specific version.
Think for example when you update a glance server, you don't want to go into the provider definition and manually update the version to take advantage of the new api.

OpenStack is designed so that the api version is decided at connection-time depending on the server endpoint (publishes versions + urls) and client support.

On the oVirt side we should report meaningful errors (e.g. "Neutron server doesn't support api versions 2.0,...") when the remote endpoint (glance/neutron) is not advertising any of the versions we can communicate with.

From the user point of view such error in the UI is more informative than trying one by one all the versions in the dropdown box.

Comment 2 Itamar Heim 2013-09-06 05:36:37 UTC
still, magic numbers in the code... at least move to config?

Comment 3 Sandro Bonazzola 2013-11-15 10:55:46 UTC
Re targeting to 3.3.2 since 3.3.0 has been already released.

Comment 4 Sandro Bonazzola 2013-11-28 15:34:24 UTC
Re-targeting to 3.3.3 since the bug is not resolved in 3.3.2 beta and is not blocking 3.3.2 release tracker (bug #1027349)

Comment 5 Sandro Bonazzola 2014-01-22 11:29:10 UTC
Re targeting to 3.3.4 as not blocking 3.3.3 release.

Comment 6 Ayal Baron 2014-02-17 21:53:45 UTC
(In reply to Itamar Heim from comment #2)
> still, magic numbers in the code... at least move to config?

As specified in comment 1, these numbers are only relevant for the neutron provider so moving to network if this is to be fixed.

Also as explained, for glance there is no point in specifying the version (it goes against the way openstack works with versioning).

"
OpenStack is designed so that the api version is decided at connection-time depending on the server endpoint (publishes versions + urls) and client support.
"

Comment 7 Mike Kolesnik 2014-02-25 08:50:10 UTC
Decided to remove version field on Neutron dialog since only v2.0 is suggested.

(In reply to Itamar Heim from comment #2)
> still, magic numbers in the code... at least move to config?

No need currently as only very specific API versions are supported for Glance/Neutron and the SDK is not build for supporting any other version so it's not configurable.

Comment 8 Sandro Bonazzola 2014-03-04 09:27:56 UTC
This is an automated message.
Re-targeting all non-blocker bugs still open on 3.4.0 to 3.4.1.

Comment 9 Sandro Bonazzola 2014-05-08 13:37:11 UTC
This is an automated message

oVirt 3.4.1 has been released:
 * should fix your issue
 * should be available at your local mirror within two days.

If problems still persist, please make note of it in this bug report.