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

Decouple service from init system #279

Merged

Conversation

tdevelioglu
Copy link

@tdevelioglu tdevelioglu commented Sep 15, 2016

Decouple managing service and init system from eachother.

Previously the logic didn't make sense, where one could pass a bool
to the parameter init_style that expects a string to toggle the
management of service files in the init system and it was impossible to
let the module manage the service but not the init system.

This breaks the common case of where you want to let a package prep the
init system but still let the module manage the service.

This commit decouples the service resource from management of the init
system so it offers the choice of using the module-supplied init files.
It adds support for a magic value unmanaged on parameter init_style that
disables management of the init system.

@solarkennedy
Copy link
Contributor

This PR includes commits from the "polish" one, can you rebase?

@tdevelioglu tdevelioglu force-pushed the decouple_service_from_init_system branch 2 times, most recently from 3ca8247 to fb46782 Compare September 19, 2016 09:21
@tdevelioglu
Copy link
Author

Done

@tdevelioglu tdevelioglu force-pushed the decouple_service_from_init_system branch from fb46782 to 94506db Compare September 19, 2016 11:36
@tdevelioglu tdevelioglu force-pushed the decouple_service_from_init_system branch from 94506db to a87c3a9 Compare September 19, 2016 14:00
@solarkennedy
Copy link
Contributor

I understand what you are trying achieve.

What if instead of a new parameter we reused existing the init_style, and if users don't want the init stuff managed they can say init_style => 'unmanaged' ? (and of course configure the case statement to match, provider would be left to undef to let puppet autodetect what the package provided.)

Previously the logic didn't make sense, where one could pass a bool
to the parameter `init_style` that expects a string to toggle the
management of service files in the init system and it was impossible to
let the module manage the service but not the init system.

This breaks the common case of where you want to let a package prep the
init system but still let the module manage the service.

This commit decouples the service resource from management of the init
system so it offers the choice of using the module-supplied init files.
It adds support for a magic value `unmanaged` on parameter `init_style` that
disables management of the init system.
@tdevelioglu tdevelioglu force-pushed the decouple_service_from_init_system branch from a87c3a9 to f85fcba Compare September 19, 2016 15:26
@tdevelioglu
Copy link
Author

Sounds good to me, how is this ?

@solarkennedy solarkennedy merged commit a1251c2 into voxpupuli:master Sep 20, 2016
@solarkennedy
Copy link
Contributor

Thanks!

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.

2 participants