There seems to be a workaround for scenarios where application with no units cannot be removed - restart the agent.
From an IRC conversation:
[22:43:36] <ivy> I think I've resolved the problem! One of the units lost the contact with the controller although the agent was alive... the juju log on the unit said:
[22:43:38] <ivy> 2017-03-23 09:46:31 ERROR juju.worker.dependency engine.go:539 "api-caller" manifold worker returned unexpected error: cannot open api: unable to connect to API: websocket.Dial [details omitted ]getsockopt: no route to host
[22:43:41] <ivy> 2017-03-23 09:46:34 ERROR juju.worker.dependency engine.go:539 "api-caller" manifold worker returned unexpected error: cannot open api: try again (try again)
[22:43:42] <ivy> I restarted the agent and after a while the relation with glance disappeared, and so did the application!
Note this does not help situations where destroy-controller fails. Offending application needs to be removed first, agent restarted and the destroy-controller should succeed.
We still need to address removal of application with no units/machine in code.
There seems to be a workaround for scenarios where application with no units cannot be removed - restart the agent.
From an IRC conversation: dependency engine.go:539 "api-caller" manifold worker returned unexpected error: cannot open api: unable to connect to API: websocket.Dial [details omitted ]getsockopt: no route to host dependency engine.go:539 "api-caller" manifold worker returned unexpected error: cannot open api: try again (try again)
[22:43:36] <ivy> I think I've resolved the problem! One of the units lost the contact with the controller although the agent was alive... the juju log on the unit said:
[22:43:38] <ivy> 2017-03-23 09:46:31 ERROR juju.worker.
[22:43:41] <ivy> 2017-03-23 09:46:34 ERROR juju.worker.
[22:43:42] <ivy> I restarted the agent and after a while the relation with glance disappeared, and so did the application!
Note this does not help situations where destroy-controller fails. Offending application needs to be removed first, agent restarted and the destroy-controller should succeed.
We still need to address removal of application with no units/machine in code.