juju disable-command all includes run-action

Bug #1794891 reported by Xav Paice
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Wishlist
Tim McNamara

Bug Description

Actions in charms are deemed 'safe' and standard operations, and therefore should not be disabled by disable-command all (or, an exception should be available for them). For example:

jujumanage@ragana:~$ juju run-action --wait mysql/2 backup
unit-mysql-2:
  id: ed06d1cb-8bad-4cee-821c-9f88bc83e62d
  results:
    outcome: Success
    time-completed: 2018-09-27 23:19:20
  status: completed
  timing:
    completed: 2018-09-27 23:19:10 +0000 UTC
    enqueued: 2018-09-27 23:19:01 +0000 UTC
    started: 2018-09-27 23:19:02 +0000 UTC
  unit: mysql/2
jujumanage@ragana:~$ juju disable-command all
jujumanage@ragana:~$ juju run-action --wait mysql/2 backup
ERROR the operation has been blocked (operation is blocked)
jujumanage@ragana:~$ juju run-action --force --wait mysql/2 backup
ERROR flag provided but not defined: --force
jujumanage@ragana:~$ juju enable-command run-action
ERROR bad command set, valid options: all, destroy-model, remove-object

Revision history for this message
Richard Harding (rharding) wrote :

Thanks, this is tough as folks tend to think of locked when the disable all is there. I agree that allowing an opening of things from there for actions is appropriate.

Changed in juju:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Chris Sanders (chris.sanders) wrote :

I'd like to point out, this isn't just how a user would expect it to work. This is also how it's documented to work: https://docs.jujucharms.com/2.4/en/juju-block

This is a pretty important distinction for operations teams, can this be fixed to match the documentation?

Revision history for this message
Anastasia (anastasia-macmood) wrote :

@Chris Sanders (chris.sanders),

Is it possible for you to describe the use case where you want to run actions on a blocked model? Also what actions would that be?

I am not convinced that our documentation dictates, or even describes, what Juju does... Some documentation plays catch up with the product :D However, I have re-read the page you have linked and am not sure which extract you refer to when concluding that actions can be run on a blocked model. Could you please quote the passage that states that?

Revision history for this message
Andrea Ieri (aieri) wrote :

Hi Anastasia, in the command groups table[0] there is no mention of "run-action", which would imply that actions can always be run. This is however not the case.

In terms of use cases, Xav's example is very relevant to us: locking down the model is very desirable for security, but it is cumbersome to have to unblock/re-block whenever we want to backup mysql.

[0] https://docs.jujucharms.com/2.4/en/juju-block#commands-within-each-enable-and-disable-group

Revision history for this message
Tim McNamara (tim-clicks) wrote :

juju run-action is being modified to bypass blocking[0]. We're aiming to have this landed in a release candidate shortly.

[0]: https://github.com/juju/juju/pull/10103

Changed in juju:
status: Triaged → In Progress
milestone: none → 2.6-rc1
assignee: nobody → Tim McNamara (tim-clicks)
Changed in juju:
milestone: 2.6-rc1 → 2.6-rc2
Tim Penhey (thumper)
Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
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.