cea-hpc / robinhood

Robinhood Policy Engine : a versatile tool to monitor filesystem contents and schedule actions on filesystem entries.
http://robinhood.sf.net
Other
182 stars 62 forks source link

Static systemd unit files #88

Open ghost opened 6 years ago

ghost commented 6 years ago

The systemd unit files as shipped with RobinHood version 3.1 are static, ie. lack an Install section. Therefore, RobinHood instances can only be started explicitly, or as a dependency from another, custom unit file. Has this been done intentionally, or should RobinHood be able to automatically start on boot by default like in non-systemd environments?

tl-cea commented 6 years ago

Nice to ear from you :-) Most of the time admins don't want robinhood to start on boot to make sure to mount the filesystem before.

ghost commented 6 years ago

Hi Thomas, good to hear you, too! Thanks for the quick response. In this case, wouldn't it be more straightforward to install the service, and default to disabled (which at least on EL7 seems to be the default, anyway). This way, one can systemctl enable/disable robinhood.service as desired whereas in the current setup, one has to add a drop-in or a dummy service.

tl-cea commented 6 years ago

This sounds good. It is true we saw this static service is disappointing for puppet that considers "static" as enabled. Could you provide us with an example of such Install section? I'm not a systemd expert, so if you can give me the right config, it will be faster. I'll be glad to integrate your proposal.

ghost commented 6 years ago

Sure, I'll send you a PR when I'm done. (And, yes, I started looking into this because our configuration management tools are unhappy with static services as well.)

ghost commented 6 years ago

Finally managed to upload the versions we've been running for a while, cf. https://review.gerrithub.io/c/cea-hpc/robinhood/+/418699 for a simple version, and https://review.gerrithub.io/c/cea-hpc/robinhood/+/418704 with more systemd magic, but also additional naming restrictions.