robinhood icon indicating copy to clipboard operation
robinhood copied to clipboard

Static systemd unit files

Open ghost opened this issue 7 years ago • 5 comments

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?

ghost avatar Mar 09 '18 13:03 ghost

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.

tl-cea avatar Mar 09 '18 13:03 tl-cea

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.

ghost avatar Mar 09 '18 14:03 ghost

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.

tl-cea avatar Mar 09 '18 15:03 tl-cea

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 avatar Mar 09 '18 15:03 ghost

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.

ghost avatar Jul 09 '18 14:07 ghost