Glance v2 required by newer versions of OpenStack

Bug #1790904 reported by David Ames
38
This bug affects 4 people
Affects Status Importance Assigned to Milestone
simplestreams
Fix Committed
Medium
David Ames
simplestreams (Ubuntu)
Fix Released
Medium
Unassigned
Bionic
Fix Released
Medium
Rafael David Tinoco

Bug Description

[Impact]

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.

[Test Case]

 * To provision an Ubuntu Bionic based Rocky OpenStack environment
 * Use a keystone v2 for authentication

[Regression Potential]

 * Patch changes simplestreams behavior making it to use glance v2 instead of v1 for "non-legacy" versions of the clients.
 * Patch is based in upstream patch and it is close to version being used in Bionic, cherry-pick was straight forward and no conflicts needed to be solved.

[Other Info]

N/A

Related branches

Revision history for this message
David Ames (thedac) wrote :
Revision history for this message
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)
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
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

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
Revision history for this message
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
Revision history for this message
Junien F (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

Revision history for this message
David Ames (thedac) wrote :

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

Revision history for this message
Junien F (axino) wrote :

Thanks for the correction :)

Changed in simplestreams (Ubuntu Bionic):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Rafael David Tinoco (rafaeldtinoco)
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

New MR for Bionic:

https://code.launchpad.net/~rafaeldtinoco/ubuntu/+source/simplestreams/+git/simplestreams/+merge/375150

PPA with pkg to be tested:

https://launchpad.net/~rafaeldtinoco/+archive/ubuntu/lp1790904

@freyes will test this and provide feedback and +1 on the merge request, then I'll ask it to be reviewed by proper pkg uploaders and continue with the SRU.

description: updated
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello David, or anyone else affected,

Accepted simplestreams into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/simplestreams/0.1.0~bzr460-0ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in simplestreams (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
David Ames (thedac) wrote :

Timo,

Confirmed with 0.1.0~bzr460-0ubuntu1.1 using our charm test on glance-simplestreams-sync. This test used to fail with the previous bionic version.

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

Awesome,

Thanks David! I'll move this to verification-done then!

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package simplestreams - 0.1.0~bzr460-0ubuntu1.1

---------------
simplestreams (0.1.0~bzr460-0ubuntu1.1) bionic; urgency=medium

  * Use glance v2 when "non-legacy" versions of clients are used:
    - d/p/lp1790904-support-glance-version-2.patch (LP: #1790904)

 -- Rafael David Tinoco <email address hidden> Tue, 05 Nov 2019 13:51:03 +0000

Changed in simplestreams (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for simplestreams has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.