Service module manages system-wide services. Allows service start/stop and scheduling services to start on boot (service and chkconfig frontend).
Module name: “service”
Module version: 1.0
See Modules - Common API for general module description.
Service module has a notion of service and set (set of services). Sets are here to simplify management of multiple services, eg cluster start/stop.
<service description="description"
enabled="true/false" name="service name"
running="true/false"/>
“enabled” - enabled on
boot; “running” - currently running.
<set description="description"
enabled="true/false" name="set name"
running="true/false"/>
“enabled” - enabled on
boot; “running” - currently running.
There are couple of predefined service sets:
- “Cluster
Base” - base infrastructure of Red Hat Cluster Suite (currently
ccsd, cman, fenced)
- “Cluster Base - Gulm” - base
infrastructure of Red Hat Cluster Suite using GULM lock manager
(currently ccsd, lock_gulmd)
- “Cluster Service
Manager” - (currently rgmanager)
- “Clustered Storage” -
shared storage (currently clvmd, gfs)
- “Linux Virtual Server”
- (currently pulse, piranha-gui)
Functions:
APIs
Get supported API versions. See Modules - Common API for description.
list
Retrieve list of services and sets.
Input variables:
- “description” (boolean) – optional,
defaults to false, fill in “description” attribute (slow)
Output variables:
- “services” (list_xml) –
list of services and sets
On failure:
- No special errors defined, only
generic ones might get returned.
query
Query services and sets by service/set name.
Input variables:
- “search” (list_xml) – list of
services and sets to query. Service format <service name=”rpm
name”/>; set format <set name=”set name”/>
-
“description” (boolean) – optional, defaults to false, fill
in “description” attribute (slow)
Output variables:
- “result” (list_xml) –
list of matching services and sets.
On failure:
- No special errors defined, only generic ones
might get returned.
enable
Enable services/sets to start at boot time. It is not error to enable already enabled service/set.
Input variables:
- “services” (list_xml) – list of
services/sets to enable. For format see “query”.
No output variables.
On failure:
- No special errors defined, only generic ones
might get returned.
disable
Disable services/sets startup at boot time. It is not error to disable already disabled service/set.
Input variables:
- “services” (list_xml) – list of
services/sets to disable. For format see “query”.
No output variables.
On failure:
- No special errors defined, only
generic ones might get returned.
start
Start services/sets. It is not error to start already started service/set.
Input variables:
- “services” (list_xml) – list of
services/sets to start. For format see “query”.
No output variables.
On failure:
- No special errors defined, only
generic ones might get returned.
restart
Restart services/sets.
Input variables:
- “services” (list_xml) – list of
services/sets to restart. For format see “query”.
No output variables.
On failure:
- No special errors defined, only
generic ones might get returned.
stop
Stop services/sets. It is not error to stop already stopped services/sets.
Input variables:
- “services” (list_xml) – list of
services/sets to stop. For format see “query”.
No output variables.
On failure:
- No special errors defined, only
generic ones might get returned.