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])


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

Message: 1
Date: Tue, 14 Feb 2006 05:03:42 -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:
        native.c 


Log Message:


Logging
Bug 1072: OCFS2 Support - Provide notify data to start/stop actions

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/native.c,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -3 -r1.108 -r1.109
--- native.c    27 Jan 2006 11:15:49 -0000      1.108
+++ native.c    14 Feb 2006 12:03:41 -0000      1.109
@@ -1,4 +1,4 @@
-/* $Id: native.c,v 1.108 2006/01/27 11:15:49 andrew Exp $ */
+/* $Id: native.c,v 1.109 2006/02/14 12:03:41 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -130,6 +130,7 @@
                const char *class = crm_element_value(
                        rsc->xml, XML_AGENT_ATTR_CLASS);
 
+               
                /* these are errors because hardly any gets it right
                 *   at the moment and this way the might notice
                 */
@@ -137,8 +138,8 @@
                       "  Latest: %s/%s", rsc->id,
                       g_list_length(rsc->running_on),
                       node->details->uname, node->details->id);
-               pe_err("Please confirm your %s Resource Agent (on all nodes)"
-                      " conforms to the %s spec.", type, class);
+               cl_log(LOG_ERR, "See %s for more information.",
+                      HAURL("v2/faq/resource_too_active"));
                
                if(rsc->recovery_type == recovery_stop_only) {
                        native_assign_color(rsc, data_set->no_color);
@@ -942,7 +943,7 @@
                }
        }
 
-       if(options & pe_print_rsconly) {
+       if((options & pe_print_rsconly) || g_list_length(rsc->running_on) > 1) {
                const char *desc = NULL;
                desc = crm_element_value(rsc->xml, XML_ATTR_DESC);
                status_print("%s%s (%s%s%s:%s)%s%s",
@@ -971,7 +972,7 @@
                status_print(" </font> ");
        }
        
-       if((options & pe_print_rsconly) == 0) {
+       if((options & pe_print_rsconly)) {
                
        } else if(g_list_length(rsc->running_on) > 1) {
                if(options & pe_print_html) {
@@ -983,16 +984,20 @@
                
                slist_iter(node, node_t, rsc->running_on, lpc,
                           if(options & pe_print_html) {
-                                  status_print("<li>\n");
+                                  status_print("<li>\n%s",
+                                               node->details->uname);
 
                           } else if((options & pe_print_printf)
                                     || (options & pe_print_ncurses)) {
-                                  status_print(" ");
+                                  status_print("\t%s", node->details->uname);
 
                           } else if((options & pe_print_log)) {
-                                  status_print("\t-");
+                                  status_print("\t%d : %s",
+                                               lpc, node->details->uname);
+
+                          } else {
+                                  status_print("%s", node->details->uname);
                           }
-                          status_print("%s", node->details->uname);
                           if(options & pe_print_html) {
                                   status_print("</li>\n");
 
@@ -1631,6 +1636,7 @@
        slist_iter(
                local_op, action_t, possible_matches, lpc,
 
+               local_op->notify_keys = n_data->keys;
                if(local_op->optional == FALSE) {
                        registered = TRUE;
                        register_activity(rsc, task, local_op->node, n_data);




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

Message: 2
Date: Tue, 14 Feb 2006 05:06:31 -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:
        utils.c 


Log Message:
Bug 1084: Nodes that are offline but have active resources listed need to
  be marked as unclean for possible fencing

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/utils.c,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -3 -r1.122 -r1.123
--- utils.c     9 Jan 2006 21:20:21 -0000       1.122
+++ utils.c     14 Feb 2006 12:06:31 -0000      1.123
@@ -1,4 +1,4 @@
-/* $Id: utils.c,v 1.122 2006/01/09 21:20:21 andrew Exp $ */
+/* $Id: utils.c,v 1.123 2006/02/14 12:06:31 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -657,8 +657,9 @@
 }
 
 action_t *
-custom_action(resource_t *rsc, char *key, const char *task, node_t *on_node,
-             gboolean optional, gboolean foo, pe_working_set_t *data_set)
+custom_action(resource_t *rsc, char *key, const char *task,
+             node_t *on_node, gboolean optional, gboolean save_action,
+             pe_working_set_t *data_set)
 {
        action_t *action = NULL;
        GListPtr possible_matches = NULL;
@@ -668,7 +669,7 @@
        CRM_DEV_ASSERT(task != NULL);
        if(crm_assert_failed) { return NULL; }
 
-       if(foo && rsc != NULL) {
+       if(save_action && rsc != NULL) {
                possible_matches = find_actions(rsc->actions, key, on_node);
        }
        
@@ -695,7 +696,7 @@
 
                crm_malloc0(action, sizeof(action_t));
                if(action != NULL) {
-                       if(foo) {
+                       if(save_action) {
                                action->id   = data_set->action_id++;
                        } else {
                                action->id = 0;
@@ -726,7 +727,7 @@
                        add_hash_param(action->extra,
                                       XML_ATTR_CRM_VERSION, CRM_FEATURE_SET);
                        
-                       if(foo) {
+                       if(save_action) {
                                data_set->actions = g_list_append(
                                        data_set->actions, action);
                        }
@@ -739,7 +740,7 @@
                                unpack_operation(
                                        action, action->op_entry, data_set);
 
-                               if(foo) {
+                               if(save_action) {
                                        rsc->actions = g_list_append(
                                                rsc->actions, action);
                                }
@@ -755,6 +756,8 @@
        }
        
        if(rsc != NULL) {
+               enum action_tasks a_task = text2task(action->task);
+               
                if(action->node != NULL) {
                        unpack_instance_attributes(
                                action->op_entry, XML_TAG_ATTR_SETS,
@@ -778,10 +781,15 @@
                        action->runnable = FALSE;
 #endif 
                } else if(action->node->details->online == FALSE) {
-                       crm_warn("Action %s on %s is unrunnable (offline)",
-                                action->uuid, 
action->node?action->node->details->uname:"<none>");
                        action->runnable = FALSE;
-
+                       crm_warn("Action %s on %s is unrunnable (offline)",
+                                action->uuid, action->node->details->uname);
+                       if(save_action && a_task == stop_rsc) {
+                               pe_proc_warn("Marking node %s unclean",
+                                            action->node->details->uname);
+                               action->node->details->unclean = TRUE;
+                       }
+                       
                } else if(action->needs == rsc_req_nothing) {
                        crm_debug_2("Action %s doesnt require anything",
                                  action->uuid);
@@ -815,19 +823,21 @@
                        crm_debug_2("Action %s is runnable", action->uuid);
                        action->runnable = TRUE;
                }
-               
-               switch(text2task(action->task)) {
-                       case stop_rsc:
-                               rsc->stopping = TRUE;
-                               break;
-                       case start_rsc:
-                               rsc->starting = FALSE;
-                               if(action->runnable) {
+
+               if(save_action) {
+                       switch(a_task) {
+                               case stop_rsc:
+                                       rsc->stopping = TRUE;
+                                       break;
+                               case start_rsc:
+                                       rsc->starting = FALSE;
+                                       if(action->runnable) {
                                        rsc->starting = TRUE;
-                               }
-                               break;
-                       default:
-                               break;
+                                       }
+                                       break;
+                               default:
+                                       break;
+                       }
                }
        }
        return action;




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

Message: 3
Date: Tue, 14 Feb 2006 05:07:48 -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 Makefile.am 


Log Message:
Tests transitions for completability

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/ptest.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -3 -r1.70 -r1.71
--- ptest.c     26 Jan 2006 11:36:58 -0000      1.70
+++ ptest.c     14 Feb 2006 12:07:48 -0000      1.71
@@ -1,4 +1,4 @@
-/* $Id: ptest.c,v 1.70 2006/01/26 11:36:58 andrew Exp $ */
+/* $Id: ptest.c,v 1.71 2006/02/14 12:07:48 andrew Exp $ */
 
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -29,6 +29,7 @@
 #include <errno.h>
 #include <fcntl.h>
 
+#include <crm/transition.h>
 #include <crm/common/xml.h>
 #include <crm/common/util.h>
 #include <crm/msg_xml.h>
@@ -112,6 +113,8 @@
 int
 main(int argc, char **argv)
 {
+       enum transition_status graph_rc = -1;
+       crm_graph_t *transition = NULL;
        const char *fake_now = NULL;
        ha_time_t *a_date = NULL;
        cib_t * cib_conn = NULL;
@@ -321,11 +324,25 @@
                        );
                );
        dot_write("}");
+
+       transition = unpack_graph(data_set.graph);
+       do {
+               graph_rc = run_graph(transition);
+               
+       } while(graph_rc == transition_active);
+
+       if(graph_rc != transition_complete) {
+               crm_crit("Transition failed: %s", transition_status(graph_rc));
+               print_graph(LOG_ERR, transition);
+       }
+
        data_set.input = NULL;
        cleanup_calculations(&data_set);
-
+       destroy_graph(transition);
+       
        crm_mem_stats(NULL);
        CRM_DEV_ASSERT(crm_mem_stats(NULL) == FALSE);
+       CRM_DEV_ASSERT(graph_rc == transition_complete);
 
        crm_free(cib_object);   
 
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/Makefile.am,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -3 -r1.30 -r1.31
--- Makefile.am 1 Nov 2005 15:01:38 -0000       1.30
+++ Makefile.am 14 Feb 2006 12:07:48 -0000      1.31
@@ -34,6 +34,7 @@
 apigid         = @HA_APIGID@
 crmuid         = @HA_CCMUID@
 
+
 COMMONLIBS     = $(CRM_DEBUG_LIBS)                                     \
                $(top_builddir)/lib/clplumbing/libplumb.la              \
                $(top_builddir)/lib/pils/libpils.la                     \
@@ -68,13 +69,15 @@
 
 ptest_CFLAGS   = -DHA_VARLIBDIR='"@HA_VARLIBDIR@"'
 ptest_LDFLAGS  = 
-ptest_LDADD    = $(COMMONLIBS) 
+ptest_LDADD    = $(COMMONLIBS) \
+               $(top_builddir)/lib/crm/transition/libtransitioner.la
 
 pengine_SOURCES        = main.c
 
 pengine_CFLAGS = -DHA_VARLIBDIR='"@HA_VARLIBDIR@"'
 pengine_LDFLAGS        = 
 pengine_LDADD  = $(COMMONLIBS) \
+               $(top_builddir)/lib/crm/transition/libtransitioner.la   \
                $(top_builddir)/lib/hbclient/libhbclient.la
 
 #




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

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


End of Linux-ha-cvs Digest, Vol 27, Issue 58
********************************************

Reply via email to