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: tools by andrew from
([email protected])
3. Linux-HA CVS: cts by andrew from
([email protected])
4. Linux-HA CVS: resources by andrew from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Mon, 10 Apr 2006 07:11:11 -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
Modified Files:
Makefile.am
Log Message:
Include the DTD in the tarball
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/Makefile.am,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- Makefile.am 9 Apr 2006 17:01:15 -0000 1.17
+++ Makefile.am 10 Apr 2006 13:11:10 -0000 1.18
@@ -26,7 +26,7 @@
crm_varrundir = $(HA_VARRUNDIR)/$(HB_PKG)/crm
noinst_HEADERS = dmalloc_wrapper.h
-DIST_SOURCES = crm-1.0.dtd
+EXTRA_DIST = crm-1.0.dtd
dtd_SCRIPTS = crm.dtd
crm.dtd: crm-1.0.dtd
------------------------------
Message: 2
Date: Mon, 10 Apr 2006 08:45:46 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: tools by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : tools
Dir : linux-ha/tools
Modified Files:
attrd.c
Log Message:
Hooks to be able to force a full refresh
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/tools/attrd.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- attrd.c 10 Apr 2006 13:02:09 -0000 1.4
+++ attrd.c 10 Apr 2006 14:45:45 -0000 1.5
@@ -1,4 +1,4 @@
-/* $Id: attrd.c,v 1.4 2006/04/10 13:02:09 andrew Exp $ */
+/* $Id: attrd.c,v 1.5 2006/04/10 14:45:45 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -70,6 +70,7 @@
char *last_value;
int timeout;
+ char *dampen;
guint timer_id;
} attr_hash_entry_t;
@@ -456,6 +457,45 @@
crm_free(attr);
}
+static attr_hash_entry_t *
+find_hash_entry(HA_Message * msg)
+{
+ const char *attr = ha_msg_value(msg, F_ATTRD_ATTRIBUTE);
+ attr_hash_entry_t *hash_entry = g_hash_table_lookup(attr_hash, attr);
+ if(hash_entry == NULL) {
+ const char *value = NULL;
+
+ /* create one and add it */
+ crm_info("Creating hash entry for %s", attr);
+ crm_malloc0(hash_entry, sizeof(attr_hash_entry_t));
+ hash_entry->id = crm_strdup(attr);
+
+ value = ha_msg_value(msg, F_ATTRD_SET);
+ if(value != NULL) {
+ hash_entry->set = crm_strdup(value);
+ crm_debug("\t%s->set: %s", attr, value);
+ }
+
+ value = ha_msg_value(msg, F_ATTRD_SECTION);
+ if(value != NULL) {
+ hash_entry->section = crm_strdup(value);
+ crm_debug("\t%s->section: %s", attr, value);
+ }
+
+ value = ha_msg_value(msg, F_ATTRD_DAMPEN);
+ if(value != NULL) {
+ hash_entry->dampen = crm_strdup(value);
+ hash_entry->timeout = crm_get_msec(value);
+ crm_debug("\t%s->timeout: %s", attr, value);
+ }
+
+ g_hash_table_insert(attr_hash, hash_entry->id, hash_entry);
+ hash_entry = g_hash_table_lookup(attr_hash, attr);
+ CRM_CHECK(hash_entry != NULL, ;);
+ }
+ return hash_entry;
+}
+
void
attrd_ha_callback(HA_Message * msg, void* private_data)
{
@@ -466,17 +506,9 @@
const char *attr = ha_msg_value(msg, F_ATTRD_ATTRIBUTE);
crm_info("%s message from %s", op, from);
- hash_entry = g_hash_table_lookup(attr_hash, attr);
+ hash_entry = find_hash_entry(msg);
stop_attrd_timer(hash_entry);
- if(hash_entry == NULL) {
- const char *set = ha_msg_value(msg, F_ATTRD_SET);
- const char *section = ha_msg_value(msg, F_ATTRD_SECTION);
- rc = delete_attr(cib_conn, cib_none, section, attrd_uuid, set,
- NULL, attr, NULL);
- crm_info("Sent delete %d: %s %s %s",
- rc, attr, set, section);
-
- } else if(hash_entry->value == NULL) {
+ if(hash_entry->value == NULL) {
/* delete the attr */
rc = delete_attr(cib_conn, cib_none, hash_entry->section,
attrd_uuid,
hash_entry->set, NULL, attr, NULL);
@@ -496,6 +528,13 @@
return;
}
+static void
+update_for_hash_entry(gpointer key, gpointer value, gpointer user_data)
+{
+ attrd_timer_callback(value);
+}
+
+
void
attrd_local_callback(HA_Message * msg)
{
@@ -505,38 +544,15 @@
const char *attr = ha_msg_value(msg, F_ATTRD_ATTRIBUTE);
const char *value = ha_msg_value(msg, F_ATTRD_VALUE);
- crm_debug("%s message from %s: %s=%s", op, from, attr, value);
-
- hash_entry = g_hash_table_lookup(attr_hash, attr);
- if(hash_entry == NULL) {
- /* create one and add it */
- crm_info("Creating hash entry for %s", attr);
- crm_malloc0(hash_entry, sizeof(attr_hash_entry_t));
- hash_entry->id = crm_strdup(attr);
-
- value = ha_msg_value(msg, F_ATTRD_SET);
- if(value != NULL) {
- hash_entry->set = crm_strdup(value);
- crm_debug("\t%s->set: %s", attr, value);
- }
-
- value = ha_msg_value(msg, F_ATTRD_SECTION);
- if(value != NULL) {
- hash_entry->section = crm_strdup(value);
- crm_debug("\t%s->section: %s", attr, value);
- }
-
- value = ha_msg_value(msg, F_ATTRD_DAMPEN);
- if(value != NULL) {
- hash_entry->timeout = crm_get_msec(value);
- crm_debug("\t%s->timeout: %s", attr, value);
- }
-
- g_hash_table_insert(attr_hash, hash_entry->id, hash_entry);
- hash_entry = g_hash_table_lookup(attr_hash, attr);
- CRM_CHECK(hash_entry != NULL, return);
+ if(safe_str_eq(op, "refresh")) {
+ crm_info("Sending full refresh");
+ g_hash_table_foreach(attr_hash, update_for_hash_entry, NULL);
+ return;
}
+ crm_debug("%s message from %s: %s=%s", op, from, attr, value);
+ hash_entry = find_hash_entry(msg);
+
crm_free(hash_entry->last_value);
hash_entry->last_value = hash_entry->value;
@@ -581,6 +597,7 @@
ha_msg_add(msg, F_ATTRD_ATTRIBUTE, hash_entry->id);
ha_msg_add(msg, F_ATTRD_SET, hash_entry->set);
ha_msg_add(msg, F_ATTRD_SECTION, hash_entry->section);
+ ha_msg_add(msg, F_ATTRD_DAMPEN, hash_entry->dampen);
send_ha_message(attrd_cluster_conn, msg, NULL, FALSE);
return TRUE;
------------------------------
Message: 3
Date: Mon, 10 Apr 2006 08:49:10 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: cts by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : cts
Dir : linux-ha/cts
Modified Files:
CTSaudits.py.in
Log Message:
Extra check
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/cts/CTSaudits.py.in,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -3 -r1.44 -r1.45
--- CTSaudits.py.in 5 Apr 2006 13:52:42 -0000 1.44
+++ CTSaudits.py.in 10 Apr 2006 14:49:09 -0000 1.45
@@ -537,7 +537,7 @@
passed = 1
ccm_partitions = self.CM.find_partitions()
- if len(ccm_partitions) == 0:
+ if ccm_partitions == None or len(ccm_partitions) == 0:
return 1
if len(ccm_partitions) > 1:
------------------------------
Message: 4
Date: Mon, 10 Apr 2006 08:54:46 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: resources by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : resources
Dir : linux-ha/resources/OCF
Added Files:
pingd.in
Log Message:
RA for driving pingd. Probably broken.
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 29, Issue 67
********************************************