Code review comment for lp:~danilo/landscape-charm/maintenance-hook

Revision history for this message
Free Ekanayaka (free.ekanayaka) wrote :

I'd rather implement some state-tracking/state-machine code in the charm (in a similar way we currently do for leader info, e.g storing a file with the current state), without relying on the maintenance flag file, which is kind of an implementation detail of the server. Later down the road (with juju 1.24) we'll use unit status for this, but for now tracking the state at the charm level will get us closer to that.

Also, rather than exiting the hook with non-zero, we should code "action-fail":

https://jujucharms.com/docs/devel/authors-charm-actions#action-fail

(might need a change in charmhelpers to support the new actions executables).

« Back to merge proposal