charm does not block when missing required config (san-ip)

Bug #1836109 reported by Ryan Beisner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Cinder Pure Storage Charm
Invalid
Undecided
Narinder Gupta
OpenStack Cinder Pure Storage Charm
Fix Committed
Undecided
Unassigned

Bug Description

The charm does not go into a blocked state when it is missing a required config option (san-ip). It goes into a hook error, but it should guard against this and go into a blocked state instead.

2019-07-10 20:34:40 DEBUG install Traceback (most recent call last):
2019-07-10 20:34:40 DEBUG install File "/var/lib/juju/agents/unit-cinder-purestorage-0/charm/hooks/install", line 22, in <module>
2019-07-10 20:34:40 DEBUG install main()
2019-07-10 20:34:40 DEBUG install File "/var/lib/juju/agents/unit-cinder-purestorage-0/.venv/lib/python3.6/site-packages/charms/reactive/__init__.py", line 70, in main
2019-07-10 20:34:40 DEBUG install bus.discover()
2019-07-10 20:34:40 DEBUG install File "/var/lib/juju/agents/unit-cinder-purestorage-0/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 424, in discover
2019-07-10 20:34:40 DEBUG install _register_handlers_from_file(search_path, filepath)
2019-07-10 20:34:40 DEBUG install File "/var/lib/juju/agents/unit-cinder-purestorage-0/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 454, in _register_handlers_from_file
2019-07-10 20:34:40 DEBUG install _load_module(root, filepath)
2019-07-10 20:34:40 DEBUG install File "/var/lib/juju/agents/unit-cinder-purestorage-0/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 442, in _load_module
2019-07-10 20:34:40 DEBUG install return importlib.import_module(package + module)
2019-07-10 20:34:40 DEBUG install File "/var/lib/juju/agents/unit-cinder-purestorage-0/.venv/lib/python3.6/importlib/__init__.py", line 126, in import_module
2019-07-10 20:34:40 DEBUG install return _bootstrap._gcd_import(name[level:], package, level)
2019-07-10 20:34:40 DEBUG install File "<frozen importlib._bootstrap>", line 994, in _gcd_import
2019-07-10 20:34:40 DEBUG install File "<frozen importlib._bootstrap>", line 971, in _find_and_load
2019-07-10 20:34:40 DEBUG install File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
2019-07-10 20:34:40 DEBUG install File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
2019-07-10 20:34:40 DEBUG install File "<frozen importlib._bootstrap_external>", line 678, in exec_module
2019-07-10 20:34:40 DEBUG install File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
2019-07-10 20:34:40 DEBUG install File "/var/lib/juju/agents/unit-cinder-purestorage-0/charm/reactive/cinder_purestorage_handlers.py", line 20, in <module>
2019-07-10 20:34:40 DEBUG install import charm.openstack.cinder_purestorage # noqa
2019-07-10 20:34:40 DEBUG install File "lib/charm/openstack/cinder_purestorage.py", line 7, in <module>
2019-07-10 20:34:40 DEBUG install charms_openstack.charm.CinderStoragePluginCharm):
2019-07-10 20:34:40 DEBUG install File "lib/charm/openstack/cinder_purestorage.py", line 16, in CinderpurestorageCharm
2019-07-10 20:34:40 DEBUG install ('san_ip', self.config.get('san-ip')),
2019-07-10 20:34:40 DEBUG install NameError: name 'self' is not defined
2019-07-10 20:34:40 ERROR juju.worker.uniter.operation runhook.go:132 hook "install" failed: exit status 1

Tags: uosci
Changed in charm-cinder-pure-storage:
assignee: nobody → Narinder Gupta (narindergupta)
status: New → In Progress
Ryan Beisner (1chb1n)
Changed in charm-cinder-pure-storage:
status: In Progress → Fix Released
status: Fix Released → New
status: New → Invalid
Revision history for this message
Aurelien Lourot (aurelien-lourot) wrote :

This seems fixed, see lp:1959902

Changed in charm-cinder-purestorage:
status: New → Fix Committed
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.