get_os_codename_install_source(config('openstack-origin')) IndexError: list index out of range
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Charm Helpers |
New
|
Undecided
|
Unassigned | ||
OpenStack Glance Charm |
Invalid
|
Undecided
|
Unassigned |
Bug Description
get_os_
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(
Logs and artifacts are available here on two separate changes, with glance failing in the same way on trusty-kilo:
DEBUG:runner:call ['/tmp/
...
DEBUG:runner:
...
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-
2017-04-04 00:34:53 DEBUG worker.uniter.jujuc server.go:173 hook context id "glance/
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/
2017-04-04 00:34:54 INFO install Traceback (most recent call last):
2017-04-04 00:34:54 INFO install File "/var/lib/
2017-04-04 00:34:54 INFO install CONFIGS = register_configs()
2017-04-04 00:34:54 INFO install File "/var/lib/
2017-04-04 00:34:54 INFO install release = os_release(
2017-04-04 00:34:54 INFO install File "/var/lib/
2017-04-04 00:34:54 INFO install get_os_
2017-04-04 00:34:54 INFO install File "/var/lib/
2017-04-04 00:34:54 INFO install ca_rel = ca_rel.split('%s-' % ubuntu_
2017-04-04 00:34:54 INFO install IndexError: list index out of range
2017-04-04 00:34:54 INFO juju.worker.
2017-04-04 00:34:54 ERROR juju.worker.
Related branches
- charmers: Pending requested
-
Diff: 20 lines (+9/-1)1 file modifiedcharmhelpers/contrib/openstack/utils.py (+9/-1)
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-e904563dda 65 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/ 97e37661451947f 8816f6dba3d2251 bc60aab4c3