Ready Conditions#
A Ready Condition defines what must be true of a component before the Launch Manager considers that component to have reached its Ready State.
The following ready conditions are supported:
Process Running#
Configuration:
{
"process_state":"Running"
}
The component is considered ready as soon as its process has reported
kRunning to the Launch Manager via the lifecycle API. The process is
expected to remain alive and continue providing its service.
Use this condition for long-running daemons that signal readiness once their initialization is complete.
Process Terminated#
Configuration:
{
"process_state":"Terminated"
}
The component is considered ready once its process has reported kRunning
via the lifecycle API and subsequently terminated with a successful exit
code.
A process that exits without first reporting kRunning is treated as a
failure, not as reaching the Ready State.
Use this condition for one-shot tasks (e.g. mounting a filesystem, applying configuration) that signal completion by exiting cleanly.
File State#
Configuration:
{
"file_state": {
"state": "Exists",
"polling_interval": 0.01,
"file_path": "/var/run/b/ready"
}
}
{
"file_state": {
"state": "NotExisting",
"polling_interval": 0.01,
"file_path": "/var/run/c/startup.lock"
}
}
The component is considered ready once the file specified in file_path
reaches the desired state (Exists or NotExisting).
The Launch Manager polls for the existence or deletion of the file with the
configured polling_interval.