charms.reactive 0.5.0.(*) requires refactoring of StateList

Bug #1718152 reported by Alex Kavanagh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Manila Charm
Fix Released
High
Alex Kavanagh
OpenStack Manila Generic Backend Charm
Fix Released
High
Alex Kavanagh

Bug Description

Bug https://github.com/juju-solutions/charms.reactive/issues/125 on charms.reactive shows that the new version has removed: charms.reactive.bus.StateList:

2017-09-18 15:23:58 DEBUG install class ManilaPluginProvides(reactive.RelationBase):
2017-09-18 15:23:58 DEBUG install File "/var/lib/juju/agents/unit-manila-0/charm/hooks/relations/manila-plugin/provides.py", line 39, in ManilaPluginProvides
2017-09-18 15:23:58 DEBUG install class states(reactive.bus.StateList):
2017-09-18 15:23:58 DEBUG install AttributeError: module 'charms.reactive.bus' has no attribute 'StateList'
2017-09-18 15:23:58 ERROR juju.worker.uniter.operation runhook.go:107 hook "install" failed: exit status 1

Technically, this is in the interface (charm-interface-manila-plugin) on the Provides (and probably Requires), but it affects the charm as it won't rebuild, and this is where people will look.

Solution is to refactor the StateList out of manila-plugin so that manila & manila-generic can build again. It wasn't a very popular feature and it isn't likely that anyone else is affected.

Changed in charm-manila:
importance: Undecided → Medium
David Ames (thedac)
Changed in charm-manila:
status: New → Triaged
Revision history for this message
Ryan Beisner (1chb1n) wrote :
Download full text (3.2 KiB)

Confirmed this issue remains in charm-manila master:

2017-11-22 10:05:34 DEBUG install Preparing to unpack .../python3-psutil_3.4.2-1_amd64.deb ...
2017-11-22 10:05:34 DEBUG install Unpacking python3-psutil (3.4.2-1) ...
2017-11-22 10:05:35 DEBUG install Setting up python3-psutil (3.4.2-1) ...
2017-11-22 10:05:37 DEBUG install Traceback (most recent call last):
2017-11-22 10:05:37 DEBUG install File "/var/lib/juju/agents/unit-manila-0/charm/hooks/install", line 19, in <module>
2017-11-22 10:05:37 DEBUG install main()
2017-11-22 10:05:37 DEBUG install File "/var/lib/juju/agents/unit-manila-0/.venv/lib/python3.5/site-packages/charms/reactive/__init__.py", line 110, in main
2017-11-22 10:05:37 DEBUG install bus.discover()
2017-11-22 10:05:37 DEBUG install File "/var/lib/juju/agents/unit-manila-0/.venv/lib/python3.5/site-packages/charms/reactive/bus.py", line 398, in discover
2017-11-22 10:05:37 DEBUG install _register_handlers_from_file(search_path, filepath)
2017-11-22 10:05:37 DEBUG install File "/var/lib/juju/agents/unit-manila-0/.venv/lib/python3.5/site-packages/charms/reactive/bus.py", line 428, in _register_handlers_from_file
2017-11-22 10:05:37 DEBUG install _load_module(root, filepath)
2017-11-22 10:05:37 DEBUG install File "/var/lib/juju/agents/unit-manila-0/.venv/lib/python3.5/site-packages/charms/reactive/bus.py", line 416, in _load_module
2017-11-22 10:05:37 DEBUG install return importlib.import_module(package + module)
2017-11-22 10:05:37 DEBUG install File "/var/lib/juju/agents/unit-manila-0/.venv/lib/python3.5/importlib/__init__.py", line 126, in import_module
2017-11-22 10:05:37 DEBUG install return _bootstrap._gcd_import(name[level:], package, level)
2017-11-22 10:05:37 DEBUG install File "<frozen importlib._bootstrap>", line 986, in _gcd_import
2017-11-22 10:05:37 DEBUG install File "<frozen importlib._bootstrap>", line 969, in _find_and_load
2017-11-22 10:05:37 DEBUG install File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
2017-11-22 10:05:37 DEBUG install File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
2017-11-22 10:05:37 DEBUG install File "<frozen importlib._bootstrap_external>", line 665, in exec_module
2017-11-22 10:05:37 DEBUG install File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
2017-11-22 10:05:37 DEBUG install File "/var/lib/juju/agents/unit-manila-0/charm/hooks/relations/manila-plugin/provides.py", line 20, in <module>
2017-11-22 10:05:37 DEBUG install class ManilaPluginProvides(reactive.RelationBase):
2017-11-22 10:05:37 DEBUG install File "/var/lib/juju/agents/unit-manila-0/charm/hooks/relations/manila-plugin/provides.py", line 39, in ManilaPluginProvides
2017-11-22 10:05:37 DEBUG install class states(reactive.bus.StateList):
2017-11-22 10:05:37 DEBUG install File "/var/lib/juju/agents/unit-manila-0/charm/hooks/relations/manila-plugin/provides.py", line 40, in states
2017-11-22 10:05:37 DEBUG install connected = reactive.bus.State('{relation_name}.connected')
2017-11-22 10:05:37 DEBUG install AttributeError: module 'charms.reactive.bus' has no attribute 'State'
2017-11-22 10:...

Read more...

Changed in charm-manila:
milestone: none → 17.11
assignee: nobody → Alex Kavanagh (ajkavanagh)
Revision history for this message
Ryan Beisner (1chb1n) wrote :

Re-triaging as HIGH as we cannot rebuild or release this charm along with 17.11 due to the above issues.

Changed in charm-manila:
importance: Medium → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to charm-manila (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/522564

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to charm-manila (master)

Reviewed: https://review.openstack.org/522564
Committed: https://git.openstack.org/cgit/openstack/charm-manila/commit/?id=78f5fa40e27424e911d066a6eb7019a6e9170f67
Submitter: Zuul
Branch: master

commit 78f5fa40e27424e911d066a6eb7019a6e9170f67
Author: Alex Kavanagh <email address hidden>
Date: Thu Nov 23 14:22:24 2017 +0000

    Rebuild + .testr.conf -> .stestr.conf due to Bug #1718152

    The manila-plugin interface was the cause of bug #1718152. This
    is just to rebuild it and also migrate .testr.conf to .stestr.conf

    Change-Id: Icd885409acdd788438857bcacdaac109b12cbad9
    Related-Bug: #1718152
    Depends-On: Ifc025d063d5fba5f2b8b20773b4a9543f883a0ea

Changed in charm-manila:
status: Triaged → Fix Committed
Changed in charm-manila-generic:
assignee: nobody → Alex Kavanagh (ajkavanagh)
status: New → Fix Committed
importance: Undecided → High
milestone: none → 17.11
James Page (james-page)
Changed in charm-manila:
status: Fix Committed → Fix Released
Changed in charm-manila-generic:
status: Fix Committed → 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.