juju destroy-service command destroys the machine if the machine hosts only the service that is being destroyed.

I find it an inconvenience because:

  1. it does something unexpected
  2. there is an explicit destroy-machine command
  3. I would like to reuse the machine
  4. the data, the logs

Is there a reason for the way it is, and is there a workaround?


I'm new to juju but what I do to prevent this is by deploying an ubuntu charm on that machine and then deploying the service on it. So, first assign a tag in MAAS UI to that node and deploy ubuntu charm

$ juju deploy ubuntu --constraints tags=<tag that you set>

A new node will be up with ubuntu charm. Now deploy the service that you want.

$ juju deploy <your charm url> --to <newly added machine id>

P.S setting a tag to node is optional.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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