Send Linux-ha-cvs mailing list submissions to
        linux-ha-cvs@lists.linux-ha.org

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: cim by panjiam from 
      (linux-ha-cvs@lists.linux-ha.org)
   2. Linux-HA CVS: crm by andrew from 
      (linux-ha-cvs@lists.linux-ha.org)
   3. Linux-HA CVS: crm by andrew from 
      (linux-ha-cvs@lists.linux-ha.org)
   4. Linux-HA CVS: crm by andrew from 
      (linux-ha-cvs@lists.linux-ha.org)


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

Message: 1
Date: Wed, 26 Apr 2006 02:10:38 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
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/tests


Modified Files:
        ResourceTest.sh 


Log Message:
constraint creation test
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cim/tests/ResourceTest.sh,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- ResourceTest.sh     26 Apr 2006 02:25:07 -0000      1.6
+++ ResourceTest.sh     26 Apr 2006 08:10:38 -0000      1.7
@@ -93,7 +93,7 @@
 
 echo "deleting resource: $RSC_ID."
 wbemcli di http://$USER:[EMAIL PROTECTED]/root/cimv2:$CLASSNAME.Id="$RSC_ID",\
-CreationClassName="HA_PrimitiveResource",\
+CreationClassName="$CLASSNAME",\
 SystemName="LinuxHACluster",\
 SystemCreationClassName="HA_LinuxHA"
 }
@@ -129,6 +129,38 @@
 }
 
 
+function create_location_constraint() 
+{
+CONS_ID=$1
+RSC_ID=$2
+NODE=$3
+SCORE=$4
+
+echo "creating location_constraint $CONS_ID for id: $RSC_ID, $NODE,$SCORE"
+wbemcli ci http://$USER:[EMAIL 
PROTECTED]/root/cimv2:HA_LocationConstraint.Id="$CONS_ID",\
+CreationClassName="HA_LocationConstraint",\
+SystemName="LinuxHACluster",\
+SystemCreationClassName="HA_LinuxHA" \
+Id="$CONS_ID",\
+CreationClassName="HA_LocationConstraint",\
+SystemName="LinuxHACluster",\
+SystemCreationClassName="HA_LinuxHA",\
+Resource="$RSC_ID",\
+Rule="node #eq $NODE",\
+Score=$SCORE
+} 
+
+function delete_constraint()
+{
+CLASSNAME=$1
+CONS_ID=$2
+
+echo "deleting constraint: $CONS_ID."
+wbemcli di http://$USER:[EMAIL PROTECTED]/root/cimv2:$CLASSNAME.Id="$CONS_ID",\
+CreationClassName="$CLASSNAME",\
+SystemName="LinuxHACluster",\
+SystemCreationClassName="HA_LinuxHA"
+}
 ##############################################################
 # primitive resource
 ##############################################################
@@ -159,7 +191,12 @@
 fi
 
 
-delete_resource HA_PrimitiveResource $RESOURCE_ID
+#delete_resource HA_PrimitiveResource $RESOURCE_ID
+echo "---------------------------------------------------"
+echo "Location Constraint creation test"
+echo "---------------------------------------------------"
+delete_constraint HA_LocationConstraint ${RESOURCE_ID}_location_cons
+create_location_constraint ${RESOURCE_ID}_location_cons ${RESOURCE_ID} "node1" 
"1000"
 
 #############################################################
 # resource group
@@ -207,5 +244,7 @@
 resource_query $GROUP_ID | grep $SUB_RESOURCE_ID2 >/dev/null \
         || { echo "[FAILED] $SUB_RESOURCE_ID2 not found in CIB." && rc=1; }
 
-delete_resource HA_ResourceGroup $GROUP_ID
+#delete_resource HA_ResourceGroup $GROUP_ID
+
+
 




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

Message: 2
Date: Wed, 26 Apr 2006 07:32:52 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
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:
        crmadmin.c 


Log Message:
These commands went to crm_standby

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/admin/crmadmin.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -3 -r1.67 -r1.68
--- crmadmin.c  20 Apr 2006 10:55:22 -0000      1.67
+++ crmadmin.c  26 Apr 2006 13:32:52 -0000      1.68
@@ -1,4 +1,4 @@
-/* $Id: crmadmin.c,v 1.67 2006/04/20 10:55:22 andrew Exp $ */
+/* $Id: crmadmin.c,v 1.68 2006/04/26 13:32:52 andrew Exp $ */
 
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -721,16 +721,6 @@
                "request the uname of the DC\n", "dc_lookup", 'D');
        fprintf(stream, "\t--%s (-%c)\t\t: "
                "request the uname of all member nodes\n", "nodes", 'N');
-#if 0
-       fprintf(stream, "\t--%s (-%c)\t: "
-               "request the names of all resources\n", "resources", 'R');
-#endif
-       fprintf(stream, "\t--%s (-%c) <rsc>\t: "
-               "request the location of <rsc>\n", "whereis", 'W');
-       fprintf(stream, "\t--%s (-%c) <node_uuid>\t: "
-               "Tell the node to enter \"standby\" mode\n", "standby", 's');
-       fprintf(stream, "\t--%s (-%c) <node_uuid>\t: "
-               "Tell the node to exit \"standby\" mode\n", "active", 'a');
 /*     fprintf(stream, "\t--%s (-%c)\t\n", "disconnect", 'D'); */
        fflush(stream);
 




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

Message: 3
Date: Wed, 26 Apr 2006 07:33:25 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
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/crmd


Modified Files:
        callbacks.c 


Log Message:
Extra asserts

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/callbacks.c,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -3 -r1.121 -r1.122
--- callbacks.c 24 Apr 2006 06:50:06 -0000      1.121
+++ callbacks.c 26 Apr 2006 13:33:24 -0000      1.122
@@ -65,6 +65,9 @@
                channel = cluster_conn->llc_ops->ipcchan(cluster_conn);
        }
        
+       CRM_CHECK(cluster_conn != NULL, ;);
+       CRM_CHECK(channel != NULL, ;);
+       
        if(channel != NULL && IPC_ISRCONN(channel)) {
                if(cluster_conn->llc_ops->msgready(cluster_conn) == 0) {
                        crm_debug_2("no message ready yet");




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

Message: 4
Date: Wed, 26 Apr 2006 07:33:42 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
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/crmd


Modified Files:
        election.c 


Log Message:
more logging

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/election.c,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -3 -r1.111 -r1.112
--- election.c  18 Apr 2006 10:59:46 -0000      1.111
+++ election.c  26 Apr 2006 13:33:42 -0000      1.112
@@ -131,6 +131,12 @@
                unsigned int winning_bornon;
 };
 
+static void
+log_node(gpointer key, gpointer value, gpointer user_data)
+{
+       crm_err("%s: %s", (char*)user_data, (char*)key);
+}
+
 enum crmd_fsa_input
 do_election_check(long long action,
                       enum crmd_fsa_cause cause,
@@ -148,10 +154,23 @@
        if(fsa_state != S_ELECTION) {
                crm_debug("Ignore election check: we not in an election");
 
-       } else if(voted_size == num_members) {
+       } else if(voted_size >= num_members) {
                /* we won and everyone has voted */
                crm_timer_stop(election_timeout);
                register_fsa_input(C_FSA_INTERNAL, I_ELECTION_DC, NULL);
+               if(voted_size > num_members) {
+                       char *data = NULL;
+                       
+                       data = crm_strdup("member");
+                       g_hash_table_foreach(
+                               fsa_membership_copy->members, log_node, data);
+                       crm_free(data);
+                       
+                       data = crm_strdup("voted");
+                       g_hash_table_foreach(voted, log_node, data);
+                       crm_free(data);
+                       
+               }
                crm_debug("Destroying voted hash");
                g_hash_table_destroy(voted);
                voted = NULL;




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

_______________________________________________
Linux-ha-cvs mailing list
Linux-ha-cvs@lists.linux-ha.org
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs


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

Reply via email to