What are the best practices for stop hook handling?
jacek.nykis at canonical.com
Thu Oct 20 08:32:54 UTC 2016
On 19/10/16 16:15, Marco Ceppi wrote:
>> 2. Don't colocate units if at all possible. In separate containers on the
>> same machine, sure. But there's absolutely no guarantee that colocated
>> units won't conflict with each other. What you're asking about is the very
>> problem colocation causes. If both units try to take over the same port, or
>> a common service, or write to the same file on disk, etc... the results
>> will very likely be bad. Stop hooks should clean up everything they
>> started. Yes, this may break other units that are colocated, but the
>> alternative is leaving machines in a bad state when they're not colocated.
> Colocation is a rare scenario, a more common one is manual provider.
Subordinate charms only make sense when collocated. And I would argue
that subordinates are extremely common, at least in production environments.
In any production deployment I expect some form of monitoring (nrpe,
telegraf). Many deployments will also use logstash-forwarder,
landscape-client, ntp, container-log-archive and other subordinate charms.
So you are looking at 3-4 or more services on each juju machine,
including LXC/LXD guests and manually provisioned systems.
In this context clean up is very important because it's not unusual for
operators to switch technologies. For example replace telegraf with
node-exporter or collectd.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 299 bytes
Desc: OpenPGP digital signature
More information about the Juju