Exceptions override blocked status

Bug #1899221 reported by Rodrigo Barbieri
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Charm Helpers
New
Undecided
Unassigned

Bug Description

This affects any charm that does anything similar to [0].

I assume such code intended to set the status to blocked, and raise the exception, therefore preventing the hook from finishing successfully, while the state would remain "blocked".

However the end result is currently different than that. For that specific case [0], running juju config nova-compute migration-auth-type=foo results in an error state in juju status. Upon running juju status several times while the hook is retried, I can see the message rapidly changing between "hook failed" and "Invalid migration-auth-type" (which was the intended message), but settling as "hook failed".

There are many occurrences of this throughout several charms, so I assume the breakage and fix would be in charm-helpers.

[0] https://github.com/openstack/charm-nova-compute/blob/025af8ce7201d131195aba5ed7cc3b26dbbed4a7/hooks/nova_compute_hooks.py#L195

Tags: sts
tags: added: sts
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.