Machine agents uninstall themselves upon worker.ErrTerminateAgent.

Eric Snow eric.snow at canonical.com
Fri May 6 21:26:52 UTC 2016


On Fri, May 6, 2016 at 11:37 AM, William Reade
<william.reade at canonical.com> wrote:
> On Fri, May 6, 2016 at 5:50 PM, Eric Snow <eric.snow at canonical.com> wrote:
>>
>> See https://bugs.launchpad.net/juju-core/+bug/1514874.
>
>
> Mainly, we just shouldn't do it. The only *actual reason* for us to do this
> is to support the manual provider; any other machine that happens to be dead
> will be cleaned up by the responsible provisioner in good time. There's a
> file we write to enable the suicidal behaviour when we enlist a manual
> machine, and we *shouldn't* have ever written it for any other reason.

So how about, other than the container bits, we drop the "uninstall"
code entirely.  To address the manual provider case, during that
provider's StartInstance() we add a "clean-up-juju" script somewhere
on the machine?  Then folks can use that to confidently clean up after
the fact.

> So, narrowly, fixing this involves relocating the more-widely-useful
> (in-container loop device detach IIRC?) code inside MachineAgent.uninstall;

Yep.

> I don't think we want any of this -- it's all a consequence of
> inappropriately triggering the uninstall stuff in the first place.

Yeah, if we simply did no automatic cleanup and (on manual provider)
give users a script that would let them clean up afterward, then they
could happily(?) manually repair their machines with much less
trouble.

>> * Could this lead to collisions if the instance is re-purposed as a
>> different machine?  I suppose it could also expose sensitive data when
>> likewise re-purposed, since it won't necessarily be in the same model
>> or controller.  However, given the need for admin access that probably
>> isn't a likely problem.
>
> If substrates are leaking data between separate instances, the substrate is
> screwed up, and there's not much we can do about it. The manual provider has
> no such guarantees, and that's the only justification for trying to clean up
> so drastically in the first place.

Fair enough.

-eric



More information about the Juju-dev mailing list