[actions] New feature: bundle of actions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
Juju actions are unit scoped. There are operations that require interaction between multiple units (of the same or different application). This is the case of Ceph, where mon and osd units interact with each other when performing a disk replacement.
1) run action ceph-mon/N set-noout
2) run action ceph-mon/N set-noup
3) run action ceph-mon/N osd-out <osd-id>
4) run action ceph-osd/M stop <osd-id>
5) run action ceph-mon/N crush-remove <osd-id>
6) run action ceph-mon/N auth-del <osd-id>
7) run action ceph-mon/N osd-rm <osd-id>
...
Another example is one where we check if ceph-mon/N get-health returns "HEALTH_OK", and if so, other actions are run.
Yet another example is one where multiple "backup" actions are run against different backend applications (e.g. etcd, mysql, easyrsa...)
In all these cases, an "actionbundle.yaml" definition of actions could run actions in parallel or in sequence, expecting (or not) a certain output from the actions run on previous stages. See an example at [1].
It would certainly be interesting to have coordinated actions across multiple units.
You could do this with charms today, via relation data, but it does become less of a single 'action' and more of a process. And there wouldn't be clear 'results' from the overall action. So it would be better to have a wider view of this.