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: heartbeat by alan from 
      (linux-ha-cvs@lists.linux-ha.org)
   2. Linux-HA CVS: resources by panjiam from 
      (linux-ha-cvs@lists.linux-ha.org)
   3. Linux-HA CVS: lrm by sunjd from  (linux-ha-cvs@lists.linux-ha.org)


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

Message: 1
Date: Wed, 21 Jun 2006 19:00:52 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: heartbeat by alan from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : alan
Host    : 
Project : linux-ha
Module  : heartbeat

Dir     : linux-ha/heartbeat


Modified Files:
        heartbeat.c 


Log Message:
Raised the heartbeat (debug) CPU limit to 70%.

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/heartbeat/heartbeat.c,v
retrieving revision 1.512
retrieving revision 1.513
diff -u -3 -r1.512 -r1.513
--- heartbeat.c 13 Jun 2006 07:57:11 -0000      1.512
+++ heartbeat.c 22 Jun 2006 01:00:51 -0000      1.513
@@ -1,4 +1,4 @@
-/* $Id: heartbeat.c,v 1.512 2006/06/13 07:57:11 zhenh Exp $ */
+/* $Id: heartbeat.c,v 1.513 2006/06/22 01:00:51 alan Exp $ */
 /*
  * heartbeat: Linux-HA heartbeat code
  *
@@ -1387,8 +1387,8 @@
        }
 
        if (ANYDEBUG) {
-               /* Limit ourselves to 50% of the CPU */
-               cl_cpu_limit_setpercent(50);
+               /* Limit ourselves to 70% of the CPU */
+               cl_cpu_limit_setpercent(70);
                /* Update our CPU limit periodically */
                id=Gmain_timeout_add_full(G_PRIORITY_HIGH-5
                ,       cl_cpu_limit_ms_interval()
@@ -6354,6 +6354,9 @@
 
 /*
  * $Log: heartbeat.c,v $
+ * Revision 1.513  2006/06/22 01:00:51  alan
+ * Raised the heartbeat (debug) CPU limit to 70%.
+ *
  * Revision 1.512  2006/06/13 07:57:11  zhenh
  * deal with the situation that the time restart is shorter than deadtime, fix 
1280
  *




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

Message: 2
Date: Wed, 21 Jun 2006 20:47:28 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: resources by panjiam from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : panjiam
Host    : 
Project : linux-ha
Module  : resources

Dir     : linux-ha/resources/OCF


Modified Files:
        portblock.in 


Log Message:
use ha_pseudo_resource() instead of the built-in one
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/resources/OCF/portblock.in,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- portblock.in        10 Mar 2006 04:14:20 -0000      1.7
+++ portblock.in        22 Jun 2006 02:47:27 -0000      1.8
@@ -16,6 +16,7 @@
 # Initialization:
 
 . @hb_libdir@/ocf-shellfuncs
+. @sysconfdir@/ha.d/shellfuncs
 
 #######################################################################
 [EMAIL PROTECTED]@/run/@HB_PKG@
@@ -127,13 +128,7 @@
 # pseudo_resource filename operation
 pseudo_resource()
 {
-  file="$HA_VARRUNDIR/$1"
-  case $2 in
-    start|restart|reload)  touch "$file";;
-    stop) rm -f $file;;
-    status) test -f "$file";;
-    *) exit 3;;
-  esac
+  ha_pseudo_resource $*
 }
 
 #iptables_spec {udp|tcp} portno,portno




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

Message: 3
Date: Wed, 21 Jun 2006 23:56:32 -0600 (MDT)
From: linux-ha-cvs@lists.linux-ha.org
Subject: [Linux-ha-cvs] Linux-HA CVS: lrm by sunjd from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : sunjd
Host    : 
Project : linux-ha
Module  : lrm

Dir     : linux-ha/lrm/admin


Modified Files:
        lrmadmin.c 


Log Message:
(bug1301): add the capacity of get_cur_state; polish on memory free
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lrm/admin/lrmadmin.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -3 -r1.37 -r1.38
--- lrmadmin.c  16 May 2006 09:40:37 -0000      1.37
+++ lrmadmin.c  22 Jun 2006 05:56:31 -0000      1.38
@@ -1,4 +1,4 @@
-/* $Id: lrmadmin.c,v 1.37 2006/05/16 09:40:37 sunjd Exp $ */
+/* $Id: lrmadmin.c,v 1.38 2006/06/22 05:56:31 sunjd Exp $ */
 /* File: lrmadmin.c
  * Description: A adminstration tool for Local Resource Manager
  *
@@ -91,6 +91,7 @@
        HELP
 } lrmadmin_cmd_t;
 
+#define nullcheck(p)       ((p) ? (p) : "<null>")
 static const char * status_msg[5] = {
        "succeed",                /* LRM_OP_DONE         */
         "cancelled",             /* LRM_OP_CANCELLED    */
@@ -132,9 +133,9 @@
 static int add_resource(ll_lrm_t * lrmd, int argc, int optind, char * argv[]);
 static int transfer_cmd_params(int amount, int start, char * argv[], 
                           const char * class, GHashTable ** params_ht);
-static void g_print_stringitem(gpointer data, gpointer user_data);
-static void g_print_rainfo_item(gpointer data, gpointer user_data);
-static void g_print_ops(gpointer data, gpointer user_data);
+static void g_print_stringitem_and_free(gpointer data, gpointer user_data);
+static void g_print_rainfo_item_and_free(gpointer data, gpointer user_data);
+static void g_print_ops_and_free(gpointer data, gpointer user_data);
 static void g_get_rsc_description(gpointer data, gpointer user_data);
 static void print_rsc_inf(lrm_rsc_t * lrmrsc);
 static char * params_hashtable_to_str(const char * class, GHashTable * ht);
@@ -272,7 +273,6 @@
 
                        case 'h':
                                OPTION_OBSCURE_CHECK 
-                               /* print detailed help screen? */
                                printf("%s",simple_help_screen);
                                return 0;
 
@@ -392,6 +392,7 @@
                                        printf("Failed to flush.\n");
                                        ret_value = -3;
                                }
+                               lrm_free_rsc(lrm_rsc);
                        }
 
                        ASYN_OPS = FALSE;
@@ -403,7 +404,7 @@
                        printf("Support %d RA classes\n", 
                                        g_list_length(raclass_list));
                        if (raclass_list) {
-                               g_list_foreach(raclass_list, g_print_stringitem,
+                               g_list_foreach(raclass_list, 
g_print_stringitem_and_free,
                                                NULL);
                                g_list_free(raclass_list);
                                ret_value = LSB_EXIT_OK;
@@ -418,14 +419,11 @@
                case RATYPE_SUPPORTED:
                        ratype_list = lrmd->lrm_ops->
                                get_rsc_type_supported(lrmd, raclass);
-                       printf("List size: %d\n", g_list_length(ratype_list));
+                       printf("The are %d RAs:\n", g_list_length(ratype_list));
                        if (ratype_list) {
-                               g_list_foreach(ratype_list, g_print_rainfo_item,
+                               g_list_foreach(ratype_list, 
g_print_rainfo_item_and_free,
                                                NULL);
-                               /* g_list_free(ratype_list); */
-                       } else {
-                               printf("For this RA class, no any RA type is "
-                                       "supported\n");
+                               g_list_free(ratype_list);
                        }
 
                        ASYN_OPS = FALSE;
@@ -450,7 +448,7 @@
                                ret_value = -3;
                        } else {
                                print_rsc_inf(lrm_rsc);
-                               g_free(lrm_rsc);
+                               lrm_free_rsc(lrm_rsc);
                        }
 
                        ASYN_OPS = FALSE;
@@ -469,11 +467,14 @@
                                         cur_state==LRM_RSC_IDLE?
                                         "LRM_RSC_IDLE":"LRM_RSC_BUSY");
                                                                
+                               printf("The resource operation information:\n");
                                if (ops_queue) {
-                                       g_list_foreach(ops_queue, g_print_ops, 
-                                                       NULL);
+                                       g_list_foreach(ops_queue,
+                                                      g_print_ops_and_free, 
+                                                      NULL);
                                        g_list_free(ops_queue);
                                }
+                               lrm_free_rsc(lrm_rsc);
                        }
 
                        ASYN_OPS = FALSE;
@@ -603,7 +604,7 @@
        op.params = params_ht;
 
        call_id = lrm_rsc->ops->perform_op(lrm_rsc, &op);
-       /* g_free(lrm_rsc);   don't need to free it ? */
+       lrm_free_rsc(lrm_rsc);
        if (params_ht) {
                g_hash_table_foreach(params_ht, free_stritem_of_hashtable, 
NULL);
                g_hash_table_destroy(params_ht);
@@ -811,29 +812,39 @@
 }
 
 static void
-g_print_stringitem(gpointer data, gpointer user_data)
+g_print_stringitem_and_free(gpointer data, gpointer user_data)
 {
        printf("%s\n", (char*)data);
-       g_free(data);  /*  ?  */
+       g_free(data);
 }
 
 static void
-g_print_rainfo_item(gpointer data, gpointer user_data)
+g_print_rainfo_item_and_free(gpointer data, gpointer user_data)
 {
-/*     rsc_info_t * rsc_info = (rsc_info_t *) data; */
-       printf("RA type name: %s\n", (char *)data);
-/*
-       printf("RA type name: %s  Version: %s\n", 
-               rsc_info->rsc_type, rsc_info->version);
-*/
-       g_free(data); /*  ?  */
+       printf("%s\n", (char *)data);
+       g_free(data);
 }
 
+
 static void
-g_print_ops(gpointer data, gpointer user_data)
+g_print_ops_and_free(gpointer data, gpointer user_data)
 {
-       printf("%s  ", (char*)data);
-       g_free(data);  /*  ?  */
+       lrm_op_t* op = (lrm_op_t*)data;
+       GString * param_gstr;
+
+       if (NULL == op) {
+               cl_log(LOG_ERR, "%s:%d: op==NULL"
+                       , __FUNCTION__, __LINE__);
+               return;
+       }
+
+       param_gstr = g_string_new("");
+       g_hash_table_foreach(op->params, ocf_params_hash_to_str, &param_gstr);
+
+       printf("  operation %s [call_id=%d], its parameters: %s\n"
+               , nullcheck(op->op_type), op->call_id, param_gstr->str);
+       g_string_free(param_gstr, TRUE);
+       lrm_free_op(op);
 }
 
 static void
@@ -853,12 +864,12 @@
        lrm_rsc = lrmd->lrm_ops->get_rsc(lrmd, rsc_id_tmp);
        if (lrm_rsc) {
                print_rsc_inf(lrm_rsc);
-               g_free(lrm_rsc);   /* ? */
+               lrm_free_rsc(lrm_rsc); 
        } else
                cl_log(LOG_ERR, "There is a invalid resource id %s.", 
                        rsc_id_tmp);
        
-       g_free(data); /* ? */
+       g_free(data);
 }
 
 static void
@@ -939,6 +950,9 @@
 
 /*
  * $Log: lrmadmin.c,v $
+ * Revision 1.38  2006/06/22 05:56:31  sunjd
+ * (bug1301): add the capacity of get_cur_state; polish on memory free
+ *
  * Revision 1.37  2006/05/16 09:40:37  sunjd
  * fix a minor typo; remove the hint for metadata output
  *




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

_______________________________________________
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 31, Issue 78
********************************************

Reply via email to