Supervisor / supervisor

Supervisor process control system for Unix (supervisord)
http://supervisord.org
Other
8.46k stars 1.24k forks source link

New Feature: `disable`/`enable` #591

Open jvanasco opened 9 years ago

jvanasco commented 9 years ago

I'd like to suggest a new feature: disable/enable a program.

Rationale:

I often have to "disable" a process during maintenance, for fear that the system could restart and supervisord would restart the process. In order to do this, I have to essentially unregister the service by editing the supervisord config files. Even if using symlinks in a directory, this is awkward and tedious -- and I lose the program's status from within supervisor. Trying to find out if something is "disabled" is a chore, because I have to match a list of available configurations with active ones.

I think a better solution would be to simply mark the status as "disabled" and persist that to disk. The program would still be registered to supervisord and ready to enable at any time. The supervisorctl app and status command would clearly report that the configuration is "disabled".

I looked through the source and this seems relatively easy to do -- except for persisting the data to disk. I can't figure out a good place to store this.

If the maintainers think this is an acceptable idea and can suggest a place/mechanism for storing data, I think I can fork and PR.

deeTEEcee commented 1 year ago

I still would say "why does supervisor core not have this"? 😉

IronSean commented 9 months ago

If you set numprocs=0 will it effectively disable a process?

Vringe commented 4 months ago

If you set numprocs=0 will it effectively disable a process?

This actually works. When set to 0, a supervisorctl start MYSERVICE just returns MYSERVICE: ERROR (no such process)