kill-controller should always work to bring down a controller
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Tim Penhey | ||
juju-ci-tools |
Fix Released
|
Undecided
|
Andrew James Beach |
Bug Description
There may be cases where kill-controller is used to bring down a broken controller and it never completes. In my case, I had a service which never had a machine provisioned for it (see bug #1566420). I tried to kill the controller, but it stuck in a loop, waiting for the service to be removed (which it never would be):
ubuntu@
WARNING! This command will destroy the "local.lxd" controller.
This includes all machines, services, data and other resources.
Continue [y/N]? y
Destroying controller "local.lxd"
Waiting for resources to be reclaimed
Waiting on 1 model, 2 services
Waiting on 1 model, 2 services
Waiting on 1 model, 2 services
Waiting on 1 model, 2 services
Waiting on 1 model, 2 services
Waiting on 1 model, 2 services
Waiting on 1 model, 2 services
Waiting on 1 model, 2 services
<repeated until I Ctrl+C>
It would be nice if kill-controller had some sort of timeout when destroying through the API and would fall back to destroying through the provider if the "nice" way didn't complete in a timely manner.
Changed in juju-core: | |
milestone: | 2.0-beta4 → 2.0.1 |
tags: | added: rc1 usability |
Changed in juju-core: | |
milestone: | 2.0.1 → 2.0-beta7 |
Changed in juju-core: | |
milestone: | 2.0-beta7 → 2.0-beta8 |
Changed in juju-core: | |
milestone: | 2.0-beta8 → 2.0-beta9 |
Changed in juju-core: | |
assignee: | nobody → Anastasia (anastasia-macmood) |
assignee: | Anastasia (anastasia-macmood) → nobody |
Changed in juju-core: | |
milestone: | 2.0-beta9 → 2.0-beta10 |
Changed in juju-core: | |
milestone: | 2.0-beta10 → 2.0-beta11 |
Changed in juju-core: | |
milestone: | 2.0-beta11 → 2.0-beta12 |
Changed in juju-core: | |
milestone: | 2.0-beta12 → 2.0-beta13 |
tags: | added: oil |
tags: | added: oil-2.0 |
tags: | added: 2.0 |
Changed in juju-core: | |
milestone: | 2.0-beta13 → 2.0-beta14 |
Changed in juju-core: | |
milestone: | 2.0-beta14 → 2.0-beta15 |
Changed in juju-core: | |
milestone: | 2.0-beta15 → 2.0-beta16 |
Changed in juju-core: | |
milestone: | 2.0-beta16 → 2.0-beta17 |
affects: | juju-core → juju |
Changed in juju: | |
milestone: | 2.0-beta17 → none |
milestone: | none → 2.0-beta17 |
Changed in juju: | |
milestone: | 2.0-beta17 → 2.0-beta18 |
Changed in juju: | |
importance: | High → Critical |
Changed in juju: | |
assignee: | nobody → Tim Penhey (thumper) |
Changed in juju: | |
importance: | Critical → High |
Changed in juju: | |
milestone: | 2.0-beta18 → 2.0-rc1 |
Changed in juju: | |
status: | New → Triaged |
Changed in juju: | |
milestone: | 2.0-rc1 → 2.0-rc2 |
Changed in juju: | |
status: | Triaged → In Progress |
Changed in juju: | |
status: | In Progress → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
tags: | added: gap |
tags: | added: eda |
Changed in juju-ci-tools: | |
assignee: | nobody → Andrew James Beach (andrewjbeach) |
status: | New → Fix Released |
For others hitting this issue - a workaround is to terminate the controller instance through the provider, then try to kill-controller again.
Example with lxd: ip-172- 31-18-222: ~$ juju2 status -m lxd:admin
# Find the instance ID for the controller machine:
ubuntu@
[Services]
NAME STATUS EXPOSED CHARM
ubuntu unknown false cs:trusty/ubuntu-7
[Units]
ID WORKLOAD-STATUS JUJU-STATUS VERSION MACHINE PORTS PUBLIC-ADDRESS MESSAGE
ubuntu/0 unknown allocating Waiting for agent initialization to finish
[Machines] 9bfd-4d01- 8be6-34d9bbd089 b8-machine- 0 xenial
ID STATE DNS INS-ID SERIES AZ
0 started 10.0.3.189 juju-7ff01eeb-
# Stop the instance 9bfd-4d01- 8be6-34d9bbd089 b8-machine- 0
$ lxc stop juju-7ff01eeb-
# Retry kill-controller
$ juju2 kill-controller lxd
WARNING! This command will destroy the "local.lxd" controller.
This includes all machines, services, data and other resources.
Continue [y/N]? y
Unable to open API: open connection timed out
Unable to connect to the API server. Destroying through provider.