openstack-integrator: type object 'LoadBalancer' has no attribute 'get_all'

Bug #1848610 reported by Adam Bell
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Openstack Integrator Charm
Fix Released
Undecided
Edward Hope-Morley

Bug Description

In a Juju deployment for openstack-integrator (version "rocky", rev 31), I came across the following stacktrace while trying to delete the charm:

Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-openstack-integrator-0/.venv/lib/python3.6/site-packages/charms/reactive/__init__.py", line 74, in main
    bus.dispatch(restricted=restricted_mode)
  File "/var/lib/juju/agents/unit-openstack-integrator-0/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 379, in dispatch
    _invoke(hook_handlers)
  File "/var/lib/juju/agents/unit-openstack-integrator-0/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 359, in _invoke
    handler.invoke()
  File "/var/lib/juju/agents/unit-openstack-integrator-0/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 181, in invoke
    self._action(*args)
  File "/var/lib/juju/agents/unit-openstack-integrator-0/charm/reactive/openstack.py", line 129, in cleanup
    layer.openstack.cleanup()
  File "lib/charms/layer/openstack.py", line 143, in cleanup
    for lb in LoadBalancer.get_all():
AttributeError: type object 'LoadBalancer' has no attribute 'get_all'

Upon looking at the "LoadBalancer" class in the charm's lib/charms/layer/openstack.py file, it looks like there truly is no "get_all" method that was written for a "LoadBalancer".

Changed in charm-openstack-integrator:
status: New → Confirmed
Changed in charm-openstack-integrator:
assignee: nobody → Edward Hope-Morley (hopem)
status: Confirmed → In Progress
Revision history for this message
Edward Hope-Morley (hopem) wrote :
Revision history for this message
Edward Hope-Morley (hopem) wrote :

Amendment to my original comment:

I also hit this when trying to figure out why LBs are not deleted when I destroy my k8s model. This needs fixing so that when a k8s model is destroyed we DO NOT leave the LBs behind.

Changed in charm-openstack-integrator:
status: In Progress → Fix Committed
milestone: none → 1.17
Revision history for this message
Edward Hope-Morley (hopem) wrote :

Hi @tvansteenburgh can we please get a build of the charm (edge?) that includes this fix?

Revision history for this message
Tim Van Steenburgh (tvansteenburgh) wrote :

cs:~containers/openstack-integrator-45 is on edge currently, and will move to stable with the 1.17 release coming soon.

Revision history for this message
Edward Hope-Morley (hopem) wrote :

@tvansteenburgh -45 doesn't contain this fix unfortunately

Revision history for this message
Tim Van Steenburgh (tvansteenburgh) wrote :

Ahhh, right. Okay, will fix/rebuild and let you know.

Revision history for this message
Edward Hope-Morley (hopem) wrote :

@tvansteenburgh thanks just seen -46 that contains the fix

Revision history for this message
Kevin W Monroe (kwmonroe) wrote :

@Ed, yup, the stable branch of our fork (which is what this charm is built from) is now in sync with the upstream repo:

https://github.com/charmed-kubernetes/charm-openstack-integrator/tree/stable

You correctly found the newly built rev 46 that contains this fix. That's currently in edge/beta and will move to stable when 1.17 is released.

Changed in charm-openstack-integrator:
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.