Better messages around destroy / kill-controller

Bug #1563611 reported by Richard Harding on 2016-03-30
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
juju
High
Unassigned

Bug Description

The output during destroy-controller is too verbose and hides the error message. For instance, I got:

     juju destroy-controller b3aws
    WARNING! This command will destroy the "local.b3aws" controller.
    This includes all machines, services, data and other resources.

    Continue [y/N]? y
    ERROR failed to destroy controller "local.b3aws"

    If the controller is unusable, then you may run

        juju kill-controller

    to forcibly destroy the controller. Upon doing so, review
    your model provider console for any resources that need
    to be cleaned up.
    ERROR cannot destroy controller: controller model cannot be destroyed before all other models are destroyed

I think the kill-controller note should be in help only and not during the output here so that this can be reduced and the "ERROR" is more prominent in the output.

     juju destroy-controller b3aws
    WARNING! This command will destroy the "local.b3aws" controller.
    This includes all machines, services, data and other resources.

    Continue [y/N]? y
    ERROR failed to destroy controller "local.b3aws": controller model cannot be destroyed before all other models are destroyed

Cheryl Jennings (cherylj) wrote :

I would suggest that we do mention 'kill-controller' for the cases where we fail to connect to the controller.

tags: added: juju-release-support
Changed in juju-core:
status: New → Triaged
importance: Undecided → High
Changed in juju-core:
milestone: none → 2.0.1
summary: - juju destroy-controller hides error message when multiple models exist
+ Better messages around destroy / kill-controller
Andrew Wilkins (axwalk) wrote :

This will be partially addressed by https://github.com/juju/juju/pull/5048. When you have a non-empty hosted model, you'll get:

"""
juju destroy-controller ctrl
WARNING! This command will destroy the "local.ctrl" controller.
This includes all machines, services, data and other resources.

Continue [y/N]? y
ERROR cannot destroy controller "local.ctrl"

The controller has live hosted models. If you want
to destroy all hosted models in the controller,
run this command again with the --destroy-all-models
flag.

Models:
        admin@local/default (alive), 1 machine
"""

Richard Harding (rharding) wrote :

Thanks Andrew. I think we still want to keep this open and try to simplify the output and not ask for confirmation for something we're not going to let the user do.

    juju destroy-controller ctrl
    ERROR cannot destroy controller "local.ctrl"

    The controller has live hosted models. If you want
    to destroy all hosted models in the controller,
    run this command again with the --destroy-all-models
    flag.

    Models found:
            admin@local/default (alive), 1 machine

tags: added: usability
affects: juju-core → juju
Changed in juju:
milestone: 2.0.1 → none
milestone: none → 2.0.1
Curtis Hovey (sinzui) on 2016-10-28
Changed in juju:
milestone: 2.0.1 → none
Ian Booth (wallyworld) on 2019-02-19
tags: added: teardown
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers