remove-machine: tell user of unit/storage changes #7108

Merged
merged 1 commit into from Mar 16, 2017

Conversation

Projects
None yet
3 participants
Member

axw commented Mar 16, 2017

Description of change

Introduce the MachineManager.(Force)DestroyMachines
methods, and use them in "juju remove-machine". We
will continue to use the existing Client facade
methods when the MachineManager facade is not new
enough.

Using the new methods, we print out the names of
units and storage that will be destroyed or detached
when removing the machine.

QA steps

(with juju 2.0)

  1. juju bootstrap localhost
    (with juju from this branch)
  2. juju deploy ubuntu
  3. juju remove-machine 0 --force
  4. juju upgrade-juju -m controller --build-agent
  5. juju add-unit ubuntu
  6. juju remove-machine 1
    (fails, because there's a unit assigned)
  7. juju remove-machine --force 1
    prints out:
removing machine 1
- will remove unit ubuntu/1
  1. juju deploy postgresql --storage pgdata=rootfs
  2. juju remove-machine --force 2
    prints out:
removing machine 2
- will remove unit postgresql/0
- will remove storage pgdata/0

Documentation changes

Affects output of remove-machine command, so examples may need updating.

Bug reference

None.

We'll need to get CI tests updated. Can you add a card to the board and we'll talk to Burton.

Member

axw commented Mar 16, 2017

$$merge$$

Contributor

jujubot commented Mar 16, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

Contributor

jujubot commented Mar 16, 2017

Build failed: Tests failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/10475

remove-machine: tell user of unit/storage changes
Introduce the MachineManager.(Force)DestroyMachines
methods, and use them in "juju remove-machine". We
will continue to use the existing Client facade
methods when the MachineManager facade is not new
enough.

Using the new methods, we print out the names of
units and storage that will be destroyed or detached
when removing the machine.
Member

axw commented Mar 16, 2017

$$merge$$

Contributor

jujubot commented Mar 16, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

@jujubot jujubot merged commit 00273fd into juju:develop Mar 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment