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


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

Message: 1
Date: Thu, 15 Jun 2006 23:54:10 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: mgmt by zhenh from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : zhenh
Host    : 
Project : linux-ha
Module  : mgmt

Dir     : linux-ha/mgmt/client


Modified Files:
        haclient.py.in 


Log Message:
add parameter checking for get_rsc_meta
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/client/haclient.py.in,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -3 -r1.60 -r1.61
--- haclient.py.in      15 Jun 2006 08:11:29 -0000      1.60
+++ haclient.py.in      16 Jun 2006 05:54:09 -0000      1.61
@@ -1994,6 +1994,8 @@
                return attrs
                
        def get_rsc_meta(self, rsc_class, rsc_type, rsc_provider) :
+               if rsc_class == None or rsc_type == None :
+                       return None
                lines = self.query("rsc_metadata\n%s\n%s\n%s"% \
                                (rsc_class, rsc_type, rsc_provider),True)
                if lines == None :




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

Message: 2
Date: Fri, 16 Jun 2006 01:09:57 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: mgmt by zhenh from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : zhenh
Host    : 
Project : linux-ha
Module  : mgmt

Dir     : linux-ha/mgmt/client


Modified Files:
        haclient.py.in 


Log Message:
fix a confusing label
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/mgmt/client/haclient.py.in,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -3 -r1.61 -r1.62
--- haclient.py.in      16 Jun 2006 05:54:09 -0000      1.61
+++ haclient.py.in      16 Jun 2006 07:09:56 -0000      1.62
@@ -1612,7 +1612,7 @@
                        ('resource', None, _('Resources')),
                        ('addrsc', "ha-add-resource", _('Add New Item'), 
None,_('add new item'), self.on_add_item),
                        ('delrsc', "ha-remove-resource", _('Delete'), 
None,_('delete current item'), self.on_del_item),
-                       ('cleanuprsc', "ha-cleanup-resource", _('Clean up'), 
None,_('refresh the resource'), self.on_item_cleanup),
+                       ('cleanuprsc', "ha-cleanup-resource", _('Clean up 
resource'), None,_('cleanup the resource'), self.on_item_cleanup),
                        ('startrsc', "ha-start-resource", _('Start'), 
None,_('start resource'), self.on_item_action),
                        ('stoprsc', "ha-stop-resource", _('Stop'), None,_('stop 
resource'), self.on_item_action),
                        ('defaultrsc', "ha-default-resource", _('Default'), 
None,_('work as default'), self.on_item_action),




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

Message: 3
Date: Fri, 16 Jun 2006 01:28:35 -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:
        allocate.c native.c regression.core.sh regression.sh 


Log Message:
Assuming rsc_order(A,B), in addition to ordering B after A, allow B to be
  configurably blocked if A cannot run.
This is achieved by setting rsc_order->score > 0

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/allocate.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- allocate.c  13 Jun 2006 09:43:12 -0000      1.4
+++ allocate.c  16 Jun 2006 07:28:34 -0000      1.5
@@ -1,4 +1,4 @@
-/* $Id: allocate.c,v 1.4 2006/06/13 09:43:12 andrew Exp $ */
+/* $Id: allocate.c,v 1.5 2006/06/16 07:28:34 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -1027,11 +1027,13 @@
 unpack_rsc_order(crm_data_t * xml_obj, pe_working_set_t *data_set)
 {
        gboolean symmetrical_bool = TRUE;
+       enum pe_ordering cons_weight = pe_ordering_optional;
        
        const char *id     = crm_element_value(xml_obj, XML_ATTR_ID);
        const char *type   = crm_element_value(xml_obj, XML_ATTR_TYPE);
        const char *id_rh  = crm_element_value(xml_obj, XML_CONS_ATTR_TO);
        const char *id_lh  = crm_element_value(xml_obj, XML_CONS_ATTR_FROM);
+       const char *score  = crm_element_value(xml_obj, XML_RULE_ATTR_SCORE);
        const char *action = crm_element_value(xml_obj, XML_CONS_ATTR_ACTION);
        const char *action_rh = crm_element_value(xml_obj, 
XML_CONS_ATTR_TOACTION);
 
@@ -1093,10 +1095,15 @@
                return FALSE;
        }
 
+       if(crm_atoi(score, "0") > 0) {
+               /* the name seems weird but the effect is correct */
+               cons_weight = pe_ordering_restart;
+       }
+       
        custom_action_order(
                rsc_lh, generate_op_key(rsc_lh->id, action, 0), NULL,
                rsc_rh, generate_op_key(rsc_rh->id, action_rh, 0), NULL,
-               pe_ordering_optional, data_set);
+               cons_weight, data_set);
 
        if(rsc_rh->restart_type == pe_restart_restart
           && safe_str_eq(action, action_rh)) {
@@ -1122,7 +1129,7 @@
        custom_action_order(
                rsc_rh, generate_op_key(rsc_rh->id, action_rh, 0), NULL,
                rsc_lh, generate_op_key(rsc_lh->id, action, 0), NULL,
-               pe_ordering_optional, data_set);
+               cons_weight, data_set);
 
        if(rsc_lh->restart_type == pe_restart_restart
           && safe_str_eq(action, action_rh)) {
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/native.c,v
retrieving revision 1.151
retrieving revision 1.152
diff -u -3 -r1.151 -r1.152
--- native.c    13 Jun 2006 09:43:12 -0000      1.151
+++ native.c    16 Jun 2006 07:28:34 -0000      1.152
@@ -1,4 +1,4 @@
-/* $Id: native.c,v 1.151 2006/06/13 09:43:12 andrew Exp $ */
+/* $Id: native.c,v 1.152 2006/06/16 07:28:34 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -636,17 +636,6 @@
                lh_actions = g_list_append(NULL, lh_action);
 
        } else if(lh_action == NULL && lh_rsc != NULL) {
-#if 0
-/* this should be safe to remove */
-               if(order->strength == pecs_must) {
-                       crm_debug_4("No LH-Side (%s/%s) found for constraint..."
-                                 " creating",
-                                 lh_rsc->id, order->lh_action_task);
-                       pe_err("BROKEN CODE");
-                       custom_action(
-                               lh_rsc, order->lh_action_task, NULL, NULL);
-               }
-#endif
                lh_actions = find_actions(
                        lh_rsc->actions, order->lh_action_task, NULL);
 
@@ -654,22 +643,22 @@
                        crm_debug_4("No LH-Side (%s/%s) found for constraint",
                                  lh_rsc->id, order->lh_action_task);
 
-                       if(order->rh_rsc != NULL) {
-                               crm_debug_4("RH-Side was: (%s/%s)",
-                                         order->rh_rsc->id,
-                                         order->rh_action_task);
+                       if(lh_rsc->next_role == RSC_ROLE_STOPPED) {
+                               resource_t *rh_rsc = order->rh_rsc;
+                               if(order->rh_action && order->type == 
pe_ordering_restart) {
+                                       crm_debug("No LH(%s/%s) found for 
RH(%s)...",
+                                               lh_rsc->id, 
order->lh_action_task,
+                                               order->rh_action->uuid);
+                                       order->rh_action->runnable = FALSE;
+                                       return;
                                
-                       } else if(order->rh_action != NULL
-                                 && order->rh_action->rsc != NULL) {
-                               crm_debug_4("RH-Side was: (%s/%s)",
-                                         order->rh_action->rsc->id,
-                                         order->rh_action_task);
-                               
-                       } else if(order->rh_action != NULL) {
-                               crm_debug_4("RH-Side was: %s",
-                                         order->rh_action_task);
-                       } else {
-                               crm_debug_4("RH-Side was NULL");
+                               } else if(rh_rsc != NULL) {
+                                       crm_debug("No LH(%s/%s) found for 
RH(%s/%s)...",
+                                                 lh_rsc->id, 
order->lh_action_task,
+                                                 rh_rsc->id, 
order->rh_action_task);
+                                       rh_rsc->cmds->rsc_order_rh(NULL, 
rh_rsc, order);
+                                       return;
+                               }
                        }
                        
                        return;
@@ -757,7 +746,13 @@
        slist_iter(
                rh_action_iter, action_t, rh_actions, lpc,
 
+               if(lh_action) {
                order_actions(lh_action, rh_action_iter, order->type); 
+
+               } else if(order->type == pe_ordering_restart) {
+                       rh_action_iter->runnable = FALSE;
+               }
+               
                );
 
        pe_free_shallow_adv(rh_actions, FALSE);
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/regression.core.sh,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- regression.core.sh  23 May 2006 07:41:25 -0000      1.20
+++ regression.core.sh  16 Jun 2006 07:28:34 -0000      1.21
@@ -25,6 +25,17 @@
 > $failed
 
 num_failed=0
+function ptest() {
+    build_dir=`pwd | sed -e "s/Development/build/"`
+    if [ -x ptest ]; then
+       ./ptest $*
+    elif [ -x $build_dir/ptest ]; then
+       $build_dir/ptest $*
+    else
+       echo No build directory found, using installed version
+       `which ptest` $*
+    fi
+}
 
 function do_test {
 
@@ -50,7 +61,7 @@
     fi
 
 #    ../admin/crm_verify -X $input
-    ./ptest -V -X $input -D $dot_output -G $output
+    ptest -V -X $input -D $dot_output -G $output
 
     if [ -s core ]; then
        echo "Test $name        ($base)...      Moved core to core.${base}";
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/regression.sh,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -3 -r1.83 -r1.84
--- regression.sh       8 Jun 2006 13:39:10 -0000       1.83
+++ regression.sh       16 Jun 2006 07:28:34 -0000      1.84
@@ -86,6 +86,7 @@
 do_test order4 "Order (multiple)  "
 do_test order5 "Order (move)  "
 do_test order6 "Order (move w/ restart)  "
+do_test order7 "Order (manditory)  "
 
 #echo ""
 #do_test agent1 "version: lt (empty)"




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

_______________________________________________
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 50
********************************************

Reply via email to