plathrop / puppet-module-supervisor

Puppet module for configuring the supervisor daemon tool.
BSD 3-Clause "New" or "Revised" License
6 stars 0 forks source link

Trouble detecting service start with numprocs > 1? #51

Closed andyshinn closed 11 years ago

andyshinn commented 11 years ago

I am using this module on RedHat with a custom built RPM of the latest 3.0 version. If I use numprocs > 1 on a process (such as numprocs => 6) then it fails to detect the process starting.

On further inspection, I can see that the output of a started process is:

[ashinn@worker1 ~]$ sudo /usr/bin/supervisorctl start create_thumbnails:*
create_thumbnails_03: started
create_thumbnails_02: started
create_thumbnails_01: started
create_thumbnails_00: started
create_thumbnails_05: started
create_thumbnails_04: started
[ashinn@worker1 ~]$

Which doesn't match the current regex:

[ashinn@worker1 ~]$ sudo /usr/bin/supervisorctl start create_thumbnails:* | awk '/^create_thumbnails[: ]/{print $2}'
[ashinn@worker1 ~]$

Anyone else running into this issue?

I'd like to send a pull request to update the regex to something like ^${name}_?\d*?[: ]/{print \$2} instead. But maybe I am just missing something here...

Slashbunny commented 11 years ago

I can confirm, I encountered the same problem. Updating the regex fixes the issue.

andyshinn commented 11 years ago

Hi @Slashbunny, thanks for confirming! I'm working on a formal fix (with an updated spec test) and will make a pull request sometime next week. Hope @plathrop is still out there and can give some feedback (this seems to be the supervisor module with the most potential).

andyshinn commented 11 years ago

I'm closing this in favor of #53. My initial tests are showing that it fixes both this issue and #52 (in a much more elegant manner).