The sipXsupervisor manages all other sipXecs processes. To give the supervisor the information about a process that it needs to manage the process correctly, the installer for the process must install a process definition into the directory ${prefix}/share/sipXecs/process.d
, whose file name is name-process.xml
(where name is unique to the process).
The XML schema for the process definition is at sipXsupervisor/meta/sipXecs-process.xsd.in
. This page explains the elements and attributes defined by that schema, and to use them to ensure proper management of any sipXecs component.
The top level element of the process definition document is sipXecs-process
. The contents of sipXecs-process
are:
Exactly one of each of:
name
: the name of the process - this is used to identify this process in control operations and alarms.version
: the version number of the process (see Versions)commands
: commands used to control the process (see Commands)status
: status files for the process (see Status)
and optionally one:resources
: list of resources used by the process (see Resources)
The process definition file is read-only - it is only read by the sipXsupervisor, and is never modified by anything (except when being replaced by the new version when the component is upgraded).
Process Management State Machine
In order to understand how the various elements of the process definition are used, it helps to understand the sipXsupervisor process management state machine (this diagram is slightly simplified from the actual state machine for clarity). The dark green states and paths are the normal successful sequence of states and events. The Enabled and Disabled states are the permanent states of a process, established by start and stop commands from sipXconfig (start and stop are persistent - each sets the desired state of the process, and that desired state is saved by the supervisor).
digraph {
node [shape=oval];
subgraph cluster_states {
style=invis;
node [shape=rectangle];
ShutDown [label="Enabled / Shut Down"];
Disabled;
}
subgraph
subgraph errors {
node [color=red, fontcolor=red];
edge [color=red, fontcolor=red];
ConfigTestFailed [label="Invalid Configuration"];
Failed;
Testing -> ConfigTestFailed [label="failed"];
Starting -> Failed [label="failed"];
Running -> Failed [label="failed"];
}
ConfigurationMismatch -> ConfigurationMismatch [label="version set"];
ResourceRequired -> ResourceRequired [label="configuration change"];
ConfigTestFailed -> Testing [label="configuration change"];
Failed -> ConfigurationMismatch [label="retry timeout"];
Stopping;
Running -> Stopping [label="stop command"];
Stopping -> Disabled [label="stopped"];
}