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

Bug 1713701

Summary: [RFE]python-openstackclient should handle API micro-versions consistently
Product: Red Hat OpenStack Reporter: Alex Stupnikov <astupnik>
Component: python-openstackclientAssignee: OSP Team <rhos-maint>
Status: CLOSED WONTFIX QA Contact: nlevinki <nlevinki>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 16.0 (Train)CC: apevec, apverma, astupnik, ebarrera, eharney, gcharot, jpichon, jpretori, lhh, ltoscano, pweeks, tshefi
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-10-10 19:18:27 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: 1732755, 1802412    

Description Alex Stupnikov 2019-05-24 14:20:33 UTC
Description of problem:

After trying to solve customer's case I have found a number of problems in pythong-openstackclient that worth attention:

- novaclient automatically negotiates API microversions, while openstackclient doesn't [1]. It looks like the same issue affects other APIs (IMAGE, FS, etc)
- cinderclient support API microversions (doesn't negotiate them automatically), while openstackclient doesn't. As a result, there is no workaround for issues like [2]

I am sure that there are a number of other issues there and they all make the product look bad.


[1] 
(overcloud) [stack@undercloud-0 ~]$ nova --debug list
........
DEBUG (session:419) RESP: [200] Date: Fri, 24 May 2019 14:14:18 GMT Server: Apache OpenStack-API-Version: compute 2.1 X-OpenStack-Nova-API-Version: 2.1 Vary: OpenStack-API-Version,X-OpenStack-Nova-API-Version,Accept-Encoding x-openstack-request-id: req-52dc5fa5-67de-4535-808e-a16b5e0ac99e x-compute-request-id: req-52dc5fa5-67de-4535-808e-a16b5e0ac99e Content-Encoding: gzip Content-Length: 256 Content-Type: application/json 
RESP BODY: {"version": {"status": "CURRENT", "updated": "2013-07-23T11:33:21Z", "links": [{"href": "http://10.0.0.121:8774/v2.1/", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}], "min_version": "2.1", "version": "2.60", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.compute+json;version=2.1"}], "id": "v2.1"}}
........
DEBUG (session:372) REQ: curl -g -i -X GET http://10.0.0.121:8774/v2.1/servers/detail -H "OpenStack-API-Version: compute 2.60" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-OpenStack-Nova-API-Version: 2.60" -H "X-Auth-Token: {SHA1}dae2974bdaffcd1b334bb2375a7539442d6e6f3e"

AND

(overcloud) [stack@undercloud-0 ~]$ openstack -vvv server list
........
REQ: curl -g -i -X GET http://10.0.0.121:8774/v2.1/servers/detail -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}6037a6023e7bb9b5aedb92bf653adb9f1255bb86"
........


[2] https://storyboard.openstack.org/#!/story/2003970

Comment 1 Alex Stupnikov 2019-05-24 14:21:51 UTC
Bug #1689706 is probably related to this one.

Comment 2 Hervé Beraud 2020-01-24 08:23:50 UTC
This one (Bug #1732755) seems related to microversion management too.

Comment 3 Hervé Beraud 2020-01-24 08:25:30 UTC
I'll try to investigate on this