Bug 185680 - feature request: add service dependencies to rgmanager
Summary: feature request: add service dependencies to rgmanager
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rgmanager
Version: 5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Lon Hohberger
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-03-16 21:00 UTC by Greg Forte
Modified: 2009-04-16 22:35 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-07-20 17:06:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Greg Forte 2006-03-16 21:00:35 UTC
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"/>
   </script>
</service>

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>
<service autostart="1" domain="arcims" name="arcims">
   <script ref="arcims init script"/>
</service>
<failoverdomains>
   <failoverdomain name="arcsde" ordered="1" restricted="0">
      <failoverdomainnode name="MAPS1" priority="2"/>
      <failoverdomainnode name="MAPS2" priority="1"/>
   </failoverdomain>
   <failoverdomain name="arcims" ordered="1" restricted="0">
      <failoverdomainnode name="MAPS1" priority="1"/>
      <failoverdomainnode name="MAPS2" priority="2"/>
   </failoverdomain>
</failoverdomains>

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 21:21:39 UTC
ccs only handles configuration propagation and synchronization; rgmanager
handles dealing with dependencies.

Comment 2 Lon Hohberger 2006-05-16 16:31:24 UTC
It might be possible to do this simply by triggering off of events; e.g. 

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

and

  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 17:18:49 UTC
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.