Skip to content

New Feature: disable/enable #591

Open
@jvanasco

Description

@jvanasco

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

  • disable stops the process (if running). sets a disabled flag on the disk. "disabled" processes will not be considered for "all" commands or on restart.
  • enable unsets the disabled flag on the disk.

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions