New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add multiple execstarts by converting $execstart to array, #32
Conversation
…e settings to default values
Hi,
but:
regards, |
I'll check both your points and will come back to it :-)
- the third commit was because I added an additional umask parameter - i overlooked that it was already implemented - so umask is still part of the PR
- for the default values: i looked them up on the documentation because i had some issues regarding the default behaviour of the services and noticed that the defaults used in this lib differ from the systemd defaults
if i should remove the changing of the default values for you to accept the PR, i would do so - but hope you would add them in a new major version.
These are the defaults of systemd:
Restart=
the valid default for "restart" is "no" (https://www.freedesktop.org/software/systemd/man/systemd.service.html#Restart=)
WantedBy=
is part of the [Install] Section wich - per definits is completely optional and shouldn't have values set as default
(https://www.freedesktop.org/software/systemd/man/systemd.unit.html#%5BInstall%5D%20Section%20Options)
StandardOutput= , StandardError=
The default values of systemd are "inherit" for StandardError and "journal" for StandardOutput
(https://www.freedesktop.org/software/systemd/man/systemd.exec.html#StandardOutput=
https://www.freedesktop.org/software/systemd/man/systemd.exec.html#StandardError= )
|
Hey! Great thought. I would have done it myself, but I had no time. The new major thing sounds great. For further information about versioning for puppet modules, you can have a read here: https://docs.puppet.com/puppet/latest/bgtm.html#versioning-your-module
Thanks for you awesome plugin and your development, by the way. It really helps me out at this point :) I forgot about the metadata.json, in which people can also freeze their versions of the module until the have adapted the code. ;) |
Hi, I think here we are intending to provide "safe defaults" instead of just use systemd's defaults. I don't want to force people to add "wantedby => [ 'multi-user.target' ]," specially since this was the default in this module since day 1. I've updated the documentation I'm closing this PR since it's partially merged thanks, |
hey. Thanks for merging, even though it was only partially. To you comment:
Yes and no. If I use a module, I do not want it to make a configuration that is any different from the defaults that the tool I am using, defines. Great that you mentioned it in the documentation, though. Now people will know about it, if they read the docs. I'd would also appreciated if you reconsider this structure in your commit: 4bd7f3d#diff-2f31c46d567c1cc049875d41d88a144fR26 You are pressing extensive logic into a TEMPLATE file here. A template is a mere string in which you should only search and replace some variables. It that includes a loop, it is okay, but it should not include extensive conditional structures. Regarding these two changes: https://github.com/NTTCom-MS/eyp-systemd/pull/32/files#diff-2f31c46d567c1cc049875d41d88a144fL42 You did not even address them in your commit. Do not hard code anything in the template, please. You are taking away the change for the users of your plugin, to modify it at will. I hope you reconsider these changes.
To this I can only point back to my last comment, in which I have linked to the versioning page. It includes the rules every puppet module should follow, as stated by the puppet labs guidelines. Change in general is not a bad thing. We all fear them sometimes, but I we look at them subjectively, they might be more practical and useful that we first thought. Or maybe they are not. I know, that there is a pretty good chance of pushing the needs of oneself into such modules. TL;DR: Read the above :P No shortcuts. |
and check if $type is "oneshot"
change some settings to default values.