Inorder and deps_checker services
Theory
These services Inorder and deps_checker are the part of wfmanager util, which is based on supervisord.
Supervisord‘s 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
Why: The priority order in supervisor does determine startup order, but when autostart=true supervisor 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 Inorder service which main purpose is to start additional library that helps to control ordered startup.
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
Why: Before starting main applications it is reasonable to ensure that databases and some other services are available.
Solution: Supervisord bash wrapper to wait for connectivity.
Current implementation wait for tcp connectivity to host and
port for deps_apps
Process states
A process controlled by supervisord will be in 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).