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: crm 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: Wed, 11 Jan 2006 05:46:56 -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/pengine


Modified Files:
        graph.c 


Log Message:
Nothing to do in this block unless we're both shutting down AND fencing

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/graph.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -3 -r1.72 -r1.73
--- graph.c     25 Oct 2005 14:02:15 -0000      1.72
+++ graph.c     11 Jan 2006 12:46:53 -0000      1.73
@@ -1,4 +1,4 @@
-/* $Id: graph.c,v 1.72 2005/10/25 14:02:15 andrew Exp $ */
+/* $Id: graph.c,v 1.73 2006/01/11 12:46:53 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -210,7 +210,7 @@
        GListPtr stop_actions = NULL;
        gboolean run_unprotected = TRUE;
        
-       if(shutdown_op != NULL) {
+       if(shutdown_op != NULL && stonith_op != NULL) {
                /* stop everything we can via shutdown_constraints() and then
                 *   shoot the node... the shutdown has been superceeded
                 */




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

Message: 2
Date: Wed, 11 Jan 2006 05:47:55 -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/pengine


Modified Files:
        ptest.c 


Log Message:
Add the ability to run ptest against a live CIB

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/ptest.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -3 -r1.68 -r1.69
--- ptest.c     14 Oct 2005 11:18:16 -0000      1.68
+++ ptest.c     11 Jan 2006 12:47:55 -0000      1.69
@@ -1,4 +1,4 @@
-/* $Id: ptest.c,v 1.68 2005/10/14 11:18:16 andrew Exp $ */
+/* $Id: ptest.c,v 1.69 2006/01/11 12:47:55 andrew Exp $ */
 
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -35,7 +35,7 @@
 
 #include <crm/cib.h>
 
-#define OPTARGS        "V?X:wD:"
+#define OPTARGS        "V?X:wD:L"
 
 #ifdef HAVE_GETOPT_H
 #  include <getopt.h>
@@ -107,11 +107,14 @@
        return action_name;
 }
 
+gboolean USE_LIVE_CIB = FALSE;
+
 int
 main(int argc, char **argv)
 {
        const char *fake_now = NULL;
        ha_time_t *a_date = NULL;
+       cib_t * cib_conn = NULL;
        
        crm_data_t * cib_object = NULL;
        int argerr = 0;
@@ -135,6 +138,7 @@
                static struct option long_options[] = {
                        /* Top-level Options */
                        {F_CRM_DATA,  1, 0, 'X'},
+                       {"live-check",  0, 0, 'L'},
                        {"help", 0, 0, 0},
       
                        {0, 0, 0, 0}
@@ -174,6 +178,9 @@
                                cl_log_enable_stderr(TRUE);
                                alter_debug(DEBUG_INC);
                                break;
+                       case 'L':
+                               USE_LIVE_CIB = TRUE;
+                               break;
                        default:
                                printf("?? getopt returned character code 0%o 
??\n", flag);
                                ++argerr;
@@ -199,7 +206,27 @@
   
        crm_info("=#=#=#=#= Getting XML =#=#=#=#=");    
 
-       if(xml_file != NULL) {
+       if(USE_LIVE_CIB) {
+               int rc = cib_ok;
+               cib_conn = cib_new();
+               rc = cib_conn->cmds->signon(
+                       cib_conn, "ptest", cib_command);
+
+               if(rc == cib_ok) {
+                       crm_info("Reading XML from: live cluster");
+                       cib_object = get_cib_copy(cib_conn);
+                       
+               } else {
+                       fprintf(stderr, "Live CIB query failed: %s\n",
+                               cib_error2string(rc));
+                       return 3;
+               }
+               if(cib_object == NULL) {
+                       fprintf(stderr, "Live CIB query failed: empty 
result\n");
+                       return 3;
+               }
+               
+       } else if(xml_file != NULL) {
                FILE *xml_strm = fopen(xml_file, "r");
                cib_object = file2xml(xml_strm);
        } else {




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

Message: 3
Date: Wed, 11 Jan 2006 05:55:20 -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/crmd


Modified Files:
        ccm.c 


Log Message:


Logging tweaks
"no-votes" from nodes that leave the membership should not count
  towards election completion

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/ccm.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -3 -r1.92 -r1.93
--- ccm.c       10 Jan 2006 13:46:41 -0000      1.92
+++ ccm.c       11 Jan 2006 12:55:20 -0000      1.93
@@ -1,4 +1,4 @@
-/* $Id: ccm.c,v 1.92 2006/01/10 13:46:41 andrew Exp $ */
+/* $Id: ccm.c,v 1.93 2006/01/11 12:55:20 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -126,7 +126,8 @@
                }
                
 
-               crm_info("CCM Activation passed... all set to go!");
+               crm_info("CCM connection established..."
+                        " waiting for first callback");
 
                G_main_add_fd(G_PRIORITY_HIGH, fsa_ev_fd, FALSE, ccm_dispatch,
                              fsa_ev_token, default_ipc_connection_destroy);
@@ -141,6 +142,7 @@
        return I_NULL;
 }
 
+extern GHashTable *voted;
 
 /*      A_CCM_EVENT    */
 enum crmd_fsa_input
@@ -204,10 +206,16 @@
                                crm_err("CCM node had no name");
                                continue;
                                
-                       } else if(safe_str_eq(uname, fsa_our_dc)) {
-                               crm_warn("Our DC node (%s) left the cluster",
-                                        uname);
-                               register_fsa_input(cause, I_ELECTION, NULL);
+                       } else {
+                               /* remove any no-votes they had cast */
+                               if(voted != NULL) {
+                                       g_hash_table_remove(voted, uname);
+                               }
+                               if(safe_str_eq(uname, fsa_our_dc)) {
+                                       crm_warn("Our DC node (%s) left the 
cluster",
+                                                uname);
+                                       register_fsa_input(cause, I_ELECTION, 
NULL);
+                               }
                        }
                }
        }
@@ -641,8 +649,8 @@
        const char *node_uname = (const char*)key;
        struct update_data_s* data = (struct update_data_s*)user_data;
 
-       crm_debug("Updating %s: %s/%s",
-                 node_uname, data->state, data->join);
+       crm_debug_2("Updating %s: %s/%s",
+                   node_uname, data->state, data->join);
 
        tmp1 = create_node_state(node_uname, NULL, data->state, NULL,
                                 data->join, NULL, FALSE, __FUNCTION__);




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

Message: 4
Date: Wed, 11 Jan 2006 05:56:15 -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/crmd


Modified Files:
        fsa.c 


Log Message:


Log the action *before* we execute it

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/fsa.c,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -3 -r1.127 -r1.128
--- fsa.c       10 Jan 2006 13:46:42 -0000      1.127
+++ fsa.c       11 Jan 2006 12:56:15 -0000      1.128
@@ -64,8 +64,7 @@
 void ghash_print_node(gpointer key, gpointer value, gpointer user_data);
 
 #define DOT_PREFIX "live.dot: "
-#define DOT_LOG    LOG_DEBUG_2
-#define do_dot_log(fmt...)     do_crm_log(DOT_LOG, NULL, NULL, fmt)
+#define do_dot_log(fmt...)     do_crm_log(LOG_DEBUG_2, NULL, NULL, fmt)
 #define do_dot_action(fmt...)  do_crm_log(LOG_DEBUG, NULL, NULL, fmt)
 
 longclock_t action_start = 0;
@@ -99,12 +98,12 @@
           if(action_diff_max_ms > 0) {                                 \
                   action_start = time_longclock();                     \
           }                                                            \
+          do_dot_action(DOT_PREFIX"\t// %s", fsa_action2string(an_action)); \
           result = function(an_action, fsa_data->fsa_cause, fsa_state, \
                          fsa_data->fsa_input, fsa_data);               \
           crm_debug_3("Action complete: %s (%.16llx)",                 \
                       fsa_action2string(an_action), an_action);        \
           CRM_DEV_ASSERT(result == I_NULL);                            \
-          do_dot_action(DOT_PREFIX"\t// %s", fsa_action2string(an_action)); \
        }
 
 #define IF_FSA_ACTION_NOTIME(an_action,function)                       \




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

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


End of Linux-ha-cvs Digest, Vol 26, Issue 16
********************************************

Reply via email to