Bug 185680 - feature request: add service dependencies to rgmanager
feature request: add service dependencies to rgmanager
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rgmanager (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Lon Hohberger
Cluster QE
Depends On:
  Show dependency treegraph
Reported: 2006-03-16 16:00 EST by Greg Forte
Modified: 2009-04-16 18:35 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-07-20 13:06:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Greg Forte 2006-03-16 16:00:35 EST
The current ccs/cluster.conf architecture allows for hierarchical "clustering"
of cluster services by embedding one resource tag inside another within a
service, e.g.:

<service autostart="1" domain="arcims" name="arcims">
   <script ref="mainwin init script">
       <script ref="arcims init script"/>

In this example, the arcims and mainwin system-level services are both part of
the same cluster service, and there is an implicit dependency of arcims on
mainwin - the cluster will start mainwin first, and only start arcims if
starting mainwin is successful.  These services are restricted to the same
domain, however, and therefore in effect to the same cluster node.

To define two system-level services that need to run on separate nodes normally,
two domains and therefore two cluster services are required, but then there is
no way to define one cluster service to be dependent on another.  For instance:

<service autostart="1" domain="arcsde" name="arcsde">
   <script ref="arcsde init script"/>
<service autostart="1" domain="arcims" name="arcims">
   <script ref="arcims init script"/>
   <failoverdomain name="arcsde" ordered="1" restricted="0">
      <failoverdomainnode name="MAPS1" priority="2"/>
      <failoverdomainnode name="MAPS2" priority="1"/>
   <failoverdomain name="arcims" ordered="1" restricted="0">
      <failoverdomainnode name="MAPS1" priority="1"/>
      <failoverdomainnode name="MAPS2" priority="2"/>

The arcims service needs to be started after the arcsde service, and they may
run on the same node but ordinarily are desired to run on different nodes. 
These two requirements are mutually exclusive (afaik) in the current version. 
The arcims service also should be failed and restarted if the arcsde service
switches nodes, which is also not easily doable without a lot of init script magic.
Comment 1 Lon Hohberger 2006-03-16 16:21:39 EST
ccs only handles configuration propagation and synchronization; rgmanager
handles dealing with dependencies.
Comment 2 Lon Hohberger 2006-05-16 12:31:24 EDT
It might be possible to do this simply by triggering off of events; e.g. 

  when service 'arcsde' finishes starting, start service 'arcims'


  when service 'arcsde' stops, stop service 'arcsde'

There's a little-used callback mechanism in the distributed state subsystem in
rgmanager - which could theoretically be used to generate events on service
state transitions (more precisely, on the commit of the distributed state which
occurs after the transition is complete).

That might be a cheap way of handling this.
Comment 3 Nate Straz 2007-12-13 12:18:49 EST
Moving all RHCS ver 5 bugs to RHEL 5 so we can remove RHCS v5 which never existed.

Note You need to log in before you can comment on or make changes to this bug.