kill-controller fails with "ERROR getting controller environ: unable to get bootstrap information from client store or API" when controller is no longer running (on OpenStack)

Bug #1668792 reported by Jason Hobbs
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Invalid
High
Unassigned

Bug Description

I'm trying to kill a controller that shows up in my controllers list, but juju fails to do so:

http://paste.ubuntu.com/24086765/

It's an OpenStack controller, and in this case, the machines that were running OpenStack are no longer around, so juju can't reach the controller or OpenStack at all. It's easy to reproduce by adding an openstack controller in your controllers.yaml that has IPs that can't be reached.

We rely on kill-controller always working and if it doesn't, it hangs up or automation.

Here is my controllers.yaml:
https://pastebin.canonical.com/180985/

This is with 2.1.0-0ubuntu1~16.04.1~juju1

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

@Jason Hobbs,
Could you please attach 'juju status --format=yaml' for that controller? [ci-oil-slave4-openstack-RegionOne]

As well as controller logs?

Anything in addition you can share about this openstack? mitaka? v3 auth?...

Thank you for the report!

Changed in juju:
status: New → Incomplete
Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

Anastasia,

juju status just hangs because the controller is no longer around, and there are no controller logs for the same reason. It appears the client errors out when it can't reach the controller, instead of continuing and removing the local information about the controller.

description: updated
Changed in juju:
status: Incomplete → New
summary: kill-controller fails with "ERROR getting controller environ: unable to
- get bootstrap information from client store or API"
+ get bootstrap information from client store or API" when controller is
+ no longer running (on OpenStack)
tags: added: cdo-qa-blocker
Revision history for this message
Tim Penhey (thumper) wrote :

If running in a terminal, kill-controller should ask whether to continue when it gets an error attempting to deal with the killing of the environment directly.

A command line option should also be able to be specified to effectively skip the ask and just continue (like the --yes), perhaps something like --clean-broken.

tags: added: sprint
Changed in juju:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

Tim, this breaks our CI automation so it is a high priority for us to get this fixed.

Changed in juju:
milestone: none → 2.2-beta1
importance: Medium → High
description: updated
Changed in juju:
milestone: 2.2-alpha1 → 2.2-beta1
Revision history for this message
John A Meinel (jameinel) wrote :

I think we want kill-controller to exit non-zero if it can't actually find something to kill. With human interaction, it is reasonable to ask a human to validate their assumptions and make sure they know what they're doing with the controller.

For scripting, you should be able to do:

  juju kill-controller -y foo || juju unregister -y foo

Which falls back to just removing the controller from your local registry no matter what.

Changed in juju:
milestone: 2.2-beta1 → none
Changed in juju:
status: Triaged → Incomplete
Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

Ok I agree - unregister is fine.

Changed in juju:
status: Incomplete → Invalid
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.