[Linux-cluster] How to configure resource dependency in service

Vlad Seagal vseagal at liquidnet.com
Thu Oct 25 18:35:06 UTC 2007


Lon,
Thanks for your reply. I did the rg_test and that worked. I was able to
start the service:
[root at va0pmlt01 ~]# rg_test test /etc/cluster/cluster.conf start service
webserver
Running in test mode.
Starting webserver...
<debug>  Link for bond0: Detected
<info>   Adding IPv4 address 10.17.123.226 to bond0
<debug>  Sending gratuitous ARP: 10.17.123.226 00:1c:c4:41:a4:1c brd
ff:ff:ff:ff:ff:ff
<info>   Executing /etc/init.d/httpd start
Starting httpd:                                            [  OK  ]
Start of webserver complete
[root at va0pmlt01 ~]# ps -ef|grep http
root     28637     1  0 14:23 ?        00:00:00 /usr/sbin/httpd
apache   28638 28637  0 14:23 ?        00:00:00 /usr/sbin/httpd
apache   28639 28637  0 14:23 ?        00:00:00 /usr/sbin/httpd
apache   28641 28637  0 14:23 ?        00:00:00 /usr/sbin/httpd
apache   28642 28637  0 14:23 ?        00:00:00 /usr/sbin/httpd
apache   28644 28637  0 14:23 ?        00:00:00 /usr/sbin/httpd
apache   28645 28637  0 14:23 ?        00:00:00 /usr/sbin/httpd
apache   28646 28637  0 14:23 ?        00:00:00 /usr/sbin/httpd
apache   28647 28637  0 14:23 ?        00:00:00 /usr/sbin/httpd
root     28661  8355  0 14:23 pts/0    00:00:00 grep http
[root at va0pmlt01 ~]#
[root at va0pmlt01 ~]# rg_test test /etc/cluster/cluster.conf stop service
webserver
Running in test mode.
Stopping webserver...
<info>   Executing /etc/init.d/httpd stop
Stopping httpd:                                            [  OK  ]
<info>   Removing IPv4 address 10.17.123.226 from bond0
Stop of webserver complete
[root at va0pmlt01 ~]#
[root at va0pmlt01 ~]# clustat
Member Status: Quorate

  Member Name                              Status
  ------ ----                              ------
  va0pmlt01                                Online, Local, rgmanager
  va0pmlt02                                Online, rgmanager
  va0pmlt03                                Online, rgmanager
  va0pmlt04                                Online, rgmanager
  va0pmlt05                                Online, rgmanager

  Service Name         Owner (Last)                   State
  ------- ----         ----- ------                   -----
  webserver            (va0pmlt01)                    disabled

[root at va0pmlt01 ~]# clusvcadm -e webserver -m va0pmlt01
Member va0pmlt01 trying to enable webserver...success
Service webserver is now running on va0pmlt01
[root at va0pmlt01 ~]#
[root at va0pmlt01 ~]# ps -ef|grep http
root     30227  8355  0 14:32 pts/0    00:00:00 grep http
[root at va0pmlt01 ~]#
[root at va0pmlt01 ~]# clustat
Member Status: Quorate

  Member Name                              Status
  ------ ----                              ------
  va0pmlt01                                Online, Local, rgmanager
  va0pmlt02                                Online, rgmanager
  va0pmlt03                                Online, rgmanager
  va0pmlt04                                Online, rgmanager
  va0pmlt05                                Online, rgmanager

  Service Name         Owner (Last)                   State
  ------- ----         ----- ------                   -----
  webserver            va0pmlt01                      started


As you can see the service doesn't start properly if it's started via
clusvcadm command. Http is not running. Do you know what might be the
problem.

Thanks,
Vlad.


On 10/25/07 1:47 PM, "Lon Hohberger" <lhh at redhat.com> wrote:

> On Wed, 2007-10-24 at 15:21 -0400, Vlad Seagal wrote:
>> As you see the resource webserver doesn't get started at all.
>> 
>> Here is the snap from the /etc/cluster/cluster.conf:
>> 
>>  <service autostart="1" domain="node1-fail" exclusive="0" name="webserver"
>> recovery="restart">
>>                         <clusterfs ref="GFS">
>>                                 <ip ref="10.17.123.226">
>>                                         <script ref="webserver"/>
>>                                 </ip>
>>                         </clusterfs>
>>                 </service>
> 
> That should work as well.  If it doesn't, try running:
> 
> clusvcadm -d webserver
> rg_test test /etc/cluster/cluster.conf start service webserver
> 
> 
> (before re-enabling, run:)
> rg_test test /etc/cluster/cluster.conf stop service webserver
> 
> -- Lon
> 
> 
> --
> Linux-cluster mailing list
> Linux-cluster at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-cluster
> 

-- 
Vlad Seagal
Unix System Administrator
Liquidnet Holdings, Inc.
vseagal at liquidnet.com
T 646.674.2268





More information about the Linux-cluster mailing list