add --app option to juju run-action

Bug #1960468 reported by Joe Guo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Wishlist
Unassigned

Bug Description

Originally, juju run-action can only target on a single unit.
Bug[0] and PR[1] make it possible to run an action on multiple units, which is helpful.

[0]: https://bugs.launchpad.net/juju/+bug/1667213
[1]: https://github.com/juju/juju/pull/7244

However, it would be even better if we can run action on all units of an app.
Just like what `juju run --app` does.

An example scenario[2][3]:

- in nrpe charm, we are adding a reboot check, which will raise alert if a unknown reboot is detected via `uptime --since`
- we also add an action `ack-reboot` to acknowledge the alert, by updating the known reboot time.

This will be ok for occasional machine reboot and meet our requirement.
However, in a power outage scenario, we will need to run the action on all nrpe units to acknowledge the reboot. I would hope we can simply do this with:

    juju run-action --app nrpe ack-reboot

(Or other similar function like discussed in the PR[1])

[2]: https://bugs.launchpad.net/charm-nrpe/+bug/1952787
[3]: https://code.launchpad.net/~guoqiao/charm-nrpe/+git/nrpe-charm/+merge/413385

Changed in juju:
importance: Undecided → Wishlist
milestone: none → 2.9-next
Changed in juju:
status: New → Triaged
Revision history for this message
Tom Haddon (mthaddon) wrote :

I agree this would be nice. Or a `juju run-action app/all` to go along with the current syntaxt of `juju run-action app/leader`.

Ian Booth (wallyworld)
Changed in juju:
milestone: 2.9-next → none
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.