Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying Juju on Azure and I have installed quite a few services that I have now destroyed to keep only the minimum services. But now I can see I have 8 virtual machines created on Azure while I have reduced the number of services to just 4. So I guess when Juju needs a new machine it creates it but then destroying the service did not destroy the machine it was running on. How can I do some cleanup? I would like to know which machines are unused and destroy them.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Doing a juju status will show you all the machines running. It depends on which commands you run:

juju destroy-service <service-name>

will destroy only the service. You probably want either:

juju destroy-unit

or

juju destroy-machine

To clean up what you have you probably can do a juju status, see which machines are not assigned to services, and then destroy those by referrring them by number, like: juju destroy-machine 3 as an example.

All of these are documented here:

share|improve this answer
    
thanks the command line makes sense indeed, I destroyed them in the GUI without knowing what was going on underneath. –  Bastian Oct 3 '13 at 13:34
    
Huh, and the GUI left the machines over? –  Jorge Castro Oct 3 '13 at 13:42
    
well apparently yes, I'm no expert yet so take my words with caution but I clicked the 'destroy' button, the service disappeared and in juju status I can see all the machines. –  Bastian Oct 3 '13 at 13:54
    
something interesting from the docs: 'To prevent accidents and awkward moments with running services, it is not possible to remove an instance which is currently allocated to a service.' So I can go ahead and try to destroy everything, only the machines that can be safely destroyed will be affected. –  Bastian Oct 3 '13 at 13:55
    
ouch I did not even realize the juju status gives the corresponding machine number of every service :) –  Bastian Oct 3 '13 at 14:00
show 2 more comments

Your Answer

 
discard

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.