New command to block/unblock operations

Bug #1394069 reported by Anastasia
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Docs
Fix Released
Medium
Nick Veitch

Bug Description

 New juju commands were added to allow users to block/unblock destroy-environment operations.

When desired, the users can run

juju block destroy-environment

This will prevent "juju destroy-environment" from running successfully.

When users intend to destroy environment, they will have to explicitly unblock the operation by first running

juju unblock destroy-environment

Note that forcing destroy will by-pass block.

no longer affects: juju-core
Revision history for this message
Anastasia (anastasia-macmood) wrote :

There is also new option added to block/unblock command to prevent accidental termination of objects such as machines, services, units and relations.

When this block is desired, the users can run

juju block remove-object

This will block all termination commands from running successfully. Current juju termination commands could be any of these forms - "juju remove-machine... ", "juju remove-service... ", "juju remove-unit... ", "juju remove-relation... ", "juju destroy-machine... ", "juju destroy-service... ", "juju destroy-unit... ", "juju destroy-relation... " and "juju terminate-machine..."

When users intend to remove machine, service, unit or relation from the environment where there is this block, they will have to explicitly unblock remove-object operation by first running

juju unblock remove-object

Note that forcing machine removal will also by-pass this block. However, this is one of the assumption that I have made.

There is no "force" to by-pass when removing service, unit or relation.

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

another type of block was added - to block all commands that change current environment.

To sum up:

destroy-environment includes command:
    destroy-environment

remove-object includes termination commands:
    destroy-environment
    remove-machine
    remove-relation
    remove-service
    remove-unit

all-changes includes all alteration commands
    add-machine
    add-relation
    add-unit
    authorised-keys add
    authorised-keys delete
    authorised-keys import
    deploy
    destroy-environment
    expose
    remove-machine
    remove-relation
    remove-service
    remove-unit
    resolved
    retry-provisioning
    run
    set
    set-constraints
    set-env
    unexpose
    unset
    unset-env
    upgrade-charm
    upgrade-juju
    user add
    user change-password
    user disable
    user enable

For more information, please run

juju help block
juju help unblock

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

Command added to all-changes block:
ensure-availability

Revision history for this message
Nick Veitch (evilnick) wrote : Re: [Bug 1394069] [NEW] New command to block/unblock operations

cool, thanks for this. Is this in the current release?

On Wed, Nov 19, 2014 at 4:17 AM, Anastasia
<email address hidden> wrote:
> Public bug reported:
>
> New juju commands were added to allow users to block/unblock destroy-
> environment operations.
>
> When desired, the users can run
>
> juju block destroy-environment
>
> This will prevent "juju destroy-environment" from running successfully.
>
> When users intend to destroy environment, they will have to explicitly
> unblock the operation by first running
>
> juju unblock destroy-environment
>
> Note that forcing destroy will by-pass block.
>
> ** Affects: juju-core/docs
> Importance: Undecided
> Status: New
>
> ** Also affects: juju-core/docs
> Importance: Undecided
> Status: New
>
> ** No longer affects: juju-core
>
> --
> You received this bug notification because you are subscribed to docs.
> Matching subscriptions: docs-bugs
> https://bugs.launchpad.net/bugs/1394069
>
> Title:
> New command to block/unblock operations
>
> Status in juju-core docs series:
> New
>
> Bug description:
> New juju commands were added to allow users to block/unblock destroy-
> environment operations.
>
> When desired, the users can run
>
> juju block destroy-environment
>
> This will prevent "juju destroy-environment" from running
> successfully.
>
> When users intend to destroy environment, they will have to explicitly
> unblock the operation by first running
>
> juju unblock destroy-environment
>
> Note that forcing destroy will by-pass block.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju-core/docs/+bug/1394069/+subscriptions

--
Nick Veitch
<email address hidden>

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.