glance-simplestreams-sync fails to get deployed in Xenial (no "python2.7")

Bug #1614654 reported by Alvaro Uria
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
glance-simplestreams-sync (Juju Charms Collection)
Fix Released
High
James Page

Bug Description

glance-simplestream-sync charm fails on Xenial because python2.7 is not installed by default.

Later (after having manually installed "python" package), charm deploy failed on config-changed because:
"""
2016-08-18 18:41:13 INFO config-changed Traceback (most recent call last):
2016-08-18 18:41:13 INFO config-changed File "/var/lib/juju/agents/unit-glance-simplestreams-sync-0/charm/hooks/config-changed", line 108, in <module>
2016-08-18 18:41:13 INFO config-changed release = get_os_codename_package('glance-common', fatal=False) or 'icehouse'
2016-08-18 18:41:13 INFO config-changed File "/var/lib/juju/agents/unit-glance-simplestreams-sync-0/charm/hooks/charmhelpers/contrib/openstack/utils.py", line 218, in get_os_codename_package
2016-08-18 18:41:13 INFO config-changed import apt_pkg as apt
2016-08-18 18:41:13 INFO config-changed ImportError: No module named apt_pkg
2016-08-18 18:41:13 ERROR juju.worker.uniter.operation runhook.go:107 hook "config-changed" failed: exit status 1
"""

Alvaro Uria (aluria)
description: updated
Revision history for this message
Alvaro Uria (aluria) wrote :

Workaround steps:
* deploy glance-simplestreams-sync in Xenial (hook install fails)
* manually install packages: python python-apt
* juju run --unit glance-simplestreams-sync/0 hooks/install
* juju resolved glance-simplestreams-sync/0

Revision history for this message
Alvaro Uria (aluria) wrote :

Still had an error regarding "hypervisor_mapping" being used by python-simplestreams (lp#1578622) at /usr/lib/python2.7/dist-packages/simplestreams/mirrors/glance.py (line 242) but not initialized by /usr/share/glance-simplestreams-sync/glance-simplestreams-sync.py (line 184):
"""
        config = {'max_items': mirror_info['max'],
                  'modify_hook': charm_conf['modify_hook_scripts'],
                  'keep_items': False,
                  'content_id': content_id,
                  'cloud_name': charm_conf['cloud_name'],
                  'item_filters': mirror_info['item_filters'],
                  'hypervisor_mapping': False}
"""

By adding 'hypervisor_mapping', I was able to sync images from upstream into glance.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in simplestreams (Ubuntu):
status: New → Confirmed
Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

As far as I can tell, this is a charm bug. If simplestreams packaging needs fixing, please explain what is broken there and change the bug status for simplestreams back to New. Thanks!

Changed in simplestreams (Ubuntu):
status: Confirmed → Incomplete
James Page (james-page)
no longer affects: simplestreams (Ubuntu)
Changed in glance-simplestreams-sync (Juju Charms Collection):
status: New → Fix Committed
importance: Undecided → High
assignee: nobody → James Page (james-page)
Revision history for this message
James Page (james-page) wrote :

Fixes pushed to branch - will publish to charm store once I've finished testing this and other changes I'm making.

James Page (james-page)
Changed in glance-simplestreams-sync (Juju Charms Collection):
status: Fix Committed → Fix Released
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.