hook failed: "install" type 'NoneType' is not iterable
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-
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/
2018-08-07 16:40:17 DEBUG install main()
2018-08-07 16:40:17 DEBUG install File "/var/lib/
2018-08-07 16:40:17 DEBUG install bus.dispatch(
2018-08-07 16:40:17 DEBUG install File "/var/lib/
2018-08-07 16:40:17 DEBUG install _invoke(
2018-08-07 16:40:17 DEBUG install File "/var/lib/
2018-08-07 16:40:17 DEBUG install handler.invoke()
2018-08-07 16:40:17 DEBUG install File "/var/lib/
2018-08-07 16:40:17 DEBUG install self._action(*args)
2018-08-07 16:40:17 DEBUG install File "/var/lib/
2018-08-07 16:40:17 DEBUG install creds = get_credentials()
2018-08-07 16:40:17 DEBUG install File "/var/lib/
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.
2018-08-07 16:40:17 DEBUG juju.worker.
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"
Related branches
- Paul Gear (community): Approve
- Charles Dunbar (community): Approve
-
Diff: 25 lines (+7/-0)1 file modifiedreactive/openstack_exporter.py (+7/-0)
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.