Skip to content

Handle shutdown state during supervisorctl preflight - #1724

Open
tianrking wants to merge 1 commit into
Supervisor:mainfrom
tianrking:fix/shutdown-state-message
Open

Handle shutdown state during supervisorctl preflight#1724
tianrking wants to merge 1 commit into
Supervisor:mainfrom
tianrking:fix/shutdown-state-message

Conversation

@tianrking

Copy link
Copy Markdown

Summary

  • handle SHUTDOWN_STATE returned by the shared supervisorctl preflight
  • show an actionable retry message instead of the generic XML-RPC exception and source location
  • preserve the generic failure exit status for scripts

Fixes #48

Root cause

Every supervisorctl command calls Controller.upcheck() before performing its action. The preflight recognized UNKNOWN_METHOD, but re-raised SHUTDOWN_STATE, so onecmd() formatted the known server lifecycle state as an internal exception with a Python file and line number. This is especially visible when a command follows reload before the server has finished restarting.

Tests

  • python -m pytest supervisor/tests/test_supervisorctl.py -q (199 passed on Linux)
  • python -m compileall -q supervisor
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Running supervisorctl restart <name> causes xmlrpclib.Fault

1 participant