add --app option to juju run-action
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:/
[1]: https:/
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:/
[3]: https:/
Changed in juju: | |
importance: | Undecided → Wishlist |
milestone: | none → 2.9-next |
Changed in juju: | |
status: | New → Triaged |
Changed in juju: | |
milestone: | 2.9-next → none |
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`.