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: cts by andrew from 
      ([email protected])
   2. Linux-HA CVS: crm by andrew from 
      ([email protected])
   3. Linux-HA CVS: crm by andrew from 
      ([email protected])
   4. Linux-HA CVS: crm by andrew from 
      ([email protected])


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

Message: 1
Date: Mon, 29 May 2006 03:36:48 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: cts by andrew from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

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

Dir     : linux-ha/cts


Modified Files:
        CIB.py.in 


Log Message:
DoFencing is a non-unique clone

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cts/CIB.py.in,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- CIB.py.in   8 May 2006 11:00:20 -0000       1.14
+++ CIB.py.in   29 May 2006 09:36:48 -0000      1.15
@@ -160,7 +160,7 @@
         </rsc_location> ''' 
 
     stonith_resource_template = """ 
-        <clone id="DoFencing">
+        <clone id="DoFencing" globally_unique="false">
           <instance_attributes id="fencing">
             <attributes>
               <nvpair id="DoFencing-1" name="clone_max" value="%d"/>




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

Message: 2
Date: Mon, 29 May 2006 04:09:04 -0600 (MDT)
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/pengine


Modified Files:
        incarnation.c 


Log Message:
Probes:
 - reorganize the code for better performance
 - probe for all clone instances on all nodes unless
     clone_node_max == 1 AND globally_unique == FALSE

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/incarnation.c,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -3 -r1.90 -r1.91
--- incarnation.c       23 May 2006 10:00:31 -0000      1.90
+++ incarnation.c       29 May 2006 10:09:04 -0000      1.91
@@ -1,4 +1,4 @@
-/* $Id: incarnation.c,v 1.90 2006/05/23 10:00:31 andrew Exp $ */
+/* $Id: incarnation.c,v 1.91 2006/05/29 10:09:04 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -1403,37 +1403,25 @@
 clone_create_probe(resource_t *rsc, node_t *node, action_t *complete,
                    gboolean force, pe_working_set_t *data_set) 
 {
-       int num_probes = 0;
        gboolean any_created = FALSE;
        clone_variant_data_t *clone_data = NULL;
        get_clone_variant_data(clone_data, rsc);
 
-       /* we may already be running but under different names */
-       slist_iter(
-               child_rsc, resource_t, clone_data->child_list, lpc,
-
-               if(rsc->globally_unique == FALSE
-                  && num_probes >= clone_data->clone_node_max) {
-                       return FALSE;
-               }
-               if(pe_find_node_id(child_rsc->running_on, node->details->id)) {
-                       num_probes++;
-               }
-               );
-       
        clone_data->child_list = g_list_sort(
                clone_data->child_list, sort_rsc_id);
 
        slist_iter(
                child_rsc, resource_t, clone_data->child_list, lpc,
 
-               if(num_probes >= clone_data->clone_node_max) {
+               /* we may already be running but under different names */
+               if(rsc->globally_unique == FALSE
+                  && clone_data->clone_node_max == 1
+                  && pe_find_node_id(child_rsc->known_on, node->details->id)) {
                        break;
-               }
-               if(child_rsc->fns->create_probe(
+
+               } else if(child_rsc->fns->create_probe(
                           child_rsc, node, complete, force, data_set)) {
                        any_created = TRUE;
-                       num_probes++;
                }
                );
 




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

Message: 3
Date: Mon, 29 May 2006 05:53:54 -0600 (MDT)
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/pengine


Modified Files:
        incarnation.c 


Log Message:
Remove redundant use of sizeif(char)... ISO C specifies that sizeof(char) := 1

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/incarnation.c,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -3 -r1.91 -r1.92
--- incarnation.c       29 May 2006 10:09:04 -0000      1.91
+++ incarnation.c       29 May 2006 11:53:53 -0000      1.92
@@ -1,4 +1,4 @@
-/* $Id: incarnation.c,v 1.91 2006/05/29 10:09:04 andrew Exp $ */
+/* $Id: incarnation.c,v 1.92 2006/05/29 11:53:53 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -1028,14 +1028,14 @@
   clone_expand_reallocate:
        if(rsc_list != NULL) {
                crm_free(*rsc_list);
-               crm_malloc0(*rsc_list, sizeof(char)*list_len);
+               crm_malloc0(*rsc_list, list_len);
                CRM_ASSERT(*rsc_list != NULL);
                rsc_list_s = *rsc_list;
                rsc_len = 0;
        }
        if(node_list != NULL) {
                crm_free(*node_list);
-               crm_malloc0(*node_list, sizeof(char)*list_len);
+               crm_malloc0(*node_list, list_len);
                CRM_ASSERT(*node_list != NULL);
                node_list_s = *node_list;
                node_len = 0;




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

Message: 4
Date: Mon, 29 May 2006 05:53:54 -0600 (MDT)
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/admin


Modified Files:
        crm_resource.c crm_uuid.c crmadmin.c 


Log Message:
Remove redundant use of sizeif(char)... ISO C specifies that sizeof(char) := 1

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/admin/crm_resource.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- crm_resource.c      20 May 2006 07:40:03 -0000      1.32
+++ crm_resource.c      29 May 2006 11:53:53 -0000      1.33
@@ -1,4 +1,4 @@
-/* $Id: crm_resource.c,v 1.32 2006/05/20 07:40:03 andrew Exp $ */
+/* $Id: crm_resource.c,v 1.33 2006/05/29 11:53:53 andrew Exp $ */
 
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -729,7 +729,7 @@
                usage(crm_system_name, LSB_EXIT_GENERIC);
        }
 
-       crm_malloc0(our_pid, sizeof(char) * 11);
+       crm_malloc0(our_pid, 11);
        if(our_pid != NULL) {
                snprintf(our_pid, 10, "%d", getpid());
                our_pid[10] = '\0';
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/admin/crm_uuid.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- crm_uuid.c  22 Nov 2005 02:37:08 -0000      1.2
+++ crm_uuid.c  29 May 2006 11:53:53 -0000      1.3
@@ -1,4 +1,4 @@
-/* $Id: crm_uuid.c,v 1.2 2005/11/22 02:37:08 andrew Exp $ */
+/* $Id: crm_uuid.c,v 1.3 2006/05/29 11:53:53 andrew Exp $ */
 
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -70,8 +70,8 @@
 
 /*     fprintf(stderr, "Reading %d bytes from: %s\n", UUID_LEN, UUID_FILE); */
 
-       buffer = cl_malloc(sizeof(char) * 50);
-       read_len = fread(uuid.uuid, sizeof(char), UUID_LEN, input);
+       buffer = cl_malloc(50);
+       read_len = fread(uuid.uuid, 1, UUID_LEN, input);
        if(read_len != UUID_LEN) {
                fprintf(stderr, "Calculated and read bytes differ: %d vs. 
%ld\n",
                        UUID_LEN, read_len);
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/admin/crmadmin.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -3 -r1.69 -r1.70
--- crmadmin.c  8 May 2006 07:42:17 -0000       1.69
+++ crmadmin.c  29 May 2006 11:53:53 -0000      1.70
@@ -1,4 +1,4 @@
-/* $Id: crmadmin.c,v 1.69 2006/05/08 07:42:17 andrew Exp $ */
+/* $Id: crmadmin.c,v 1.70 2006/05/29 11:53:53 andrew Exp $ */
 
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -477,7 +477,7 @@
                cl_log_set_facility(facility);
        }
 
-       crm_malloc0(admin_uuid, sizeof(char) * 11);
+       crm_malloc0(admin_uuid, 11);
        if(admin_uuid != NULL) {
                snprintf(admin_uuid, 10, "%d", getpid());
                admin_uuid[10] = '\0';
@@ -584,7 +584,7 @@
                        /* 31 = "test-_.xml" + an_int_as_string + '\0' */
                        filename_len = 31 + strlen(this_msg_reference);
 
-                       crm_malloc0(filename, sizeof(char) * filename_len);
+                       crm_malloc0(filename, filename_len);
                        if(filename != NULL) {
                                sprintf(filename, "%s-%s_%d.xml",
                                        result, this_msg_reference,




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

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


End of Linux-ha-cvs Digest, Vol 30, Issue 93
********************************************

Reply via email to