[2.6-rc2] juju debug-hooks doesn't trigger on juju run --unit <unitname> 'exit 0'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned |
Bug Description
It used to be that one could restart a unit agent and get a config-changed event.
Another useful way of simulating an event and getting a non-relation scoped event context while blocking other event execution is by running
juju run --unit <unitname> 'hooks/<hookname>'
Juju treats this as an action execution:
2019-05-10 20:16:11 TRACE juju.worker.
2019-05-10 20:16:11 TRACE juju.worker.
Unfortunately, having `juju debug-hooks` initialized for a unit does catch a `juju run --unit <unitname> 'hooks/<hookname>'` execution.
It would be quite useful to have that capability.
The expected behavior is that any command specified in `juju run` will not be actually run and the execution will be intercepted by debug-hooks as usual by using an alternative hook execution code-path and setting up a new tmux window.
This came up a bit during the sprint latetly and we agree that the idea of "juju run this hook and let me debug it" via manual triggering is a really useful development idea.
We won't go back to retrigging the old event that was intentionally turned off though.