Supervisor: restart all should not start programs that have not been started at all

Created on 4 Jun 2014  路  1Comment  路  Source: Supervisor/supervisor

consider the following configuration

[program:instance1]
command = bin/instance1 console
process_name = instance1
directory = /home/zope/bin
priority = 20
redirect_stderr = true
user = zope

[program:instance2]
command = bin/instance2 console
process_name = instance2
directory = /home/zope/bin
priority = 21
redirect_stderr = true
user = zope
autostart = false
autorestart = false

running supervisord will start instance1 and won't start instance2
when running supervisorctl restart all instance2 will be started.

from my point of view, it would make sense to only start programs having autostart=true when running supervisorctl restart all

maybe it would be even more consistent, if restart all would only stop and start programs that are currently running.

# starts instance1, but not instance2
supervisorctl stop instance1
# instance1 stopped, instance2 never started
supervisorctl restart all
# neither instance1 or instance2 restarted since they have not been running
supervisorctl stop all
# would stop all running programs
supervisorctl start all
# starts instance1 and instance2

i know this would break with the current behaviour. however - at least to me - this sounds much more sane.
maybe there is a secret command that does what i described above?

Most helpful comment

I could see the benefit of adding a supervisorctl restart running where running is a special keyword like all is but that resolves to a process list differently. I don't think changing the semantics of all is a good idea though, from a BC perspective.

>All comments

I could see the benefit of adding a supervisorctl restart running where running is a special keyword like all is but that resolves to a process list differently. I don't think changing the semantics of all is a good idea though, from a BC perspective.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

timonwong picture timonwong  路  49Comments

fredpalmer picture fredpalmer  路  218Comments

mminer picture mminer  路  41Comments

felipemachado-sambatech picture felipemachado-sambatech  路  74Comments

pisymbol picture pisymbol  路  21Comments