Skip to content
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

Closed
wants to merge 3 commits into from

Conversation

Dwarfex
Copy link

@Dwarfex Dwarfex commented Mar 7, 2017

and check if $type is "oneshot"
change some settings to default values.

@jordiprats
Copy link
Contributor

Hi,
Thanks fot you contribution, but I cannot merge it

  • multiple ExecStart sounds good

but:

  • umask is valid parameter
  • default values cannot be changed for compatibility reasons

regards,

@Dwarfex
Copy link
Author

Dwarfex commented Mar 7, 2017 via email

@func0der
Copy link
Contributor

func0der commented Mar 7, 2017

Hey! Great thought. I would have done it myself, but I had no time.

The new major thing sounds great.
I think, if you would bump this to 0.2.0, this would be totally okay.
Also, if there is no major version of a plugin (every version < 1), breaking changes are most likely and expected.
No major version means that this is not a stable version, which is equal to an alpha or beta version.

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
or here
http://semver.org/spec/v1.0.0.html
which describes the situation above with this paragraph/rule.

Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable.

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. ;)

@jordiprats
Copy link
Contributor

Hi,
I've merged this change partially in this commit:

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,

@jordiprats jordiprats closed this Mar 10, 2017
@func0der
Copy link
Contributor

hey. Thanks for merging, even though it was only partially.
I would have been nice, if you would have checked backed with the PR requester first, to make sure, you are both satisfied with the solution. I know, you do not have to, because this is your module, but it is just kind of nicer.

To you comment:

I think here we are intending to provide "safe defaults" instead of just use systemd's defaults

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.
BUT: consider the following. I do NOT want to have wantedby in my service configuration and explicitly set it to 'undef' or whatever. Your plugin forces this directive into the service file in the current configuration as it also does with the [install] section.
I find this part of the PR (0a6e8b9#diff-2f31c46d567c1cc049875d41d88a144fR134) escpecially useful in such cases. It would be nice, if you'd reconsider merging it.

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.
The type casting solution in the PR is a great solution and it happening where it is supposed to happen.
Also you supply us with functions like any2array, so, why not use them?

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.
You can put the values for those into the parameters for your systemd::server class.

I hope you reconsider these changes.

specially since this was the default in this module since day 1

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.
Your module can behave differently at any time, especially in the development phase (version < 1). Later also, with major updates, that come with breaking changes.

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.
Things like it always has been this way, so we do not change it, are not the best approach ;)

I know, that there is a pretty good chance of pushing the needs of oneself into such modules.
But I think, if you'd leave those aside, your module could reach a much broader crowd.

TL;DR: Read the above :P No shortcuts.

jordiprats added a commit that referenced this pull request Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants