lib/charms/apt.py install_queued causing traceback when unit in error state
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Apt layer |
Fix Released
|
High
|
Stuart Bishop | ||
PostgreSQL Charm |
Fix Released
|
High
|
Stuart Bishop |
Bug Description
apt.py library issue is causing an infinite error state for failed hooks on juju 2.4.1.
From the below traceback you can see that lib/charms/apt.py line 127 is calling a set_status with state None which causes the set_status routine to query the unit's current state for status. I'd recommend that when running an apt installation, the state should be shifted to "maintenance" to give a non-error status when running a resolved --retry on update-status.
This does seem a potential regression in juju not allowing the units to set an error state.
root@landscapes
none
Traceback (most recent call last):
File "hooks/
main()
File "/var/lib/
bus.
File "/var/lib/
_invoke(
File "/var/lib/
handler.
File "/var/lib/
self.
File "/var/lib/
charms.
File "lib/charms/
status_
File "lib/charms/
hookenv.
File "/var/lib/
'{!r} is not a valid workload state'.
ValueError: 'error' is not a valid workload state
root@landscapes
error
root@landscapes
root@landscapes
error
Changed in layer-apt: | |
status: | Triaged → Fix Released |
assignee: | nobody → Stuart Bishop (stub) |
Changed in postgresql-charm: | |
status: | Triaged → Fix Released |
Changed in postgresql-charm: | |
assignee: | nobody → Stuart Bishop (stub) |
This is actually a bug in apt.py layer caused by a juju regression. Filed as: https:/ /github. com/stub42/ layer-apt/ issues/ 3