import "acsdaemon.idl";
Public Member Functions | |
ServiceDefinitionBuilder | create_service_definition_builder (in short instance_number) raises (ACSErrTypeCommon::BadParameterEx, ACSErrTypeCommon::NoResourcesEx) |
void | start_services (in services_definition_xml definition, in boolean reuse_services, in DaemonSequenceCallback callback) raises (ACSErrTypeCommon::BadParameterEx) |
void | stop_services (in services_definition_xml definition, in DaemonSequenceCallback callback) raises (ACSErrTypeCommon::BadParameterEx) |
void | start_acs (in DaemonSequenceCallback callback, in short instance_number, in string flags) raises (ACSErrTypeCommon::BadParameterEx) |
void | stop_acs (in DaemonSequenceCallback callback, in short instance_number, in string flags) raises (ACSErrTypeCommon::BadParameterEx) |
string | status_acs (in short instance_number) raises (acsdaemonErrType::FailedToGetAcsStatusEx) |
void | shutdown () raises (maciErrType::NoPermissionEx) |
void | set_manager_reference (in short instance_number, in string ref) |
The services daemon starts, stops and monitors the ACS services on one or more host machine(s). This daemon must persist any state data (such as user-defined notification service name-to-port mappings) to allow simply restarting it in the event of a crash.
Use of this daemon is the generally recommended startup mechanism for ACS, although for limited tests with all services running on one machine and w/o requirement for service monitoring, it may be sufficient to run the "acsStart" and "acsStop" scripts directly without using the services daemon at all.
There are three different ways to start the ACS services through this daemon:
The stopping of the services must be done symmetrically to the starting, i.e. calling stop_xyz methods, stop_services, acsStop.
About daemon deployment (this info does not quite belong into the interface documentation, but for practical purposes seems justified):
A single instance of this daemon must be running on all computers on which ACS services should be started. The daemon can be started by a boot script, SNMP or other mechanism using the command "acsservicesdaemon". It may be started by a different user than the one later running ACS. The daemon can be found using "corbaloc::host:3014/ACSServicesDaemon".
ServiceDefinitionBuilder acsdaemon::ServicesDaemon::create_service_definition_builder | ( | in short | instance_number | ) | raises (ACSErrTypeCommon::BadParameterEx, ACSErrTypeCommon::NoResourcesEx) |
Creates and retrieves a reference to a ServiceDescriptionBuilder instance. (Make sure to call ServiceDescriptionBuilder#close when done with it.)
This call may fail with a NoResourcesEx if 10 instances are already active, or if for another reason the daemon determines that its proper functioning would be jeopardized by creating the ServicesDaemonStartupSequence. This call will fail with BadParameterEx if the "instance_number" is invalid.
instance_number | The ACS instance (as in ACS_INSTANCE env var) to be started. In an operational environment this should always be 0 (i.e. no coexistence of multiple instances!) With ACS 8.0, it will no longer be possible to use collaborating services running as different ACS instances on different machines. |
void acsdaemon::ServicesDaemon::set_manager_reference | ( | in short | instance_number, | |
in string | ref | |||
) |
Set corrensponding manager reference. NOTE: this is used to initialize alarm system.
void acsdaemon::ServicesDaemon::shutdown | ( | ) | raises (maciErrType::NoPermissionEx) |
Shuts down the daemon.
void acsdaemon::ServicesDaemon::start_acs | ( | in DaemonSequenceCallback | callback, | |
in short | instance_number, | |||
in string | flags | |||
) | raises (ACSErrTypeCommon::BadParameterEx) |
Starts ACS services. Returns immediately. The client will be notified through the callback object when the services are up, or if an error has occurred.
void acsdaemon::ServicesDaemon::start_services | ( | in services_definition_xml | definition, | |
in boolean | reuse_services, | |||
in DaemonSequenceCallback | callback | |||
) | raises (ACSErrTypeCommon::BadParameterEx) |
Asynchronously starts the defined services. This method can be called on any services daemon in the system, which will forward the calls to the daemons on the other hosts according to the services definition.
Exceptions are forwarded to the callback handler. If a service cannot be started, the starting sequence will be abandoned, but the services that have been started already will be left running. This allows the client to either fix the problem and call this method again (with reuse_services=true) to complete the startup, or to stop the services. If a defined service is running already, it will be reused if "reuse_services" is true. Otherwise it will be considered a failure (see above).
definition | see ServiceDefinitionBuilder#get_services_definition. | |
reuse_services | if true then ServiceAlreadyRunning exceptions from the start_xyz methods will be ignored, otherwise they are considered failures. | |
callback | DaemonSequenceCallback instance to receive notifications on startup sequence progress. |
string acsdaemon::ServicesDaemon::status_acs | ( | in short | instance_number | ) | raises (acsdaemonErrType::FailedToGetAcsStatusEx) |
void acsdaemon::ServicesDaemon::stop_acs | ( | in DaemonSequenceCallback | callback, | |
in short | instance_number, | |||
in string | flags | |||
) | raises (ACSErrTypeCommon::BadParameterEx) |
Stops ACS services. Returns immediately. The client will be notified through the callback object when the services are stopped, or if an error has occurred.
void acsdaemon::ServicesDaemon::stop_services | ( | in services_definition_xml | definition, | |
in DaemonSequenceCallback | callback | |||
) | raises (ACSErrTypeCommon::BadParameterEx) |
Asynchronously shuts down the services that were executed via the specified services definition. This method can be called on any services daemon in the system, which will forward the calls to the daemons on the other hosts according to the services definition. The shutdown order is determined by the daemon.
If one of the given services is found to be not running (ServiceNotRunning exception from any of the stop_ methods) then the client will be notified via the callback, but the execution of this method will continue.
definition | Sequence descriptor XML. | |
callback | DaemonSequenceCallback instance to receive notification about completion or problems with the service stop. |