Comment 1 for bug 1464470

Revision history for this message
Gabriel Samfira (gabriel-samfira) wrote :

This I believe happens because of the way hooks are run. The hook run has been split up in 3 steps:

* prepare
* execute
* commit

During prepare, the state of the hook is written, but we only start locking for hook execution in the "execute" phase. So we can have one hook that requires a reboot executing, and another one finishing the prepare phase, ready to execute. If we reboot the machine, when the uniter comes back up, it will see the second hook in the preparing phase, but has no knowledge of this happening, and sets it in error state.

I think this can be fixed by simply locking in the prepare phase and unlocking after execute, instead of locking in execute.