[CentOS] cluster - ip address lost when service stopped

Jay Leafey jay.leafey at mindless.com
Mon Dec 29 20:40:57 UTC 2008

Fabio Macchi wrote:
> Hi Gowrishankar,
> this problem seems to be related to cluster, not to bonding: bonding is 
> working correctly, anyway I’ve tryied a test removing bonding, and I 
> experience the same problem directly on interface eth0.
> This is my cluster.conf
> <?xml version="1.0" ?>
> <cluster alias="cluster01" config_version="54" name="cluster01">
>         <fence_daemon clean_start="1" post_fail_delay="0" 
> post_join_delay="30"/>
>         <clusternodes>
>                 <clusternode name="AREA041" nodeid="2" votes="1">
>                         <fence/>
>                 </clusternode>
>                 <clusternode name="AREA042" nodeid="3" votes="1">
>                         <fence/>
>                 </clusternode>
>         </clusternodes>
>         <cman expected_votes="1" two_node="1"/>
>         <fencedevices/>
>         <rm>
>                 <failoverdomains>
>                         <failoverdomain name="httpd failover domain" 
> ordered="0" restricted="1">
>                                 <failoverdomainnode name="AREA041" 
> priority="1"/>
>                         </failoverdomain>
>                 </failoverdomains>
>                 <resources>
>                         <ip address="" monitor_link="1"/>
>                 </resources>
>                 <service autostart="0" domain="httpd failover domain" 
> name="Apache" recovery="disable">
>                         <script file="/etc/rc.d/init.d/httpd" 
> name="script httpd"/>
>                         <ip ref=""/>
>                 </service>
>                 <service autostart="0" domain="httpd failover domain" 
> name="Service Mail" recovery="disable">
>                         <script file="/etc/rc.d/init.d/MailScanner" 
> name="MailScanner"/>
>                         <clusterfs device="/dev/DATI_MAIL/DATI_MAIL" 
> force_unmount="1" fsid="5845" fstype="gfs2" mountpoint="/dati_mail" 
> name="Share_dati_mail" options=""/>
>                         <ip address="" monitor_link="1"/>
>                 </service>
>         </rm>
> </cluster>
> Many thanks

 From what I can tell, the behaviour you are noticing is consistent with 
your cluster.conf file.  Since you have made the IP addresses part of 
the service definitions, the IP would "go away" when the associated 
service is stopped.  If the service moved to another node, however, the 
IP would be enabled on the host to which the service was moved.

If you want the IP addresses to be independent of the service state, 
then add them using files in /etc/sysconfig/network-scripts to define 
the "alias" addresses and remove them from your service definitions. 
See /usr/share/doc/initscripts-*/sysconfig.txt for details on how to set 
up the alias addresses.

I'm doing something similar with IP addresses in a cluster, but I WANT 
the IP address to migrate to the target host when a service is moved 
from one node in the cluster to another.  I have the IP address 
resources tied to the individual services to make that happen.

Hope that helps!
Jay Leafey - Memphis, TN
jay.leafey at mindless.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5566 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.centos.org/pipermail/centos/attachments/20081229/f05375b8/attachment.bin 

More information about the CentOS mailing list