Is it possible to return management to Juju after manual provision of a machine?

Andrew Wilkins andrew.wilkins at
Thu Jun 29 22:15:50 UTC 2017

On Fri, Jun 30, 2017 at 7:39 AM N. S. <n5pascal at> wrote:

> Hi,
> Excuse me if this seems a strange scenario.
> My scenario is as follows:
> I have a charm that has lots of problems in its install script, needs
> massive change (NOT SURE how to fix it)
> So,
> I added an empty machine by
> Juju add-machine --series Xenial
> And then I logged into it by
> Juju SSH 9
> And
> I provisioned it (installed some software on it).
> Now,
> Is it possible to get it back to Juju among the units and the applications?
> How?

You can "juju deploy <charm> --to 9" to deploy the application unit to the
"empty" machine. It'll be up to your charm to know how to deal with the
existing software.

Other hooks are probably fine, how to integrate them in the machine?

Hooks are expected to be idempotent, because they may run more than once
(Juju guarantees at-least-once). So the install hook should be written in a
way that it won't fail if the software is already failed.

> Thanks,
> BR
> --
> Juju mailing list
> Juju at
> Modify settings or unsubscribe at:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Juju mailing list