Supervisor: XML-RPC API - reloadConfig()

Created on 2 Aug 2017  路  6Comments  路  Source: Supervisor/supervisor

reloadConfig seems to have no practical effect over RPC.

Calls over RPC

  • reloadConfig()
  • start/stop process group

reloadConfig says that the config has been changed, but the process list looks the same after I restart a group or even all processes.

The only solution to reload a config over rpc seems to remain a complete restart.

How can I use reloadConfig() and get a refreshed process list over RPC?

Thx

question xmlrpc

Most helpful comment

I understand. But the goal is to achieve what the supervisorctl update or reload does. But over XML-RPC API, because I don't have access the the cli.

All 6 comments

api reloadConfig() only change the group config, but not the process group!
please use the update command.

The update command is unfortunately not available via RPC.
http://supervisord.org/api.html

you should understand what the reloadConfig() function all does is only to read the config again but not update the sub-processes that are running, which is reread supervisorctl command does.
you can see do_reread() function in the option.py.

if you wanna the configs' changes affect the sub-processes, you should use the update supervisorctl command instead. Or you can stop, remove, add and start the sub-process again when you use the reread supervisorctl command.

I understand. But the goal is to achieve what the supervisorctl update or reload does. But over XML-RPC API, because I don't have access the the cli.

@tiborb i met this problem when using xmlrpc, you can do removeProcessGroup and
addProcessGroup again before startProcess.

This works for me.

According to the code, supervisorctl update calls reloadConfig() and then handles removed, changed, added in its return value respectively. For everything in the changed array it does stopProcessGroup, removeProcessGroup, addProcessGroup.

https://github.com/Supervisor/supervisor/blob/0d0cdf68aedfaa97567d93420aa02ce2812ac50e/supervisor/supervisorctl.py#L1158-L1224

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ido50 picture ido50  路  95Comments

timonwong picture timonwong  路  49Comments

ramary picture ramary  路  33Comments

ojii picture ojii  路  20Comments

gregpinero picture gregpinero  路  29Comments