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: include by andrew from 
      ([email protected])


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

Message: 1
Date: Thu,  8 Jun 2006 08:07:38 -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/crmd


Modified Files:
        crmd_messages.h callbacks.c messages.c 


Log Message:
Message routing should happen immediately

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/crmd_messages.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- crmd_messages.h     10 Jan 2006 13:46:42 -0000      1.29
+++ crmd_messages.h     8 Jun 2006 14:07:38 -0000       1.30
@@ -41,6 +41,7 @@
        gboolean prepend, const char *raised_from);
 
 extern void fsa_dump_queue(int log_level);
+extern void route_message(enum crmd_fsa_cause cause, ha_msg_input_t *input);
 
 #define crmd_fsa_stall(cur_input) if(cur_input != NULL) {              \
                register_fsa_input_adv(                                 \
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/callbacks.c,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -3 -r1.123 -r1.124
--- callbacks.c 11 May 2006 09:11:33 -0000      1.123
+++ callbacks.c 8 Jun 2006 14:07:38 -0000       1.124
@@ -182,21 +182,11 @@
        }
 
        if(new_input == NULL) {
-               int msg_id = -1;
                crm_log_message_adv(LOG_MSG, "HA[inbound]", msg);
                new_input = new_ha_msg_input(msg);
-               msg_id = register_fsa_input(C_HA_MESSAGE, I_ROUTER, new_input);
-               crm_debug_2("Submitted %s from %s for processing (job=%d)",
-                           op, from, msg_id);
+               route_message(C_HA_MESSAGE, new_input);
        }
 
-       
-#if 0
-       if(ha_msg_value(msg, XML_ATTR_REFERENCE) == NULL) {
-               ha_msg_add(new_input->msg, XML_ATTR_REFERENCE, seq);
-       }
-#endif
-
        delete_ha_msg_input(new_input);
        trigger_fsa(fsa_source);
 
@@ -240,7 +230,7 @@
                crm_debug_2("Processing msg from %s", curr_client->table_key);
                crm_log_message_adv(LOG_DEBUG_2, "CRMd[inbound]", 
new_input->msg);
                if(crmd_authorize_message(new_input, curr_client)) {
-                       register_fsa_input(C_IPC_MESSAGE, I_ROUTER, new_input);
+                       route_message(C_IPC_MESSAGE, new_input);
                }
                delete_ha_msg_input(new_input);
                
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/messages.c,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -3 -r1.153 -r1.154
--- messages.c  29 May 2006 13:18:39 -0000      1.153
+++ messages.c  8 Jun 2006 14:07:38 -0000       1.154
@@ -386,60 +386,50 @@
             enum crmd_fsa_input current_input,
             fsa_data_t *msg_data)
 {
-       enum crmd_fsa_input result = I_NULL;
        ha_msg_input_t *input = fsa_typed_data(fsa_dt_ha_msg);
-       gboolean routed = FALSE;
+       route_message(msg_data->fsa_cause, input);
+       return I_NULL;
+}
 
-       if(msg_data->fsa_cause != C_IPC_MESSAGE
-          && msg_data->fsa_cause != C_HA_MESSAGE) {
-               /* dont try and route these */
-               crm_warn("Can only process HA and IPC messages");
-               return I_NULL;
-       }
+void
+route_message(enum crmd_fsa_cause cause, ha_msg_input_t *input)
+{
+       enum crmd_fsa_input result = I_NULL;
+
+       CRM_CHECK(cause == C_IPC_MESSAGE || cause == C_HA_MESSAGE, return);
 
        /* try passing the buck first */
        crm_debug_4("Attempting to route message");
-       routed = relay_message(input->msg, cause==C_IPC_MESSAGE);
-       
-       if(routed == FALSE) {
-               crm_debug_4("Message wasn't routed... try handling locally");
-               
-               /* calculate defer */
-               result = handle_message(input);
-               switch(result) {
-                       case I_NULL:
-                               break;
-                       case I_CIB_OP:
-                               break;
-                       case I_ROUTER:
-                               if(cause == C_IPC_MESSAGE) {
-                                       /* process local messages immediately
-                                        *  it might be the TE telling us its
-                                        *  done
-                                        */
-                                       break;
-                               }
-                               /* fall through */
-                       default:
-                               crm_debug_4("Defering local processing of 
message");
-                               register_fsa_input_later(
-                                       cause, result, msg_data->data);
-                               
-                               result = I_NULL;
-                               break;
-               }
-               if(result == I_NULL) {
-                       crm_debug_4("Message processed");
-                       
-               } else {
-                       register_fsa_input(cause, result, msg_data->data);
-               }
-               
-       } else {
+       if(relay_message(input->msg, cause==C_IPC_MESSAGE)) {
                crm_debug_4("Message routed...");
                input->msg = NULL;
+               return;
+       }
+       
+       crm_debug_4("Message wasn't routed... try handling locally");
+       
+       /* calculate defer */
+       result = handle_message(input);
+       switch(result) {
+               case I_NULL:
+                       crm_debug_4("Message processed");
+                       break;
+               case I_CIB_OP:
+                       break;
+               case I_ROUTER:
+                       break;
+               default:
+                       crm_debug_4("Defering local processing of message");
+                       register_fsa_input_later(cause, result, input);
+                       
+                       result = I_NULL;
+                       break;
+       }
+
+       if(result != I_NULL) {
+               /* add to the front of the queue */
+               register_fsa_input(cause, result, input);
        }
-       return I_NULL;
 }
 
 




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

Message: 2
Date: Thu,  8 Jun 2006 08:08:10 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: include by andrew from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

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

Dir     : linux-ha/include/crm/pengine


Modified Files:
        Makefile.am common.h status.h 


Log Message:
Moved some typedefs around

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/include/crm/pengine/Makefile.am,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- Makefile.am 7 Jun 2006 12:46:55 -0000       1.1
+++ Makefile.am 8 Jun 2006 14:08:09 -0000       1.2
@@ -20,6 +20,3 @@
 includedir=$(base_includedir)/heartbeat
 
 include_HEADERS                = common.h complex.h rules.h status.h
-
-clean-generic:
-       rm -f *~
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/include/crm/pengine/common.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- common.h    7 Jun 2006 12:46:55 -0000       1.1
+++ common.h    8 Jun 2006 14:08:09 -0000       1.2
@@ -1,4 +1,4 @@
-/* $Id: common.h,v 1.1 2006/06/07 12:46:55 andrew Exp $ */
+/* $Id: common.h,v 1.2 2006/06/08 14:08:09 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -92,6 +92,14 @@
        rsc_req_stonith
 };
 
+enum pe_ordering {
+       pe_ordering_manditory,
+       pe_ordering_restart,
+       pe_ordering_recover,
+       pe_ordering_postnotify,
+       pe_ordering_optional
+};
+
 enum rsc_role_e {
        RSC_ROLE_UNKNOWN,
        RSC_ROLE_STOPPED,
@@ -119,7 +127,6 @@
        pe_print_rsconly = 0x0080,
 };
 
-
 extern int merge_weights(int w1, int w2);
 
 extern const char *task2text(enum action_tasks task);
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/include/crm/pengine/status.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- status.h    7 Jun 2006 12:46:55 -0000       1.1
+++ status.h    8 Jun 2006 14:08:09 -0000       1.2
@@ -1,4 +1,4 @@
-/* $Id: status.h,v 1.1 2006/06/07 12:46:55 andrew Exp $ */
+/* $Id: status.h,v 1.2 2006/06/08 14:08:09 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -25,7 +25,9 @@
 
 typedef struct node_s node_t;
 typedef struct color_s color_t;
+typedef struct action_s action_t;
 typedef struct resource_s resource_t;
+typedef struct action_wrapper_s action_wrapper_t;
 
 typedef enum no_quorum_policy_e {
        no_quorum_freeze,
@@ -166,6 +168,50 @@
                GHashTable *parameters;    
 };
 
+struct action_s 
+{
+               int         id;
+               int         priority;
+               resource_t *rsc;
+               void       *rsc_opaque;
+               node_t     *node;
+               const char *task;
+
+               char *uuid;
+               crm_data_t *op_entry;
+               
+               gboolean pseudo;
+               gboolean runnable;
+               gboolean optional;
+               gboolean failure_is_fatal;
+
+               enum rsc_start_requirement needs;
+               enum action_fail_response  on_fail;
+               enum rsc_role_e fail_role;
+               
+               gboolean dumped;
+               gboolean processed;
+
+               action_t *pre_notify;
+               action_t *pre_notified;
+               action_t *post_notify;
+               action_t *post_notified;
+               
+               int seen_count;
+
+               GHashTable *meta;
+               GHashTable *extra;
+               GHashTable *notify_keys;  /* do NOT free */
+               
+               GListPtr actions_before; /* action_warpper_t* */
+               GListPtr actions_after;  /* action_warpper_t* */
+};
+
+struct action_wrapper_s 
+{
+               enum pe_ordering type;
+               action_t *action;
+};
 
 gboolean cluster_status(pe_working_set_t *data_set);
 extern void set_working_set_defaults(pe_working_set_t *data_set);




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

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


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

Reply via email to