Inorder and deps_checker services
Theory
The Inorder and deps_checker services are part of the wfmanager util, which is based on supervisord .
The supervisord primary purpose is to create and manage processes based on data in its configuration file. It does this by creating subprocesses. Each subprocess spawned by supervisor is managed for the entirety of its lifetime by supervisord (supervisord is the parent process of each process it creates). When a child dies, supervisor is notified of its death via the SIGCHLD signal, and it performs the appropriate operation.
Inorder service
The priority order in supervisord determines the startup order, but
when autostart=true, supervisord doesn't wait for the previous process to
be RUNNING in order to continue. What is even harder is having
initialization scripts that need to exit before continuing. The problem
can be seen in supervisor bug 122.
Solution: We are using the Inorder service. Its main purpose is to start an additional library that helps to control ordered startup.
note
Known behavior: "inorder FATAL Exited too quickly (process log may have details)", if other services are in RUNNING state, it means Inorder
service done his job correctly.
Deps_checker service
Before starting the main applications, it is reasonable to ensure that databases and some other services are available.
Solution: the supervisord Bash wrapper is to wait for connectivity. The current implementation waits for TCP connectivity to host\ and
port\ for deps_apps\.
Process States
A process controlled by supervisord will have one of the below states at any given time:
STOPPED: the process has been stopped due to a stop request or has never been started.
STARTING: the process is starting due to a start request.
RUNNING: the process is running.
BACKOFF: the process entered the STARTING state, but subsequently exited too quickly to move to the RUNNING state.
STOPPING: the process is stopping due to a stop request.
EXITED: the process exited from the RUNNING state (expectedly or unexpectedly).
FATAL: the process could not be started successfully.
UNKNOWN: the process is in an unknown state (supervisord programming error).