hook failed: "install" type 'NoneType' is not iterable

Bug #1785864 reported by Ashley Lai
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Prometheus Openstack Exporter Charm
Fix Released
Medium
Drew Freiberger

Bug Description

2018-08-07 16:40:17 DEBUG install snap "prometheus-openstack-exporter" is already installed, see 'snap
2018-08-07 16:40:17 DEBUG install help refresh'
2018-08-07 16:40:17 DEBUG install
2018-08-07 16:40:17 DEBUG install Traceback (most recent call last):
2018-08-07 16:40:17 DEBUG install File "/var/lib/juju/agents/unit-prometheus-openstack-exporter-0/charm/hooks/install", line 19, in <module>
2018-08-07 16:40:17 DEBUG install main()
2018-08-07 16:40:17 DEBUG install File "/var/lib/juju/agents/unit-prometheus-openstack-exporter-0/.venv/lib/python3.5/site-packages/charms/reactive/__init__.py", line 72, in main
2018-08-07 16:40:17 DEBUG install bus.dispatch(restricted=restricted_mode)
2018-08-07 16:40:17 DEBUG install File "/var/lib/juju/agents/unit-prometheus-openstack-exporter-0/.venv/lib/python3.5/site-packages/charms/reactive/bus.py", line 382, in dispatch
2018-08-07 16:40:17 DEBUG install _invoke(other_handlers)
2018-08-07 16:40:17 DEBUG install File "/var/lib/juju/agents/unit-prometheus-openstack-exporter-0/.venv/lib/python3.5/site-packages/charms/reactive/bus.py", line 358, in _invoke
2018-08-07 16:40:17 DEBUG install handler.invoke()
2018-08-07 16:40:17 DEBUG install File "/var/lib/juju/agents/unit-prometheus-openstack-exporter-0/.venv/lib/python3.5/site-packages/charms/reactive/bus.py", line 180, in invoke
2018-08-07 16:40:17 DEBUG install self._action(*args)
2018-08-07 16:40:17 DEBUG install File "/var/lib/juju/agents/unit-prometheus-openstack-exporter-0/charm/reactive/openstack_exporter.py", line 170, in render_config
2018-08-07 16:40:17 DEBUG install creds = get_credentials()
2018-08-07 16:40:17 DEBUG install File "/var/lib/juju/agents/unit-prometheus-openstack-exporter-0/charm/reactive/openstack_exporter.py", line 148, in get_credentials
2018-08-07 16:40:17 DEBUG install if 'domain' in creds:
2018-08-07 16:40:17 DEBUG install TypeError: argument of type 'NoneType' is not iterable
2018-08-07 16:40:17 ERROR juju.worker.uniter.operation runhook.go:114 hook "install" failed: exit status 1
2018-08-07 16:40:17 DEBUG juju.worker.uniter.operation executor.go:75 lock released
2018-08-07 16:40:17 INFO juju.worker.uniter resolver.go:102 awaiting error resolution for "install" hook
2018-08-07 16:40:17 DEBUG juju.worker.uniter agent.go:17 [AGENT-STATUS] error: hook failed: "install"

Revision history for this message
Ashley Lai (alai) wrote :
tags: added: cdo-qa cdo-qa-blocker foundations-engine
Revision history for this message
Ashley Lai (alai) wrote :
Revision history for this message
Charles Dunbar (ccdunbar) wrote :

From my findings, it looks like we either expect credentials to come from the os-credentials config option, or that keystone.get_creds() always provides credentials, which clearly didn't happen in this situation.

The README mentions: "This charm supports relating to keystone, but keystone-credentials
interface seems to be flaky," so it may be more of an issue outside of this charm.

A workaround for this would be to set the os-credentials config option to the correct values.

Revision history for this message
John George (jog) wrote :

prometheus-openstack-exporter is being deployed along side openstack (see the attached bundle). At the time of the failure, keystone is still in the process of being deployed, so keystone can't provide credentials likewise os-credentials are not yet available to set in the charm config.

Revision history for this message
John George (jog) wrote :

@ccdunbar with - [ "prometheus-openstack-exporter:identity-credentials", "keystone:identity-credentials" ] set in the bundle shouldn't this charm wait for keystone?

Revision history for this message
Drew Freiberger (afreiberger) wrote :
Changed in prometheus-openstack-exporter-charm:
importance: Undecided → Medium
status: New → In Progress
assignee: nobody → Drew Freiberger (afreiberger)
Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

I see a fix is landed for this; when will a new charm be published?

Revision history for this message
Drew Freiberger (afreiberger) wrote :

I've released this to cs:~prometheus-charmers/prometheus-openstack-exporter-11 published to the edge channel for testing.

Revision history for this message
Drew Freiberger (afreiberger) wrote :

Fix available as cs:prometheus-openstack-exporter-6

Changed in prometheus-openstack-exporter-charm:
status: In Progress → 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.