get_os_codename_install_source(config('openstack-origin')) IndexError: list index out of range

Bug #1679444 reported by Ryan Beisner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Charm Helpers
New
Undecided
Unassigned
OpenStack Glance Charm
Invalid
Undecided
Unassigned

Bug Description

get_os_codename_install_source(config('openstack-origin')) IndexError: list index out of range

I'm raising this bug as I've seen this more than once against glance, but always as an ancillary unit to whatever is under test. There seems to be a race condition of some sort, as a recheck generally works fine.

The install hook fails, but the code path that I see in the traceback hasn't changed in years (!).

What I've not been able to determine from logs is the value of config('openstack-origin') at the time that this occurs.

Logs and artifacts are available here on two separate changes, with glance failing in the same way on trusty-kilo:

https://openstack-ci-reports.ubuntu.com/artifacts/test_charm_pipeline_amulet_full/openstack/charm-tempest/452981/3/915/index.html

https://openstack-ci-reports.ubuntu.com/artifacts/test_charm_pipeline_amulet_full/openstack/charm-tempest/442751/2/916/index.html

DEBUG:runner:call ['/tmp/bundletester-vd_q8J/tempest/tests/gate-basic-trusty-kilo'] (cwd: /tmp/bundletester-vd_q8J/tempest)

...

DEBUG:runner:2017-04-04 00:32:56 Deploying application glance using cs:~openstack-charmers-next/glance-267

...

glance/1 error idle 1.25.11 7 172.17.106.24 hook failed: "install"

...

017-04-04 00:34:52 INFO install Setting up python-markupsafe (0.23-2build2) ...
2017-04-04 00:34:52 INFO install Setting up python-jinja2 (2.8-1) ...
2017-04-04 00:34:53 INFO worker.uniter.jujuc server.go:172 running hook tool "config-get" ["openstack-origin-git" "--format=json"]
2017-04-04 00:34:53 DEBUG worker.uniter.jujuc server.go:173 hook context id "glance/1-install-2705849788566740115"; dir "/var/lib/juju/agents/unit-glance-1/charm"
2017-04-04 00:34:54 INFO worker.uniter.jujuc server.go:172 running hook tool "config-get" ["openstack-origin" "--format=json"]
2017-04-04 00:34:54 DEBUG worker.uniter.jujuc server.go:173 hook context id "glance/1-install-2705849788566740115"; dir "/var/lib/juju/agents/unit-glance-1/charm"
2017-04-04 00:34:54 INFO install Traceback (most recent call last):
2017-04-04 00:34:54 INFO install File "/var/lib/juju/agents/unit-glance-1/charm/hooks/install.real", line 122, in <module>
2017-04-04 00:34:54 INFO install CONFIGS = register_configs()
2017-04-04 00:34:54 INFO install File "/var/lib/juju/agents/unit-glance-1/charm/hooks/glance_utils.py", line 232, in register_configs
2017-04-04 00:34:54 INFO install release = os_release('glance-common')
2017-04-04 00:34:54 INFO install File "/var/lib/juju/agents/unit-glance-1/charm/hooks/charmhelpers/contrib/openstack/utils.py", line 439, in os_release
2017-04-04 00:34:54 INFO install get_os_codename_install_source(config('openstack-origin')) or
2017-04-04 00:34:54 INFO install File "/var/lib/juju/agents/unit-glance-1/charm/hooks/charmhelpers/contrib/openstack/utils.py", line 263, in get_os_codename_install_source
2017-04-04 00:34:54 INFO install ca_rel = ca_rel.split('%s-' % ubuntu_rel)[1].split('/')[0]
2017-04-04 00:34:54 INFO install IndexError: list index out of range
2017-04-04 00:34:54 INFO juju.worker.uniter.context context.go:579 handling reboot
2017-04-04 00:34:54 ERROR juju.worker.uniter.operation runhook.go:107 hook "install" failed: exit status 1

Tags: uosci

Related branches

Ryan Beisner (1chb1n)
description: updated
Revision history for this message
Ryan Beisner (1chb1n) wrote :

Aha. The hook error occurs because a Xenial series unit was deployed when a Trusty one was expected.
 There is a known issue on this.

glance/1 error idle 1.25.11 7 172.17.106.24 hook failed: "install"

7 started 1.25.11 172.17.106.24 1948e787-e36a-4be7-afe4-e904563dda65 xenial arch=amd64 cpu-cores=1 mem=1536M root-disk=10240M availability-zone=nova

The tox.ini passenv needs to be updated in any affected charms to include CS_API_URL, ex:

passenv = HOME TERM AMULET_* CS_API_URL

Reference:

https://github.com/juju-solutions/libcharmstore/issues/5

https://github.com/juju-solutions/libcharmstore/commit/97e37661451947f8816f6dba3d2251bc60aab4c3

Changed in charm-glance:
status: New → Invalid
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.