Bug #6718
runit service provider fails when trying to install a new service
| Status: | Code Insufficient | Start date: | 03/15/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | provider | |||
| Target version: | - | |||
| Affected Puppet version: | 2.6.5 | Branch: | https://github.com/robinbowes/puppet/tree/ticket/2.6.x/6718 | |
| Keywords: | ||||
| Votes: | 1 |
Description
When adding a new service with the runit provider, I get this:
err: Could not run Puppet configuration client: Could not get status for service Service[s_runit_send_hits]: Execution of ‘/usr/bin/sv status /etc/sv/send_hits’ returned 1: fail: /etc/sv/send_hits: unable to change to service directory: file does not exist
It is trying to check the status of the service before the service has been created. There should be an explicit check that the service is installed before trying to run the service status method.
I have a fix and will attach a patch that seems to do the trick.
History
Updated by Robin Bowes about 1 year ago
- Branch set to https://github.com/robinbowes/puppet/tree/ticket/2.6.x/6718
I’m not sure how best to do this, but this is the patch:
https://github.com/robinbowes/puppet/commit/6360f77ea5bc31446a96f813de126f9601dbe5df
It’s a one-line, with two lines of comments.
Updated by Matt Robinson about 1 year ago
- Status changed from Unreviewed to Code Insufficient
’m not familiar enough with Runit to know the implications of this patch at a glance, but at the very least it shouldn’t break the current tests (5 fail in spec/unit/provider/service/runit_spec.rb with your patch), and there ought to be another test to motivate this change.
Updated by Robin Bowes about 1 year ago
Any chance someone with better puppet dev skills than me could help we work through this issue? It’s a bit of a blocker for me as I am unable to commission new machines or deploy any new services with the current behaviour.
Updated by Mohit Chawla about 1 year ago
Similar to #4480 ?