Send Linux-ha-cvs mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Linux-ha-cvs digest..."


Today's Topics:

   1. Linux-HA CVS: lib by alan from  ([email protected])
   2. Linux-HA CVS: lib by alan from  ([email protected])
   3. Linux-HA CVS: crm by andrew from 
      ([email protected])


----------------------------------------------------------------------

Message: 1
Date: Thu, 23 Feb 2006 17:15:00 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by alan from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : alan
Host    : 
Project : linux-ha
Module  : lib

Dir     : linux-ha/lib/plugins/HBcomm


Modified Files:
        mcast.c 


Log Message:
Put code into mcast.c to make it retry retrieving the address from
the interface if it fails...

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/plugins/HBcomm/mcast.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -3 -r1.26 -r1.27
--- mcast.c     7 Feb 2006 21:55:35 -0000       1.26
+++ mcast.c     24 Feb 2006 00:14:59 -0000      1.27
@@ -1,4 +1,4 @@
-/* $Id: mcast.c,v 1.26 2006/02/07 21:55:35 alan Exp $ */
+/* $Id: mcast.c,v 1.27 2006/02/24 00:14:59 alan Exp $ */
 /*
  * mcast.c: implements hearbeat API for UDP multicast communication
  *
@@ -696,18 +696,23 @@
 static int
 if_getaddr(const char *ifname, struct in_addr *addr)
 {
-       int     fd;
+       int             fd;
        struct ifreq    if_info;
+       int             j;
+       int             maxtry = 30;
+       gboolean        gotaddr = FALSE;
+       int             err;
        
-       if (!addr)
+       if (!addr) {
                return -1;
+       }
 
        addr->s_addr = INADDR_ANY;
 
        memset(&if_info, 0, sizeof(if_info));
        if (ifname) {
                strncpy(if_info.ifr_name, ifname, IFNAMSIZ-1);
-       } else {        /* ifname is NULL, so use any address */
+       }else{  /* ifname is NULL, so use any address */
                return 0;
        }
 
@@ -719,11 +724,19 @@
                PILCallLog(LOG, PIL_DEBUG, "looking up address for %s"
                ,       if_info.ifr_name);
        }
-       if (ioctl(fd, SIOCGIFADDR, &if_info) < 0) {
+       for (j=0; j < maxtry && !gotaddr; ++j) {
+               if (ioctl(fd, SIOCGIFADDR, &if_info) < 0) {
+                       err = errno;
+                       sleep(1);
+               }else{
+                       gotaddr = TRUE;
+               }
+       }
+       if (!gotaddr) {
                PILCallLog(LOG, PIL_CRIT
                ,       "Unable to retrieve local interface address"
                " for interface [%s] using ioctl(SIOCGIFADDR): %s"
-               ,       ifname, strerror(errno));
+               ,       ifname, strerror(err));
                close(fd);
                return -1;
        }
@@ -800,6 +813,10 @@
 
 /*
  * $Log: mcast.c,v $
+ * Revision 1.27  2006/02/24 00:14:59  alan
+ * Put code into mcast.c to make it retry retrieving the address from
+ * the interface if it fails...
+ *
  * Revision 1.26  2006/02/07 21:55:35  alan
  * Clarified a few error messages.
  *




------------------------------

Message: 2
Date: Thu, 23 Feb 2006 19:20:25 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by alan from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : alan
Host    : 
Project : linux-ha
Module  : lib

Dir     : linux-ha/lib/plugins/HBcomm


Modified Files:
        mcast.c 


Log Message:
Increased how long we'll wait for the network interface to get an address...

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/plugins/HBcomm/mcast.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -3 -r1.27 -r1.28
--- mcast.c     24 Feb 2006 00:14:59 -0000      1.27
+++ mcast.c     24 Feb 2006 02:20:24 -0000      1.28
@@ -1,4 +1,4 @@
-/* $Id: mcast.c,v 1.27 2006/02/24 00:14:59 alan Exp $ */
+/* $Id: mcast.c,v 1.28 2006/02/24 02:20:24 alan Exp $ */
 /*
  * mcast.c: implements hearbeat API for UDP multicast communication
  *
@@ -696,10 +696,9 @@
 static int
 if_getaddr(const char *ifname, struct in_addr *addr)
 {
-       int             fd;
        struct ifreq    if_info;
        int             j;
-       int             maxtry = 30;
+       int             maxtry = 120;
        gboolean        gotaddr = FALSE;
        int             err;
        
@@ -716,28 +715,37 @@
                return 0;
        }
 
-       if ((fd=socket(AF_INET, SOCK_DGRAM, 0)) == -1)  {
-               PILCallLog(LOG, PIL_CRIT, "Error getting socket");
-               return -1;
-       }
        if (Debug > 0) {
                PILCallLog(LOG, PIL_DEBUG, "looking up address for %s"
                ,       if_info.ifr_name);
        }
        for (j=0; j < maxtry && !gotaddr; ++j) {
-               if (ioctl(fd, SIOCGIFADDR, &if_info) < 0) {
-                       err = errno;
-                       sleep(1);
-               }else{
+               int             fd;
+               if ((fd=socket(AF_INET, SOCK_DGRAM, 0)) == -1)  {
+                       PILCallLog(LOG, PIL_CRIT, "Error getting socket");
+                       return -1;
+               }
+               if (ioctl(fd, SIOCGIFADDR, &if_info) >= 0) {
                        gotaddr = TRUE;
+               }else{
+                       err = errno;
+                       switch(err) {
+                               case EADDRNOTAVAIL:
+                                       sleep(1);
+                                       break;  
+                               default:
+                                       close(fd);
+                                       goto getout;
+                       }
                }
+               close(fd);
        }
+getout:
        if (!gotaddr) {
                PILCallLog(LOG, PIL_CRIT
                ,       "Unable to retrieve local interface address"
                " for interface [%s] using ioctl(SIOCGIFADDR): %s"
                ,       ifname, strerror(err));
-               close(fd);
                return -1;
        }
 
@@ -750,7 +758,6 @@
        memcpy(addr, &(SOCKADDR_IN(&if_info.ifr_addr)->sin_addr)
        ,       sizeof(struct in_addr));
 
-       close(fd);
        return 0;
 }
 
@@ -813,6 +820,9 @@
 
 /*
  * $Log: mcast.c,v $
+ * Revision 1.28  2006/02/24 02:20:24  alan
+ * Increased how long we'll wait for the network interface to get an address...
+ *
  * Revision 1.27  2006/02/24 00:14:59  alan
  * Put code into mcast.c to make it retry retrieving the address from
  * the interface if it fails...




------------------------------

Message: 3
Date: Fri, 24 Feb 2006 03:53:44 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: crm by andrew from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : andrew
Host    : 
Project : linux-ha
Module  : crm

Dir     : linux-ha/crm


Modified Files:
        crm-1.0.dtd 


Log Message:
DTD updates

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crm-1.0.dtd,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -3 -r1.45 -r1.46
--- crm-1.0.dtd 11 Aug 2005 17:43:56 -0000      1.45
+++ crm-1.0.dtd 24 Feb 2006 10:53:43 -0000      1.46
@@ -32,19 +32,22 @@
           cib_feature_revision  CDATA   #REQUIRED>
 <!ELEMENT configuration (nodes, resources, constraints, crm_config)>
 <!-- Annotated version -->
-<!ELEMENT crm_config (nvpair*)>
+
+<!ELEMENT crm_config (cluster_property_set,nvpair)*>
+<!ELEMENT cluster_property_set (rule*, attributes)>
 <!ELEMENT nodes       (node*)>
 <!-- Annotated version -->
+
 <!ELEMENT node (instance_attributes*)>
 <!ATTLIST node
           id            CDATA         #REQUIRED
           uname         CDATA         #REQUIRED
           description   CDATA         #IMPLIED
-          dc_weight     CDATA         #IMPLIED
-          type          (member|ping) #REQUIRED>
+          type          (normal|member|ping) #REQUIRED>
 <!ELEMENT resources   (primitive*, group*, clone*)>
 <!-- Annotated version -->
-<!ELEMENT primitive (operations, instance_attributes*)>
+
+<!ELEMENT primitive (operations?, instance_attributes*)>
 <!ATTLIST primitive
           id                CDATA        #REQUIRED
           description       CDATA        #IMPLIED
@@ -59,6 +62,7 @@
           resource_stickiness   (0|INFINITY|-INFINITY)           '0'
           start_prereq          (nothing|quorum|fencing)         #IMPLIED>
 <!-- Annotated version -->
+
 <!ELEMENT operations (op*)>
 <!ELEMENT op (instance_attributes*)>
 <!ATTLIST op
@@ -70,7 +74,8 @@
           prereq     (nothing|quorum|fencing)   #IMPLIED
           on_fail    (nothing|block|stop|fence) #IMPLIED>
 <!-- Annotated version -->
-<!ELEMENT group (primitive+)>
+
+<!ELEMENT group (primitive+,instance_attributes*)>
 <!ATTLIST group
           id                    CDATA               #REQUIRED
           description   CDATA               #IMPLIED
@@ -81,7 +86,7 @@
           multiple_active       (stop_start|stop_only|block)     'stop_start'
           resource_stickiness   (0|INFINITY|-INFINITY)           '0'
           start_prereq          (nothing|quorum|fencing)         #IMPLIED>
-<!ELEMENT clone (primitive|group)>
+<!ELEMENT clone (primitive|group),instance_attributes*>
 <!ATTLIST clone
           id            CDATA               #REQUIRED
           description   CDATA               #IMPLIED
@@ -96,7 +101,7 @@
 
           ordered       (true|false)     'true'
           interleave    (true|false)     'false'>
-<!ELEMENT master_slave (clone)>
+<!ELEMENT master_slave (clone, instance_attributes*)>
 <!ATTLIST master_slave
           id            CDATA       #REQUIRED
           description   CDATA       #IMPLIED
@@ -114,6 +119,7 @@
           max_masters      CDATA         #REQUIRED
           max_node_masters CDATA         #REQUIRED>
 <!-- Annotated version -->
+
 <!ELEMENT instance_attributes (rule*, attributes)>
 <!-- Annotated version -->
 
@@ -146,8 +152,10 @@
 
 <!ELEMENT rule (expression|time_expression|rule)+>
 <!ATTLIST rule
-          id         CDATA        #REQUIRED
-          score      CDATA        #IMPLIED
+          id                    CDATA     #REQUIRED
+          role                  CDATA     #IMPLIED
+          score                 CDATA     #IMPLIED
+          score_attribute       CDATA     #IMPLIED
           boolean_op (or|and)     'and'>
 <!-- Annotated version -->
 
@@ -189,7 +197,7 @@
 <!-- Annotated version -->
 
 <!ELEMENT status (node_state*)>
-<!ELEMENT node_state (lrm, attributes)>
+<!ELEMENT node_state (lrm, transient_attributes)>
 <!ATTLIST node_state
         id              CDATA                   #REQUIRED
         uname           CDATA                   #REQUIRED
@@ -209,13 +217,11 @@
 <!ELEMENT lrm_resource (lrm_rsc_op)>
 <!ATTLIST lrm_resource
           id            CDATA #REQUIRED
-          rsc_state     
(stopped|starting|started|fail|restarting|stopping|stop_fail)
-                                #REQUIRED
-          last_op       CDATA #REQUIRED
-          op_status     CDATA #REQUIRED
-          rc_code       CDATA #REQUIRED>
+          class             (ocf|init|heartbeat|stonith) #REQUIRED
+          type              CDATA        #REQUIRED
+          provider          CDATA        #IMPLIED>
 
-<!ELEMENT lrm_rsc_op)>
+<!ELEMENT lrm_rsc_op (parameters)>
 <!ATTLIST lrm_rsc_op
           id            CDATA #REQUIRED
           operation     CDATA #REQUIRED
@@ -230,7 +236,9 @@
           id            CDATA #REQUIRED
           name          CDATA #REQUIRED
           value         CDATA #IMPLIED>
+<!ELEMENT parameters>
 <!ELEMENT attributes (nvpair*)>
+<!ELEMENT transient_attributes (instance_attributes*)>
 
 <!-- ============================================================== -->
 <!-- ============================================================== -->
@@ -258,7 +266,8 @@
 <!ELEMENT synapse (inputs,action_set)>
 <!ATTLIST synapse
          id    CDATA           #REQUIRED
-         reset (no|yes|greedy) 'greedy'>
+         reset (no|yes|greedy) 'greedy'
+         priority CDATA        #IMPLIED>
 
 <!ELEMENT inputs (trigger+)>
 




------------------------------

_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs


End of Linux-ha-cvs Digest, Vol 27, Issue 96
********************************************

Reply via email to