Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There are 2 parts to the question

  1. Does the destroy-service command results in the stop hook being called for Juju?
  2. In case of Amazon EC2 machine instances what state (Terminate or Stop) are they put into when the stop hook completes its execution?
share|improve this question
up vote 1 down vote accepted
  1. juju destroy-service should call the service's stop hook, but doesn't. It's a bug

  2. The state that the corresponding machine is left in is provider-specific... for EC2, the machine is cleaned up (remove charm) and set to be re-used by juju for another service or service unit. As such, the EC2 state of running is not changed. For LXC, destroy-service removes the associated container entirely (without calling stop first!).

share|improve this answer
Does that mean that if we want to stop the running machines in EC2 we have to so externally - I mean issue a command using EC2 API or use its web console? That juju doesnot support anything equivalent? – Antojk Aug 10 '12 at 8:52
Since Juju provisioned these machines wouldn't it be advisable that there should be an option to terminate/stop the same, with a different command than environment-destroy. I believe that would immensely improve Juju's capability as a provisioning service – Antojk Aug 10 '12 at 9:15
I am willing to raise this as a bug or/and work on the juju source to achieve the same. However a spec consensus is reqd before I can release into the juju trunk – Antojk Aug 10 '12 at 9:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.