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: include by alan from 
      ([email protected])
   2. Linux-HA CVS: cim by panjiam from 
      ([email protected])
   3. Linux-HA CVS: cim by panjiam from 
      ([email protected])
   4. Linux-HA CVS: cim by panjiam from 
      ([email protected])


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

Message: 1
Date: Tue, 25 Apr 2006 21:42:08 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: include by alan from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

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

Dir     : linux-ha/include


Modified Files:
        ha_msg.h heartbeat.h 


Log Message:
Committed a patch from gshi which should GREATLY improve the
behavior of autojoin code.
The basic idea is that anyone newly joining the cluster should listen to anyone 
already in the cluster for the cache file contents, etc.

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/include/ha_msg.h,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -3 -r1.79 -r1.80
--- ha_msg.h    9 Apr 2006 12:50:04 -0000       1.79
+++ ha_msg.h    26 Apr 2006 03:42:07 -0000      1.80
@@ -1,4 +1,4 @@
-/* $Id: ha_msg.h,v 1.79 2006/04/09 12:50:04 andrew Exp $ */
+/* $Id: ha_msg.h,v 1.80 2006/04/26 03:42:07 alan Exp $ */
 /*
  * Intracluster message object (struct ha_msg)
  *
@@ -150,6 +150,7 @@
 #define        F_ORIGUUID      "srcuuid"       /* Real Originator uuid*/
 #define        F_NODE          "node"          /* Node being described */
 #define        F_NODELIST      "nodelist"      /* Node list being described */
+#define        F_DELNODELIST   "delnodelist"   /* Del node list being 
described */
 #define        F_TO            "dest"          /* Destination (optional) */
 #define F_TOUUID       "destuuid"      /* Destination uuid(optional) */
 #define        F_STATUS        "st"            /* New status (type = status) */
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/include/heartbeat.h,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -3 -r1.83 -r1.84
--- heartbeat.h 19 Apr 2006 21:08:54 -0000      1.83
+++ heartbeat.h 26 Apr 2006 03:42:07 -0000      1.84
@@ -1,4 +1,4 @@
-/* $Id: heartbeat.h,v 1.83 2006/04/19 21:08:54 alan Exp $ */
+/* $Id: heartbeat.h,v 1.84 2006/04/26 03:42:07 alan Exp $ */
 /*
  * heartbeat.h: core definitions for the Linux-HA heartbeat program
  *
@@ -395,7 +395,7 @@
 struct link * lookup_iface(struct node_info * hip, const char *iface);
 struct link *  iface_lookup_node(const char *);
 int    add_node(const char * value, int nodetype);
-int    delete_node(const char * value);
+int    remove_node(const char * value, int);
 void   SetParameterValue(const char * name, const char * value);
 
 gint           uuid_equal(gconstpointer v, gconstpointer v2);




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

Message: 2
Date: Wed, 26 Apr 2006 02:07:21 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: cim by panjiam from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : panjiam
Host    : 
Project : linux-ha
Module  : cim

Dir     : linux-ha/cim/mof


Modified Files:
        LinuxHA.mof 


Log Message:
added two Classes for location constraint
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cim/mof/LinuxHA.mof,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- LinuxHA.mof 13 Apr 2006 07:31:37 -0000      1.10
+++ LinuxHA.mof 26 Apr 2006 08:07:21 -0000      1.11
@@ -523,6 +523,26 @@
        string Rule [];
 }; 
 
+[ Provider ("cmpi:HA_LocationConstraintRuleProvider" ) ]
+class HA_LocationConstraintRule {
+       [ Key ]
+       string Id;
+       [ Key ]
+       string ConstraintId;
+
+       string Attribute;
+       string Operation;
+       string Value;
+};
+
+[ Provider ("cmpi:HA_RuleOfLocationConstraintProvider" ) ]
+class HA_RuleOfLocationConstraint {
+       [Key]
+       HA_LocationConstraint REF Constraint;
+       [Key]
+       HA_LocationConstraint REF Rule;
+};
+
 //-----------------------------------------------
 // Association, HA_SubResource
 //-----------------------------------------------




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

Message: 3
Date: Wed, 26 Apr 2006 02:08:38 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: cim by panjiam from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : panjiam
Host    : 
Project : linux-ha
Module  : cim

Dir     : linux-ha/cim


Modified Files:
        cluster_info.c 


Log Message:
delete sub resources before deleting a resource container
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cim/cluster_info.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- cluster_info.c      25 Apr 2006 17:46:45 -0000      1.8
+++ cluster_info.c      26 Apr 2006 08:08:38 -0000      1.9
@@ -1639,8 +1639,6 @@
                ha_msg_add(msg, "master_node_max", "");
                ret = cim_update_dispatch(CREATE_RESOURCE, NULL, msg, NULL);
 
-               /* delete the disk image */
-
                cim_rscdb_cleanup(type, rscid);
        }
 
@@ -1761,11 +1759,6 @@
                        ret = HA_OK;
                }
        } else {        /* update disk image */
-               /*
-               char pathname[MAXLEN] = CIM_RESOURCE_PREFIX;
-               strncat(pathname, rscid, MAXLEN);
-               ret = cim_msg2disk(pathname, resource);
-               */
                ret = cim_dbput_msg(CIM_RESOURCE_TABLE, rscid, resource);
        }
        return ret;
@@ -1775,10 +1768,24 @@
 cim_remove_rsc(const char * rscid)
 {
        int ret;
-       struct ha_msg * msg;
        if ( RESOURCE_ENABLED(rscid)) {
-               ret = cim_update_dispatch(DEL_RESOURCE, rscid, NULL, NULL);
-               if ( cim_get_rsctype(rscid) == TID_RES_PRIMITIVE ) {
+               int rsctype = cim_get_rsctype(rscid);
+               /* if it's a resource container, remove its sub resource first 
*/
+               if ( rsctype == TID_RES_GROUP || rsctype == TID_RES_CLONE ||
+                               rsctype == TID_RES_MASTER) {
+                       struct ha_msg *sublist = cim_get_subrsc_list(rscid);
+                       if (sublist) {
+                               int i , len = cim_list_length(sublist);
+                               for( i =0; i < len; i++) {
+                                       char *subrscid = NULL;
+                                       subrscid = cim_list_index(sublist,i);
+                                       cim_remove_rsc(subrscid);
+                               }
+                       }
+               }
+
+               if ( rsctype == TID_RES_PRIMITIVE ) {
+                       struct ha_msg * msg;
                        msg = cim_query_dispatch(GET_RSC_HOST, rscid, NULL);
                        if (msg) {
                                const char * host = cl_get_string(msg, "host");
@@ -1786,7 +1793,10 @@
                                ret = cim_update_dispatch(CLEANUP_RESOURCE, 
                                                param, NULL, NULL);
                        }
+                       ha_msg_del(msg);
                }
+
+               ret = cim_update_dispatch(DEL_RESOURCE, rscid, NULL, NULL);
        } else {
                cim_rscdb_cleanup(cim_get_rsctype(rscid), rscid);
                ret = HA_OK;




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

Message: 4
Date: Wed, 26 Apr 2006 02:10:00 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: cim by panjiam from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : panjiam
Host    : 
Project : linux-ha
Module  : cim

Dir     : linux-ha/cim


Modified Files:
        constraint_common.c 


Log Message:
check for invalid rule
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cim/constraint_common.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- constraint_common.c 10 Apr 2006 10:22:57 -0000      1.4
+++ constraint_common.c 26 Apr 2006 08:10:00 -0000      1.5
@@ -322,8 +322,6 @@
        CMPIArray * array = NULL;
        int len, i;
 
-       DEBUG_ENTER();
-
         array = CMGetProperty(ci, "Rule", rc).value.array;
        if(array == NULL || rc->rc != CMPI_RC_OK ) {
                cl_log(LOG_ERR, "%s: get array failed.", __FUNCTION__);
@@ -347,21 +345,21 @@
                        continue;
                }
                rule = CMGetCharPtr(s);         
-               cl_log(LOG_INFO, "%s: rule = %s", __FUNCTION__, rule);
 
                /* parse v*/
-               v = split_string(rule, &vlen, "<>");
+               v = split_string(rule, &vlen, "< >");
+               if ( vlen != 3 ) {
+                       continue;
+               }
                ha_msg_add(t, "attribute", v[0]);
                ha_msg_add(t, "operation", v[1]);
                ha_msg_add(t, "value", v[2]);
 
-               strncat(tmp, v[0], MAXLEN);
+               snprintf(tmp, MAXLEN, "%s_exp_id_%d", v[0], i);
                ha_msg_add(t, "id", tmp);
 
                cim_msg_add_child(constraint, tmp, t);
        }
-
-       DEBUG_LEAVE();
 }
 
 int    




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

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


End of Linux-ha-cvs Digest, Vol 29, Issue 134
*********************************************

Reply via email to