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

Use init provider on solaris when managing service #336

Merged

Conversation

davemcdonnell
Copy link
Contributor

Pull Request (PR) description

Puppet on Solaris defaults to the SMF provider for services. Splunk is still using init scripts (as of latest version 9.0.0).

Puppet attempts to enable the service, which causes a catalog failure:
Error: Could not start Service[splunk]: Execution of '/usr/sbin/svcadm enable -rs splunk' returned 1: svcadm: Pattern 'splunk' doesn't match any instances
Error: /Stage[main]/Splunk::Forwarder::Service/Service[splunk]/ensure: change from 'stopped' to 'running' failed: Could not start Service[splunk]: Execution of '/usr/sbin/svcadm enable -rs splunk' returned 1: svcadm: Pattern 'splunk' doesn't match any instances

This Pull Request (PR) fixes the following issues

No bug logged for this

@davemcdonnell davemcdonnell changed the title Use init provider on solaris when managing service Jun 24, 2022
@davemcdonnell davemcdonnell mentioned this pull request Jun 24, 2022
@bastelfreak
Copy link
Member

@davemcdonnell thanks for the PR. Can you rebase please? And do you know if the solaris version range in metadata.json is up2date?

"operatingsystem": "Solaris",
"operatingsystemrelease": [
"10",
"11",
"12"
]

…ing init scripts (as of latest version 9.0.0).
@davemcdonnell davemcdonnell force-pushed the fix_solaris_service_provider branch from 73d64d9 to 6e8ac8c Compare July 3, 2022 23:26
@davemcdonnell
Copy link
Contributor Author

@bastelfreak I've done the rebase. Im not sure on the metadata.json, I only have access to Solaris 11 to test with.

I can't see anything obvious that would change support for 10 or 12 though.

Copy link
Member

@smortex smortex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic for managing the service parameters in various places in this module is weird, but I guess it has grown this way and some refactoring could be nice to improve this in the future.

@smortex smortex merged commit d268e4c into voxpupuli:master Jul 12, 2022
@bastelfreak bastelfreak added the bug Something isn't working label Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants