poise / supervisor

Development repository for Opscode Cookbook supervisor
Apache License 2.0
64 stars 163 forks source link

centos supervisord daemon directory #101

Open miguelcnf opened 8 years ago

miguelcnf commented 8 years ago

The current method of defining the daemon directory doesn't quite work on centos 6.x:

           Error executing action `start` on resource 'service[supervisor]'
           ================================================================================

           Mixlib::ShellOut::ShellCommandFailed
           ------------------------------------
           Expected process to exit with [0], but received '1'
           ---- Begin output of /sbin/service supervisor start ----
           STDOUT: Starting supervisor: [FAILED]
           STDERR: /usr/bin/dirname: extra operand `.pid'
           Try `/usr/bin/dirname --help' for more information.
           /bin/bash: /usr/local/bin/supervisord: No such file or directory
           ---- End output of /sbin/service supervisor start ----
           Ran /sbin/service supervisor start returned 1

Tested on a vagrant with:

[root@default-centos-66 ~]# cat /etc/issue
CentOS release 6.6 (Final)
[root@default-centos-66 ~]# rpm -q python
python-2.6.6-64.el6.x86_64

I've traced this to:

[root@default-centos-66 ~]# grep daemon /etc/init.d/supervisor | grep -v grep
# Manages the supervisor daemon
    daemon "/usr/local/bin/supervisord -c /etc/supervisord.conf "
[root@default-centos-66 ~]# ls /usr/local/bin/supervisord
ls: cannot access /usr/local/bin/supervisord: No such file or directory
[root@default-centos-66 ~]# whereis supervisord
supervisord: /usr/bin/supervisord /etc/supervisord.conf

This is defined in: https://github.com/poise/supervisor/blob/master/templates%2Fdefault%2Frhel%2Fsupervisor.init.erb

miguelcnf commented 8 years ago

Just noticed that #93 exists and should fix this.