ajcrowe / puppet-supervisord

Puppet Module to install and configure applications under supervisord
MIT License
37 stars 104 forks source link

Adds RHEL-specific pathing #18

Closed jtreminio closed 10 years ago

jtreminio commented 10 years ago

supervisord and supervisorctl are on different paths in RHEL and Debian systems.

The previous setting for path was not working:

Exec {
  path => '/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin'
}

Was getting this:

Notice: /Stage[main]/Supervisord::Pip/Exec[install_setuptools]/returns: executed successfully
default: Error: Could not find command '/usr/bin/easy_install'
default: Error: /Stage[main]/Supervisord::Pip/Exec[install_pip]/returns: change from notrun to 0 failed: Could not find command '/usr/bin/easy_install'
default: Notice: /Stage[main]/Supervisord::Pip/Exec[pip_provider_name_fix]: Dependency Exec[install_pip] has failures: true
default: Warning: /Stage[main]/Supervisord::Pip/Exec[pip_provider_name_fix]: Skipping because of failed dependencies

Setting the exec path to contain /usr/local/bin fixes issue.

I also separated the paths into array format to make it easier to see easier path.

Related to https://github.com/puphpet/puphpet/issues/816

jtreminio commented 10 years ago

The code in pip.pp:

exec { 'install_setuptools':
  command => "curl ${supervisord::setuptools_url} | python",
  cwd     => '/tmp',
  unless  => 'which easy_install',
  before  => Exec['install_pip']
}

Still seems to trigger the error:

Error: Could not find command 'easy_install'
Error: /Stage[main]/Supervisord::Pip/Exec[install_pip]/returns: change from notrun to 0 failed: Could not find command 'easy_install'

If I use CentOS' package manager to install python's setuptools this code works great, though.

ajcrowe commented 10 years ago

v0.4.1 released with this fix