support juju actions directly

Bug #1698983 reported by Paul Collins
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mojo: Continuous Delivery for Juju
Triaged
Wishlist
Unassigned

Bug Description

Mojo should support Juju actions directly. [half-baked design ideas elided]

Pre-2.2 actions were a little awkward to use, since "juju run-action" would exit immediately and the operator had to poll Juju until it had completed. Since 2.2, these various action-related commands have a --wait option (with a timeout!) that Mojo could use.

Juju pre-2.2 could be supported more easily by importing Stuart Bishop's juju-act plugin (lp:juju-act) but I imagine that Juju 2.2 will become the version most folks use fairly quickly.

Revision history for this message
Tom Haddon (mthaddon) wrote :

Without getting into design ideas, can you give me an idea of how you see this working? Would it be a phase to run a juju action? What would you do with the output?

Revision history for this message
Paul Collins (pjdc) wrote :

The actions I presently want to invoke are

juju run-action postgresql/0 wal-e-backup --wait
juju run-action postgresql/0 wal-e-restore --wait storage-uri=swift://staging-vault-postgresql-wal-e-backup/ confirm=true

In a manifest, these actions could look something like this:

juju-run-action postgresql wal-e-backup
juju-run-action postgresql wal-e-restore storage-uri=swift://staging-vault-postgresql-wal-e-backup/ confirm=true

I imagine it would behave like the script phase: log the results, continue on success. It'd also be helpful if you could specify just the application name to let Mojo pick a unit, since in operational cases we may not know which units will exist when we write the manifest. More complex cases that require doing something with the action's results should probably just be regular scripts.

Junien F (axino)
Changed in mojo:
status: New → Triaged
importance: Undecided → Wishlist
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.