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

specify process supervision type in service resource #242

Closed
willejs opened this issue Nov 17, 2015 · 3 comments
Closed

specify process supervision type in service resource #242

willejs opened this issue Nov 17, 2015 · 3 comments
Labels
Type: Enhancement Improves an existing feature
Milestone

Comments

@willejs
Copy link

willejs commented Nov 17, 2015

The Inspec service resource determines the process supervision type based on os release version and uses a single process supervision type to check if a process is running, enabled etc.

Given many chef cookbooks use many different process supervison tools (init, upstart, runit, etc etc) It would be better if you could override the service_mgmt instance variable to specify the specific one for your service.

Is this a design decision, or could this be changed?

@chris-rock
Copy link
Contributor

@willejs The current approach was pragmatic and worked for most cases. e.g. the resource is not able to work properly in cases where you change the default init system.

I would like to have a default, but we should support an override. Ideas are welcome!

@willejs
Copy link
Author

willejs commented Nov 17, 2015

@chris-rock I think supporting an override would be great.
On a side note, how does serverspec do this? does it just run the service command?
Id kindof prefer that option too.

@chris-rock chris-rock added the Type: Enhancement Improves an existing feature label Nov 18, 2015
@paulmooring
Copy link

We're hitting this with some omnibus services (we have upstart, sysv and runit services). I'd love to a see a system that allow me to be explicit when I want, something like:

describe service('my_sevice1') do # implicit upstart due to platform
  it { should be_running }
end

describe sysv_service('my_service') do # explicit sysv
  it { should be_running }
end

describe runit_service('my_service') do # explicit runit
  it { should be_running }
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Improves an existing feature
Projects
None yet
Development

No branches or pull requests

5 participants