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 04:59:58 -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:
        group.c 


Log Message:
Use the #define

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/group.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -3 -r1.51 -r1.52
--- group.c     27 Jan 2006 11:15:49 -0000      1.51
+++ group.c     14 Feb 2006 11:59:57 -0000      1.52
@@ -1,4 +1,4 @@
-/* $Id: group.c,v 1.51 2006/01/27 11:15:49 andrew Exp $ */
+/* $Id: group.c,v 1.52 2006/02/14 11:59:57 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -59,7 +59,7 @@
        crm_data_t *xml_self = copy_xml(rsc->xml);
        group_variant_data_t *group_data = NULL;
        const char *group_ordered = g_hash_table_lookup(
-               rsc->parameters, "ordered");
+               rsc->parameters, XML_RSC_ATTR_ORDERED);
        const char *group_colocated = g_hash_table_lookup(
                rsc->parameters, "colocated");
        




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

Message: 2
Date: Tue, 14 Feb 2006 05:01:45 -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:
        incarnation.c 


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

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/incarnation.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -3 -r1.72 -r1.73
--- incarnation.c       27 Jan 2006 11:15:49 -0000      1.72
+++ incarnation.c       14 Feb 2006 12:01:45 -0000      1.73
@@ -1,4 +1,4 @@
-/* $Id: incarnation.c,v 1.72 2006/01/27 11:15:49 andrew Exp $ */
+/* $Id: incarnation.c,v 1.73 2006/02/14 12:01:45 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -441,8 +441,15 @@
                        *stopping = TRUE;
 
                } else if(safe_str_eq(CRMD_ACTION_START, action->task)) {
-                       crm_debug_2("Starting due to: %s", action->uuid);
-                       *starting = TRUE;
+                       if(action->runnable == FALSE) {
+                               crm_debug_3("Skipping pseduo-op: %s run=%d, 
pseudo=%d",
+                                           action->uuid, action->runnable, 
action->pseudo);
+                       } else {
+                               crm_debug_2("Starting due to: %s", 
action->uuid);
+                               crm_debug_3("%s run=%d, pseudo=%d",
+                                           action->uuid, action->runnable, 
action->pseudo);
+                               *starting = TRUE;
+                       }
                }
                );
 
@@ -991,18 +998,14 @@
 {
        int rsc_len = 0;
        int node_len = 0;
-       int uuid_len = 0;
        int list_len = 100 * clones;
 
        char *rsc_list_s = NULL;
        char *node_list_s = NULL;
-       char *uuid_list_s = NULL;
 
-       const char *uuid = NULL;
        const char *uname = NULL;
        const char *rsc_id = NULL;
 
-       const char *last_uuid = NULL;
        const char *last_rsc_id = NULL;
        
   clone_expand_reallocate:
@@ -1020,16 +1023,8 @@
                node_list_s = *node_list;
                node_len = 0;
        }
-       if(uuid_list != NULL) {
-               crm_free(*uuid_list);
-               crm_malloc0(*uuid_list, sizeof(char)*list_len);
-               CRM_ASSERT(*uuid_list != NULL);
-               uuid_list_s = *uuid_list;
-               uuid_len = 0;
-       }       
-
        /* keep BEAM extra happy */
-       if(rsc_list_s == NULL || node_list_s == NULL || uuid_list_s == NULL) {
+       if(rsc_list_s == NULL || node_list_s == NULL) {
                return;
        }
        
@@ -1040,16 +1035,6 @@
                   if(crm_assert_failed) {
                           rsc_id = "__none__";
                   }
-
-                  uuid = NULL;
-                  if(entry->node) {
-                          uuid = entry->node->details->id;
-                  }
-                  CRM_DEV_ASSERT(uuid != NULL);
-                  if(crm_assert_failed) {
-                          uuid = "__none__";
-                  }
-
                   uname = NULL;
                   if(entry->node) {
                           uname = entry->node->details->uname;
@@ -1060,13 +1045,11 @@
                   }
 
                   /* filter dups */
-                  if(safe_str_eq(rsc_id, last_rsc_id)
-                     && safe_str_eq(uuid, last_uuid)) {
+                  if(safe_str_eq(rsc_id, last_rsc_id)) {
                           continue;
                   }
                   last_rsc_id = rsc_id;
-                  last_uuid = uuid;
-                  
+
                   if(rsc_list != NULL) {
                           if(rsc_len + 1 + strlen(rsc_id) >= list_len) {
                                   list_len *= 2;
@@ -1090,26 +1073,15 @@
                           node_list_s++;
                           node_len++;
                   }
-                  
-                  if(uuid_list != NULL) {
-                          if(uuid_len + 1 + strlen(uuid) >= list_len) {
-                                  list_len *= 2;
-                                  goto clone_expand_reallocate;
-                          }
-                          sprintf(uuid_list_s, "%s ", uuid);
-                          uuid_list_s += strlen(uuid);
-                          uuid_len += strlen(uuid);
-                          uuid_list_s++;
-                          uuid_len++;
-                  }
-               );
+                  );
 }
 
 void clone_expand(resource_t *rsc, pe_working_set_t *data_set)
 {
        char *rsc_list = NULL;
        char *node_list = NULL;
-       char *uuid_list = NULL;
+       char *uuid_list = NULL; 
+
        notify_data_t *n_data = NULL;
        clone_variant_data_t *clone_data = NULL;
        get_clone_variant_data(clone_data, rsc);
@@ -1139,7 +1111,7 @@
        if(rsc->notify && n_data->stop) {
                n_data->stop = g_list_sort(
                        n_data->stop, sort_notify_entries);
-               rsc_list = NULL; node_list = NULL; uuid_list = NULL;
+               rsc_list = NULL; node_list = NULL;
                expand_list(n_data->stop, clone_data->clone_max,
                            &rsc_list, &node_list, &uuid_list);
                g_hash_table_insert(
@@ -1148,15 +1120,12 @@
                g_hash_table_insert(
                        n_data->keys,
                        crm_strdup("notify_stop_uname"), node_list);
-               g_hash_table_insert(
-                       n_data->keys,
-                       crm_strdup("notify_stop_uuid"), uuid_list);
        }
 
        if(rsc->notify && n_data->start) {
                n_data->start = g_list_sort(
                        n_data->start, sort_notify_entries);
-               rsc_list = NULL; node_list = NULL; uuid_list = NULL;
+               rsc_list = NULL; node_list = NULL; 
                expand_list(n_data->start, clone_data->clone_max,
                            &rsc_list, &node_list, &uuid_list);
                g_hash_table_insert(
@@ -1165,15 +1134,12 @@
                g_hash_table_insert(
                        n_data->keys,
                        crm_strdup("notify_start_uname"), node_list);
-               g_hash_table_insert(
-                       n_data->keys,
-                       crm_strdup("notify_start_uuid"), uuid_list);
        }
        
        if(rsc->notify && n_data->demote) {
                n_data->demote = g_list_sort(
                        n_data->demote, sort_notify_entries);
-               rsc_list = NULL; node_list = NULL; uuid_list = NULL;
+               rsc_list = NULL; node_list = NULL;
                expand_list(n_data->demote, clone_data->clone_max,
                            &rsc_list, &node_list, &uuid_list);
                g_hash_table_insert(
@@ -1182,9 +1148,6 @@
                g_hash_table_insert(
                        n_data->keys,
                        crm_strdup("notify_demote_uname"), node_list);
-               g_hash_table_insert(
-                       n_data->keys,
-                       crm_strdup("notify_demote_uuid"), uuid_list);
        }
        
        if(rsc->notify && n_data->promote) {
@@ -1199,9 +1162,6 @@
                g_hash_table_insert(
                        n_data->keys,
                        crm_strdup("notify_promote_uname"), node_list);
-               g_hash_table_insert(
-                       n_data->keys,
-                       crm_strdup("notify_promote_uuid"), uuid_list);
        }
        
        if(rsc->notify && n_data->active) {
@@ -1216,9 +1176,6 @@
                g_hash_table_insert(
                        n_data->keys,
                        crm_strdup("notify_active_uname"), node_list);
-               g_hash_table_insert(
-                       n_data->keys,
-                       crm_strdup("notify_active_uuid"), uuid_list);
        }
 
        if(rsc->notify && n_data->slave) {
@@ -1233,9 +1190,6 @@
                g_hash_table_insert(
                        n_data->keys,
                        crm_strdup("notify_slave_uname"), node_list);
-               g_hash_table_insert(
-                       n_data->keys,
-                       crm_strdup("notify_slave_uuid"), uuid_list);    
        }
 
        if(rsc->notify && n_data->master) {
@@ -1250,9 +1204,6 @@
                g_hash_table_insert(
                        n_data->keys,
                        crm_strdup("notify_master_uname"), node_list);
-               g_hash_table_insert(
-                       n_data->keys,
-                       crm_strdup("notify_master_uuid"), uuid_list);   
        }
 
        if(rsc->notify && n_data->inactive) {
@@ -1267,9 +1218,6 @@
                g_hash_table_insert(
                        n_data->keys,
                        crm_strdup("notify_inactive_uname"), node_list);
-               g_hash_table_insert(
-                       n_data->keys,
-                       crm_strdup("notify_inactive_uuid"), uuid_list); 
        }
        
        /* yes, we DO need this second loop */




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

Message: 3
Date: Tue, 14 Feb 2006 05:02:53 -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:
        main.c 


Log Message:
Enable the signal handler for SIGTERM now that the crmd puts us in our own 
  process group (and we dont get the SIGTERM from Heartbeat)

===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/pengine/main.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- main.c      10 Feb 2006 06:12:03 -0000      1.20
+++ main.c      14 Feb 2006 12:02:53 -0000      1.21
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.20 2006/02/10 06:12:03 andrew Exp $ */
+/* $Id: main.c,v 1.21 2006/02/14 12:02:53 andrew Exp $ */
 /* 
  * Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
  * 
@@ -62,8 +62,8 @@
        const char *param_name = NULL;
     
        crm_log_init(crm_system_name);
-/*     G_main_add_SignalHandler( */
-/*             G_PRIORITY_HIGH, SIGTERM, pengine_shutdown, NULL, NULL); */
+       G_main_add_SignalHandler(
+               G_PRIORITY_HIGH, SIGTERM, pengine_shutdown, NULL, NULL);
 
        while ((flag = getopt(argc, argv, OPTARGS)) != EOF) {
                switch(flag) {
@@ -162,20 +162,7 @@
 gboolean
 pengine_shutdown(int nsig, gpointer unused)
 {
-#if 0
-       static int shuttingdown = 0;
-  
-       if (!shuttingdown) {
-               shuttingdown = 1;
-       }
-       if (mainloop != NULL && g_main_is_running(mainloop)) {
-               g_main_quit(mainloop);
-       }else{
-               exit(LSB_EXIT_OK);
-       }
-       return TRUE;
-#else
-       return FALSE;
-#endif
+       crm_info("Exiting PEngine (SIGTERM)");
+       exit(LSB_EXIT_OK);
 }
 




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

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

Reply via email to