[SRU] swift client needs to use v1 auth prior to ocata

Bug #1719879 reported by Scott Moser on 2017-09-27
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
simplestreams
Medium
David Ames
simplestreams (Ubuntu)
Medium
Unassigned
Xenial
Medium
Unassigned
Artful
Medium
Unassigned
Bionic
Medium
Unassigned
Disco
Medium
Unassigned

Bug Description

[Impact]

Users upgrading their environment by stages may see problems with the image synchronization when swift is left in mitaka (or newton) while other services have been upgraded to keystone, it's common for clouds where the API is availability is strict to do this kind of upgrades.

[Test Case]

* deploy openstack artful-pike except swift
  juju deploy ./bundle.yaml # http://paste.ubuntu.com/p/27mzxxX9jC/
* Add swift to the already deployed model
  juju deploy ./swift.yaml # http://paste.ubuntu.com/p/RzZ2JMBjbg/
* Once things have settled run the script /etc/cron.daily/glance_simplestreams_sync in glance-simplestreams-sync/0
  juju ssh glance-simplestreams-sync/0 sudo /etc/cron.daily/glance_simplestreams_sync in glance-simplestreams-sync/0

Expected result:

Images for xenial and trusty are uploaded available in glance (openstack image list)

Actual result:

The synchronization scripts fails due that it's not possible to authenticate with swift

[Potential Regression]

* This patch attempts to authenticate using v3 and falls back to v2, so environments where keystone is configured to authenticate using v2 AND v3 may see a change in the behavior where simplestreams will be silently preferring v3 over v2 while before this patch only v2 was being used.

[Other Info]
I talked with David today (thedac) and he mentioned that the support for adding keystone v3 auth to simplestreams glance sync has issues when using older swift clients.

The swift client lagged behind other openstack client libraries in gaining support for v3 auth.

Note: This bug does not affect xenial or zesty. They do not have the keystone v3 support yet, and the code submitted for SRU contains this fix.

Related bugs:
 * bug 1686437: glance sync: need keystone v3 auth support

Tags: sts Edit Tag help

Related branches

Scott Moser (smoser) on 2017-09-27
description: updated
Felipe Reyes (freyes) on 2017-09-27
tags: added: sts
David Ames (thedac) wrote :

With swift client 3.0.0

Traceback (most recent call last):
  File "/usr/share/glance-simplestreams-sync/glance-simplestreams-sync.py", line 471, in main
    do_sync(charm_conf, status_exchange)
  File "/usr/share/glance-simplestreams-sync/glance-simplestreams-sync.py", line 210, in do_sync
    store = SwiftObjectStore(SWIFT_DATA_DIR)
  File "/usr/local/lib/python2.7/dist-packages/simplestreams/objectstores/swift.py", line 76, in __init__
    self.swiftclient = get_swiftclient(**conn_info)
  File "/usr/local/lib/python2.7/dist-packages/simplestreams/objectstores/swift.py", line 46, in get_swiftclient
    return Connection(session=sess)
TypeError: __init__() got an unexpected keyword argument 'session'

Scott Moser (smoser) on 2017-11-10
Changed in simplestreams (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
status: Confirmed → Fix Committed
Changed in simplestreams (Ubuntu Artful):
status: New → Confirmed
importance: Undecided → Medium
description: updated
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package simplestreams - 0.1.0~bzr454-0ubuntu1

---------------
simplestreams (0.1.0~bzr454-0ubuntu1) bionic; urgency=medium

  * New upstream snapshot.
    - Support using older swift clients (older than Ocata).
      [David Ames] (LP: #1719879)
    - Fix glance sync always uploading new image with keystone v3 auth.
      [David Ames] (LP: #1728982)
    - tox.ini: Pin versions of style check tools used in flake8 env.
    - flake8: remove usage of bare except.

 -- Scott Moser <email address hidden> Tue, 31 Oct 2017 10:15:41 -0400

Changed in simplestreams (Ubuntu Bionic):
status: Fix Committed → Fix Released
Łukasz Zemczak (sil2100) wrote :

Could this bug be updated to include the SRU-required information in its description? Thank you!

https://wiki.ubuntu.com/StableReleaseUpdates#SRU_Bug_Template

An upload of simplestreams to artful-proposed has been rejected from the upload queue for the following reason: "No SRU information provided in the bug. No update from thetime. Please re-upload after the required bits are filled-in.".

Felipe Reyes (freyes) on 2018-04-24
description: updated
summary: - swift client needs to use v1 auth prior to ocata
+ [SRU] swift client needs to use v1 auth prior to ocata
Joshua Powers (powersj) on 2019-01-16
Changed in simplestreams (Ubuntu Artful):
status: Confirmed → Won't Fix
Changed in simplestreams:
status: Confirmed → Fix Released
Changed in simplestreams (Ubuntu Xenial):
status: New → In Progress
assignee: nobody → Rafael David Tinoco (rafaeldtinoco)
Changed in simplestreams (Ubuntu Disco):
status: New → Fix Released
Changed in simplestreams (Ubuntu Xenial):
importance: Undecided → Medium
Changed in simplestreams (Ubuntu Disco):
importance: Undecided → Medium
Robie Basak (racb) wrote :

An upload of simplestreams to xenial-proposed has been rejected from the upload queue for the following reason: "See https://bugs.launchpad.net/charms/+source/glance-simplestreams-sync/+bug/1611987/comments/21".

Changed in simplestreams (Ubuntu Xenial):
status: In Progress → Won't Fix
Changed in simplestreams (Ubuntu Bionic):
status: Fix Released → In Progress
Changed in simplestreams (Ubuntu Xenial):
assignee: Rafael David Tinoco (rafaeldtinoco) → nobody
Changed in simplestreams (Ubuntu Bionic):
assignee: nobody → Rafael David Tinoco (rafaeldtinoco)

TL;DR version:

We are going to fix Bionic simplestreams package and provide this Bionic simplestreams package in Ubuntu Cloud Archive for Xenial. With that, we are fixing Xenial simplestreams behavior (to work with keystone v3) only if end-user enables Ubuntu Cloud Archive.

Conversation about this topic:

https://code.launchpad.net/~rafaeldtinoco/ubuntu/+source/simplestreams/+git/simplestreams/+merge/373030/comments/980111

Changed in simplestreams (Ubuntu Bionic):
assignee: Rafael David Tinoco (rafaeldtinoco) → nobody
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers