Re: Defining dependency of services

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jun 09, 2007 at 09:22:19PM -0700, Roger Peña wrote:
> 
> --- chirantha pitigala <chiranthlk@xxxxxxxxx> wrote:
> 
> > Hi roger,
> > 
> > What I need is dependency between services. e.g:
> > service 1 depends on successful start of service 2.
> > Is it possible to do by making parent-child
> > relationship between script resources of two
> > services? 
> What I try to do is think of service as "cluster
> services", a service that a cluster will bring, not a
> unix service (httpd or ftp)

> if I do it in that way, nothing will stop me of having
> two unix services as resource of a cluster service,
> more important if this two unix services depend
> between them.

You can have as many dependent parts of a single service currently, but
not between them:

  <service name="1">
     <script name="ftp" file=...>
        <script name="httpd" file=.../>
     </script>
  </service>

If you have RHEL4.5, you can also put all the scripts at the top level
to ensure the same ordering:

  <service name="1">
     <script name="ftp" file=.../>
     <script name="httpd" file=.../>
  </service>

However, you can't do something like this right now:

  <resources>
     <script name="ftp" file=.../>
     <script name="httpd" file=.../>
  </resources>
  <service name="1">
     <script ref="httpd"/>
  </service>
  <service name="2">
     <script ref="ftp">
        [some magic stuff to wait for service 1]
     </script>
  </service>

There's partial (read: demo) code in head CVS which implements higher
level dependencies, but it is integrated with the rest of rgmanager
yet.

-- Lon

-- 
Lon Hohberger - Software Engineer - Red Hat, Inc.

--
Linux-cluster mailing list
Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster

[Index of Archives]     [Corosync Cluster Engine]     [GFS]     [Linux Virtualization]     [Centos Virtualization]     [Centos]     [Linux RAID]     [Fedora Users]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Camping]

  Powered by Linux