Issue #4480 has been updated by Robin Bowes.
I see the same behaviour as Mohit. Let me explain.
To create a service in runit, you first create a service directory containing a
run script and, optionally, a log dir containing a run script for the log
service. Then, to enable the service, you symlink it into the directory that
runsvdir is monitoring (usually /service or /var/service). runsvdir is the
process that checks for new services every 5 seconds. The relevant section of
man 8 runsvdir:
At least every five seconds runsvdir checks whether the time of last
modifica-
tion, the inode, or the device, of the services directory dir has changed.
If
so, it re-scans the service directory, and if it sees a new subdirectory,
or new
symlink to a directory, in dir, it starts a new runsv(8) process; if
runsvdir
sees a subdirectory being removed that was previously there, it sends the
corre-
sponding runsv(8) process a TERM signal, stops monitoring this process,
and so
does not restart the runsv(8) process if it exits.
puppet should wait at least 5 seconds before checking the status of a newly
created service to give runsvdir time to see it and start it.
See also #6718 for another runit provider issue.
----------------------------------------
Bug #4480: Runit service provider behavior
https://projects.puppetlabs.com/issues/4480
Author: Mohit Chawla
Status: Needs More Information
Priority: Normal
Assignee: Nigel Kersten
Category: provider
Target version:
Affected Puppet version: 0.25.4
Keywords:
Branch:
When runit provider creates the symlink for a service (to /etc/service), and if
service is enabled in the manifest, an error is encountered as:
<pre>
`notice: Enabling /etc/service/qmail: linking /var/qmail/boot/qmail ->
/etc/service/qmail
err: //qmail/Service[qmail]/ensure: change from stopped to running failed:
Execution of '/usr/bin/sv start /etc/service/qmail' returned 1: warning:
/etc/service/qmail: unable to open supervise/ok: file does not exist`
</pre>
This is because runit needs about 5 seconds to discover new services, but
puppet doesn't wait.
As far as I can tell, the provider needs to have a provision for delaying the
service start by 5 seconds. Not practical really, but that's what I can think
of right now.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.