Discussion:
[Supervisor-users] Launching processes dynamically
Peter Steele
2012-10-25 16:41:07 UTC
Permalink
We've just started using supervisor in a project and we have a couple of
issues we're working around. We have two categories of processes that we
want to be launched and monitored: Static processes whose command line
arguments do not change, and processes whose arguments are determined
dynamically (based on data maintained by another process in our system).
Basically, we collect this information, construct the command line we want,
and then want to launch it via supervisor.

The only way this appears to be possible physically edit the supervisor
configuration file, tell it to reread this information, and then tell
Supervisor to "update", which ends up causing it to restart the changed
process. This works, but it isn't particularly convenient. It would be very
useful if Supervisor provided an XML-RPC call where you could pass it
information describing a process, probably in the form of a hash table that
matches the fields in its configuration file, and start that process
dynamically. This process would not be persistent in its configuration
file. If the system was rebooted for example, this dynamic process would
not be restarted.

These dynamic process would behave the same as the statically launched
processes in every other way. This feature would be a great addition to
Supervisor. I understand that the XML-RPC can be extended. Is the kind of
thing I'm describing possible as an extension to the API?
Roger Hoover
2012-10-25 16:43:18 UTC
Permalink
There's an extension called supervisor_twiddler that, I think, does what
you're asking: https://github.com/mnaberez/supervisor_twiddler
Post by Peter Steele
We've just started using supervisor in a project and we have a couple of
issues we're working around. We have two categories of processes that we
want to be launched and monitored: Static processes whose command line
arguments do not change, and processes whose arguments are determined
dynamically (based on data maintained by another process in our system).
Basically, we collect this information, construct the command line we want,
and then want to launch it via supervisor.
The only way this appears to be possible physically edit the supervisor
configuration file, tell it to reread this information, and then tell
Supervisor to "update", which ends up causing it to restart the changed
process. This works, but it isn't particularly convenient. It would be very
useful if Supervisor provided an XML-RPC call where you could pass it
information describing a process, probably in the form of a hash table that
matches the fields in its configuration file, and start that process
dynamically. This process would not be persistent in its configuration
file. If the system was rebooted for example, this dynamic process would
not be restarted.
These dynamic process would behave the same as the statically launched
processes in every other way. This feature would be a great addition to
Supervisor. I understand that the XML-RPC can be extended. Is the kind of
thing I'm describing possible as an extension to the API?
_______________________________________________
Supervisor-users mailing list
http://lists.supervisord.org/mailman/listinfo/supervisor-users
Peter Steele
2012-10-25 22:12:24 UTC
Permalink
I've checked this out and it should suit our needs. It would be nice to be
able to preserve these dynamically created processes in the supervisor
configuration file but we can certainly make due with what twiddler offers.

Are there other Supervisor extensions that are worth checking out. I did a
quick web search and found a couple of others, but my curiosity is tweaked
now. Is there a complete list somewhere?
Post by Roger Hoover
There's an extension called supervisor_twiddler that, I think, does what
you're asking: https://github.com/mnaberez/supervisor_twiddler
Jens Rantil
2012-10-25 22:17:07 UTC
Permalink
Hi Peter,

Here's a fairly updated list:
https://github.com/Supervisor/supervisor/blob/master/PLUGINS.rst Please
make pull requests or open issues if you find missing plugins!

Take care,
Jens
Post by Peter Steele
I've checked this out and it should suit our needs. It would be nice to be
able to preserve these dynamically created processes in the supervisor
configuration file but we can certainly make due with what twiddler offers.
Are there other Supervisor extensions that are worth checking out. I did a
quick web search and found a couple of others, but my curiosity is tweaked
now. Is there a complete list somewhere?
Post by Roger Hoover
There's an extension called supervisor_twiddler that, I think, does what
you're asking: https://github.com/mnaberez/supervisor_twiddler
_______________________________________________
Supervisor-users mailing list
http://lists.supervisord.org/mailman/listinfo/supervisor-users
--
Want to know how full my inbox is? Or how to get in touch with me faster?
Or tell me your e-mail is not that important? Then check this out:
http://courteous.ly/4WtfZY
Peter Steele
2012-10-25 22:37:00 UTC
Permalink
Thanks for the link. I will check these out.

Peter
Post by Jens Rantil
Hi Peter,
https://github.com/Supervisor/supervisor/blob/master/PLUGINS.rst Please
make pull requests or open issues if you find missing plugins!
Take care,
Jens
Loading...