Glance v2 required by newer versions of OpenStack

Bug #1790904 reported by David Ames on 2018-09-05
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
simplestreams
Medium
David Ames
simplestreams (Ubuntu)
Medium
Unassigned
Nominated for Bionic by Joshua Powers

Bug Description

OpenStack Rocky has removed glance v1 from the API. Glance v2 is required.

Simplestreams errors with the following in a Rocky OpenStack cloud:

Traceback (most recent call last):
  File "/usr/share/glance-simplestreams-sync/glance-simplestreams-sync.py", line 464, in main
    do_sync(charm_conf, status_exchange)
  File "/usr/share/glance-simplestreams-sync/glance-simplestreams-sync.py", line 264, in do_sync
    drmirror.sync(smirror, path=initial_path)
  File "/usr/local/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 91, in sync
    return self.sync_index(reader, path, data, content)
  File "/usr/local/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 254, in sync_index
    self.sync(reader, path=epath)
  File "/usr/local/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 89, in sync
    return self.sync_products(reader, path, data, content)
  File "/usr/local/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 269, in sync_products
    target = self.load_products(path, content_id)
  File "/usr/local/lib/python2.7/dist-packages/simplestreams/mirrors/glance.py", line 197, in load_products
    for image in images:
  File "/usr/lib/python2.7/dist-packages/glanceclient/v1/images.py", line 254, in list
    for image in paginate(params, return_request_id):
  File "/usr/lib/python2.7/dist-packages/glanceclient/v1/images.py", line 238, in paginate
    images, resp = self._list(url, "images")
  File "/usr/lib/python2.7/dist-packages/glanceclient/v1/images.py", line 63, in _list
    resp, body = self.client.get(url)
  File "/usr/lib/python2.7/dist-packages/keystoneauth1/adapter.py", line 304, in get
    return self.request(url, 'GET', **kwargs)
  File "/usr/lib/python2.7/dist-packages/glanceclient/common/http.py", line 349, in request
    return self._handle_response(resp)
  File "/usr/lib/python2.7/dist-packages/glanceclient/common/http.py", line 103, in _handle_response
    raise exc.from_response(resp)
HTTPMultipleChoices: HTTPMultipleChoices (HTTP 300) Requested version of OpenStack Images API is not available.

Allow for Glance v2 API calls.

Related branches

David Ames (thedac) wrote :

The MP has been updated.
https://code.launchpad.net/~thedac/simplestreams/+git/simplestreams/+merge/354369

This will need to be backported to Cosmic and Bionic.

Scott Moser (smoser) on 2018-10-31
Changed in simplestreams:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → David Ames (thedac)
status: Confirmed → In Progress
Changed in simplestreams (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium

This bug is fixed with commit efb19f32 to simplestreams on branch master.
To view that commit see the following URL:
https://git.launchpad.net/simplestreams/commit/?id=efb19f32

Changed in simplestreams:
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package simplestreams - 0.1.0-17-g693795b-0ubuntu1

---------------
simplestreams (0.1.0-17-g693795b-0ubuntu1) disco; urgency=medium

  * debian/control: Update packaging to include
    python3-simplestreams-openstack.
  * debian/control: drop obsolete conficts/replaces.
  * debian/: fix lintian warnings and errors.
    - package-uses-deprecated-debhelper-compat-version: change to 9
      9 is what is in 16.04 (and 12.04), so stick with that for now.
    - build-depends-on-build-essential-package-without-using-version:
      drop the make dependency.
    - ancient-python-version-field: no need to specify X-python-version
      or X-python3-version any more.
    - ancient-standards-version:
      move debian/control Standards-Version to 4.2.1
    - priority-extra-is-replaced-by-priority-optional:
      replace extra with optional
   * debian/control: new package python3-simplestreams-openstack.
  * New upstream snapshot.
    - Move sstream-mirror-glance from tools/ to bin/.
    - glance: Support Glance version 2. [David Ames] (LP: #1790904)
    - Move to git.
    - sstream-mirror-glance update to python3 and include in shipped files.

 -- Scott Moser <email address hidden> Tue, 13 Nov 2018 10:43:34 -0500

Changed in simplestreams (Ubuntu):
status: Confirmed → Fix Released
Junien Fridrick (axino) wrote :

Hi,

When will this be SRUed ? We'll also likely need it for xenial, since xenial-rocky is a thing as far as I know.

Thanks

David Ames (thedac) wrote :

This does need to be SRU'd to Bionic.
But not Xenial. Rocky is only supported on Bionic.

Junien Fridrick (axino) wrote :

Thanks for the correction :)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers