Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 0.9.16, 0.10.0
-
Fix Version/s: 0.10.0
-
Component/s: Chef Server
-
Labels:None
-
Environment:
centos 5.3, run_style=init, all redhat
Description
When using run_style=init, the init script for chef-solr (and I think the other daemons) does not use the -P option to start chef-solr. As a result, chef-solr defaults to using /tmp/chef-solr.pid instead of the pidfile specified in /etc/sysconfig/chef-solr or the default in /etc/init.d/chef-solr. Because of this service chef-solr stop/restart fails.
The fix is to add -P "$pidfile" in /etc/init.d/chef-solr in the start() function right before the "$options":
daemon $prog -d -c "$config" -u "$user" -g "$group" -L "$logfile" -P "$pidfile" "&>/dev/null"
Note too that you'll have to chown /var/run/chef to be owned by chef:chef.
Issue Links
- is duplicated by
-
CHEF-1837
chef-solr init scripts
-
Also need to add -p "$pidfile" to call to killproc in stop() function:
killproc -p "$pidfile" $prog