[SRU] glance do not require hypervisor_mapping

Bug #1578622 reported by Scott Moser
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
simplestreams
Fix Released
Medium
Unassigned
simplestreams (Ubuntu)
Fix Released
Medium
Unassigned
Xenial
Won't Fix
Medium
Unassigned
Yakkety
Fix Released
Medium
Unassigned
Bionic
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
currently the glance mirror requires hypervisor_mapping config in the api.
Better to not required that as a library consumer would not necessarily provide it.

[Test Case]

* deploy a openstack environment with keystone v2 enabled
  - get a copy of the bundle available at http://paste.ubuntu.com/p/qxwSDtDZ52/ , this bundle deploys a minimal version of xenial-mitaka.

Expected Result:
- "glance image-list" lists trusty and xenial images
- the file glance-simplestreams-sync/0:/var/log/glance-simplestreams-sync.log contains details of the images pulled from cloud-images.u.c (example: https://pastebin.ubuntu.com/p/RWG8QrkVDz/ )

Actual result:

- "glance image-list" is empty
- glance-simplestreams-sync/0 is in blocked state and message "Image sync failed, retrying soon."

In /var/log/glance-simplestreams-sync.log:
ERROR * 02-14 15:46:07 [PID:1898] * root * Exception during syncing:
Traceback (most recent call last):
  File "/usr/share/glance-simplestreams-sync/glance-simplestreams-sync.py", line 462, in main
    do_sync(charm_conf, status_exchange)
  File "/usr/share/glance-simplestreams-sync/glance-simplestreams-sync.py", line 273, in do_sync
    tmirror.sync(smirror, path=initial_path)
  File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 91, in sync
    return self.sync_index(reader, path, data, content)
  File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 254, in sync_index
    self.sync(reader, path=epath)
  File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 89, in sync
    return self.sync_products(reader, path, data, content)
  File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 341, in sync_products
    self.insert_item(item, src, target, pgree, ipath_cs)
  File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/glance.py", line 242, in insert_item
    if self.config['hypervisor_mapping'] and 'ftype' in flat:
KeyError: 'hypervisor_mapping'

[Regression Potential]

* This patch makes an argument optional only, there is no expected regressions in users of this library.

[Other Info]

The bundle used in the test case uses a modified version of the glance-simplestreams-sync charm that removes the hypervisor_mapping parameter when using simplestreams library. https://pastebin.ubuntu.com/p/Ny7jFnGfnY/

Related branches

Scott Moser (smoser)
affects: ubuntu → simplestreams (Ubuntu)
Changed in simplestreams (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Changed in simplestreams:
importance: Undecided → Medium
status: New → Fix Committed
Changed in simplestreams (Ubuntu Xenial):
status: New → Confirmed
Changed in simplestreams (Ubuntu Trusty):
status: New → Confirmed
importance: Undecided → Medium
Changed in simplestreams (Ubuntu Xenial):
importance: Undecided → Medium
Scott Moser (smoser)
Changed in simplestreams (Ubuntu Wily):
status: New → Confirmed
importance: Undecided → Medium
no longer affects: simplestreams (Ubuntu Wily)
no longer affects: simplestreams (Ubuntu Trusty)
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
simplestreams (0.1.0~bzr430-0ubuntu1) yakkety; urgency=medium

  * New upstream snapshot.
    - set a default user agent (LP: #1578622)
    - glance mirror: do not require that hypervisor_config be
      present (LP: #1578624)
    - Optimise read_signed method for better performance (LP: #1580534)

 -- Scott Moser <email address hidden> Thu, 12 May 2016 12:55:30 -0400

Changed in simplestreams (Ubuntu Yakkety):
status: Confirmed → Fix Released
Revision history for this message
Scott Moser (smoser) wrote : Fixed in simplestreams version 0.1.0.

This bug is believed to be fixed in simplestreams in version 0.1.0. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in simplestreams:
status: Fix Committed → Fix Released
Felipe Reyes (freyes)
description: updated
description: updated
summary: - glance do not require hypervisor_mapping
+ [SRU] glance do not require hypervisor_mapping
description: updated
Felipe Reyes (freyes)
description: updated
Changed in simplestreams (Ubuntu Xenial):
status: Confirmed → In Progress
assignee: nobody → Rafael David Tinoco (rafaeldtinoco)
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :
Revision history for this message
Robie Basak (racb) wrote : Proposed package upload rejected

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: New → Triaged
status: Triaged → In Progress
Changed in simplestreams (Ubuntu Xenial):
assignee: Rafael David Tinoco (rafaeldtinoco) → nobody
Changed in simplestreams (Ubuntu Bionic):
assignee: nobody → Rafael David Tinoco (rafaeldtinoco)
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

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):
status: In Progress → Fix Released
assignee: Rafael David Tinoco (rafaeldtinoco) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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