Inorder and deps_checker
Inorder and deps_checker are the part of the wfmanager utility, which is based on supervisord.
Supervisord‘s primary purpose is to create and manage processes, based on the data in its configuration file, by creating subprocesses. Each subprocess that is spawned by supervisor is managed during its lifetime by supervisord, which is parent for each process it creates. When a child dies, supervisord is notified about its termination via the SIGCHLD signal, and it performs the appropriate operation.
Inorder service
Why: The priority order in supervisor determines the startup order, but
when autostart=true, supervisor doesn't wait for the previous process
to be RUNNING in order to continue. Moreover, initialization scripts
that need to exit before continuing can cause additional
difficulties. The problem can be seen in supervisor bug 122.
Solution: We use the Inorder service to start an additional library that helps to control the sequential startup.
Known behavior: "inorder FATAL Exited too quickly (process log may have details)", if other services are in the RUNNING state, it means the Inorder service has performed correctly.
Deps_checker service
Why: Before starting main applications, we recommend to ensure that databases and some other services are available.
Solution: use supervisord bash wrapper to wait for connectivity.
Current implementation waits for the TCP connectivity to host and
port for deps_apps.
Process States
A process controlled by supervisord will have one of the following 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).