Better messages around destroy / kill-controller

Bug #1563611 reported by Richard Harding
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
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

Revision history for this message
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
Revision history for this message
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
"""

Revision history for this message
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)
Changed in juju:
milestone: 2.0.1 → none
Ian Booth (wallyworld)
tags: added: teardown
Changed in juju:
status: Triaged → Fix Committed
milestone: none → 2.6-rc2
Revision history for this message
Anastasia (anastasia-macmood) wrote :

Too many links open... This was meant for another bug :) I'll hide my previous comment.

Changed in juju:
status: Fix Committed → Triaged
milestone: 2.6-rc2 → none
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 2 years, so we're marking it Low importance. If you believe this is incorrect, please update the importance.

Changed in juju:
importance: High → Low
tags: added: expirebugs-bot
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.