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])
4. Linux-HA CVS: heartbeat by alan from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Thu, 20 Apr 2006 05:29:15 -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/admin
Modified Files:
crm_resource.c
Log Message:
Logging
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/admin/crm_resource.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- crm_resource.c 18 Mar 2006 17:19:40 -0000 1.19
+++ crm_resource.c 20 Apr 2006 11:29:14 -0000 1.20
@@ -1,4 +1,4 @@
-/* $Id: crm_resource.c,v 1.19 2006/03/18 17:19:40 andrew Exp $ */
+/* $Id: crm_resource.c,v 1.20 2006/04/20 11:29:14 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -363,7 +363,7 @@
}
} else {
- if(do_force == FALSE) {
+ if(BE_QUIET == FALSE) {
fprintf(stderr,
"WARNING: Creating rsc_location constraint '%s'"
" with a score of -INFINITY for resource %s"
------------------------------
Message: 2
Date: Thu, 20 Apr 2006 05:32:03 -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/admin
Modified Files:
crm_resource.c
Log Message:
Remove use of fragments
Indicate how to turn a lengthy message off
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/admin/crm_resource.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- crm_resource.c 20 Apr 2006 11:29:14 -0000 1.20
+++ crm_resource.c 20 Apr 2006 11:32:03 -0000 1.21
@@ -1,4 +1,4 @@
-/* $Id: crm_resource.c,v 1.20 2006/04/20 11:29:14 andrew Exp $ */
+/* $Id: crm_resource.c,v 1.21 2006/04/20 11:32:03 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
@@ -329,16 +329,9 @@
crm_data_t *dont_run = NULL;
fragment = create_cib_fragment(NULL, NULL);
-#if CRM_DEPRECATED_SINCE_2_0_4
- if(safe_str_eq(crm_element_name(fragment), XML_TAG_CIB)) {
- cib = fragment;
- } else {
- cib = find_xml_node(fragment, XML_TAG_CIB, TRUE);
- }
-#else
cib = fragment;
+
CRM_DEV_ASSERT(safe_str_eq(crm_element_name(cib), XML_TAG_CIB));
-#endif
constraints = get_object_root(XML_CIB_TAG_CONSTRAINTS, cib);
id = crm_concat("cli-prefer", rsc_id, '-');
@@ -374,7 +367,8 @@
" the 'crm_resource -U' command or manually"
" with cibadmin\n", rsc_id, existing_node);
fprintf(stderr, "\tThis will be the case even if %s is"
- " the last node in the cluster", existing_node);
+ " the last node in the cluster\n",
existing_node);
+ fprintf(stderr, "\tThis messgae can be disabled with
-S\n");
}
crm_xml_add(dont_run, "rsc", rsc_id);
------------------------------
Message: 3
Date: Thu, 20 Apr 2006 07:19:01 -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/cib
Modified Files:
io.c
Log Message:
We should not start with these attributes set
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/cib/io.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -3 -r1.65 -r1.66
--- io.c 9 Apr 2006 14:35:58 -0000 1.65
+++ io.c 20 Apr 2006 13:19:01 -0000 1.66
@@ -1,4 +1,4 @@
-/* $Id: io.c,v 1.65 2006/04/09 14:35:58 andrew Exp $ */
+/* $Id: io.c,v 1.66 2006/04/20 13:19:01 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -288,6 +288,10 @@
if(value == NULL) {
crm_xml_add_int(root, name, 0);
}
+
+ /* unset these and require the DC/CCM to update as needed */
+ crm_xml_add(root, XML_ATTR_HAVE_QUORUM, XML_BOOLEAN_FALSE);
+ xml_remove_prop(root, XML_ATTR_DC_UUID);
}
crm_log_xml_info(root, "[on-disk]");
------------------------------
Message: 4
Date: Thu, 20 Apr 2006 09:00:17 -0600 (MDT)
From: [email protected]
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:
Put in code to use the library temporary process creation/run code
instead of the inline heartbeat code
Also turned off a feature where nodes could be "automatically" deleted.
This was definitely a mistake. This isn't a permanent fix.
Gshi's going to look at that.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/heartbeat/heartbeat.c,v
retrieving revision 1.501
retrieving revision 1.502
diff -u -3 -r1.501 -r1.502
--- heartbeat.c 19 Apr 2006 12:15:59 -0000 1.501
+++ heartbeat.c 20 Apr 2006 15:00:16 -0000 1.502
@@ -2,7 +2,7 @@
* TODO:
* 1) Man page update
*/
-/* $Id: heartbeat.c,v 1.501 2006/04/19 12:15:59 andrew Exp $ */
+/* $Id: heartbeat.c,v 1.502 2006/04/20 15:00:16 alan Exp $ */
/*
* heartbeat: Linux-HA heartbeat code
*
@@ -362,11 +362,6 @@
, int exitcode, int waslogged);
static
const char* CoreProcessName(ProcTrack* p);
-static void TmpProcessRegistered(ProcTrack* p);
-static void TmpProcessDied(ProcTrack* p, int status, int signo
-, int exitcode, int waslogged);
-static
-const char* TmpProcessName(ProcTrack* p);
void hb_kill_managed_children(int nsig);
void hb_kill_rsc_mgmt_children(int nsig);
@@ -423,8 +418,8 @@
static void hb_add_deadtime(int increment);
static gboolean hb_pop_deadtime(gpointer p);
static void dump_missing_pkts_info(void);
-static gboolean write_hostcachedata(gpointer ginfo);
-static gboolean write_delcachedata(gpointer ginfo);
+static int write_hostcachedata(gpointer ginfo);
+static int write_delcachedata(gpointer ginfo);
static GHashTable* message_callbacks = NULL;
static gboolean HBDoMsgCallback(const char * type, struct node_info*
fromnode
@@ -482,12 +477,6 @@
CoreProcessRegistered,
CoreProcessName
};
-static ProcTrack_ops TmpProcessTrackOps = {
- TmpProcessDied,
- TmpProcessRegistered,
- TmpProcessName
-};
-
static GSourceFuncs polled_input_SourceFuncs = {
polled_input_prepare,
@@ -637,81 +626,18 @@
}
}
-struct tmpproc_track {
- const char * procname;
- GTRIGSource* trigger;
- gboolean isrunning;
- gboolean runagain;
-};
-
-/*
- * We make sure only one copy is running at a time.
- */
-static gboolean
-write_hostcachedata(gpointer ginfo)
+static int
+write_hostcachedata(gpointer notused)
{
- struct tmpproc_track* info = ginfo;
- int pid;
-
- /* Make sure only one copy is running at a time. */
- /* This avoids possible concurrency problems. */
- if (info->isrunning) {
- info->runagain = TRUE;
- return TRUE;
- }
- info->procname = __FUNCTION__;
- info->isrunning = TRUE;
-
- switch ((pid=fork())) {
- case -1: cl_perror("%s: Can't fork writeprocess!",
__FUNCTION__);
- return TRUE;
- break;
-
- case 0: /* Child */
- if (write_cache_file(config) == HA_OK) {
- exit(0);
- }
- exit(1);
- break;
- default:
- /* Fall out */;
-
- }
- NewTrackedProc(pid, 0, PT_LOGVERBOSE, ginfo, &TmpProcessTrackOps);
- return TRUE;
+ hb_setup_child();
+ return write_cache_file(config);
}
-static gboolean
-write_delcachedata(gpointer ginfo)
+static int
+write_delcachedata(gpointer notused)
{
- struct tmpproc_track* info = ginfo;
- int pid;
-
- /* Make sure only one copy is running at a time. */
- /* This avoids possible concurrency problems. */
- if (info->isrunning) {
- info->runagain = TRUE;
- return TRUE;
- }
- info->procname = __FUNCTION__;
- info->isrunning = TRUE;
-
- switch ((pid=fork())) {
- case -1: cl_perror("%s: Can't fork write process!",
__FUNCTION__);
- return TRUE;
- break;
-
- case 0: /* Child */
- if (write_delnode_file(config) == HA_OK) {
- exit(0);
- }
- exit(1);
- default:
- /* Fall out */;
-
- }
- NewTrackedProc(pid, 0, PT_LOGVERBOSE, ginfo, &TmpProcessTrackOps);
- return TRUE;
+ hb_setup_child();
+ return write_delnode_file(config);
}
void
@@ -846,8 +772,6 @@
int pid;
int ourproc = 0;
int (*getgen)(seqno_t * generation) = IncrGeneration;
- struct tmpproc_track hostcache_info;
- struct tmpproc_track delcache_info;
localdie = NULL;
@@ -874,15 +798,13 @@
cl_log(LOG_DEBUG, "uuid is:%s", uuid_str);
}
- memset(&hostcache_info, 0, sizeof(hostcache_info));
- write_hostcachefile = G_main_add_TriggerHandler(PRI_WRITECACHE
- , write_hostcachedata, &hostcache_info, NULL);
- hostcache_info.trigger = write_hostcachefile;
-
- memset(&delcache_info, 0, sizeof(delcache_info));
- write_delcachefile = G_main_add_TriggerHandler(PRI_WRITECACHE
- , write_delcachedata, &delcache_info, NULL);
- hostcache_info.trigger = write_delcachefile;
+ write_hostcachefile = G_main_add_tempproc_trigger(PRI_WRITECACHE
+ , write_hostcachedata, "write_hostcachedata"
+ , NULL, NULL, NULL, NULL);
+
+ write_delcachefile = G_main_add_tempproc_trigger(PRI_WRITECACHE
+ , write_delcachedata, "write_delcachedata"
+ , NULL, NULL, NULL, NULL);
add_uuidtable(&config->uuid, curnode);
cl_uuid_copy(&curnode->uuid, &config->uuid);
@@ -2734,6 +2656,10 @@
return;
}
+#if 0
+ /* This truly is broken... -- gshi and alanr agree */
+ /* FIXME FIXME FIXME */
+
for (i =0; i < config->nodecount; i++){
for (j=0;j < num; j++){
if ( strncmp(config->nodes[i].nodename,
@@ -2745,17 +2671,20 @@
/* This node is not found in incoming nodelist,
* therefore, we need to delete it.
*
- * Of course, this assumes everyone has correct node
lists
+ * Of course, this assumes everyone has correct node
* lists - which may not be the case :-( FIXME???
- * And it assumes autojoin is on - which it may not
be...
+ * And it assumes autojoin is on - which it may
+ * not be...
*/
- cl_log(LOG_ERR, "%s: Node %s is deleted (according to
%s) and we don't know it!"
+ cl_log(LOG_ERR, "%s: Node %s is deleted"
+ " (according to %s) and we don't know it!"
, __FUNCTION__, config->nodes[i].nodename
, fromnode->nodename);
hb_del_one_node(config->nodes[i].nodename);
}
}
+#endif
for (i =0; i < num; i++){
for (j = 0; j < config->nodecount; j++){
@@ -3421,40 +3350,6 @@
return (pi ? core_proc_name(pi->type) : "Core heartbeat process");
}
-/***********************************************************************
- * Track our temporary child processes...
- ***********************************************************************/
-static void
-TmpProcessRegistered(ProcTrack* p)
-{
- return;
-}
-static void
-TmpProcessDied(ProcTrack* p, int status, int signo, int exitcode
-, int waslogged)
-{
- struct tmpproc_track * pt = p->privatedata;
-
- pt->isrunning=FALSE;
- if (pt->runagain) {
- pt->runagain=FALSE;
- /* Do it again! */
- G_main_set_trigger(pt->trigger);
- /* Note that we set the trigger for this, we don't
- * call the function again directly.
- * This allows the scheduler to have a vote on
- * when the new fork, etc. happens.
- */
- }
- p->privatedata = NULL;
- return;
-}
-static const char *
-TmpProcessName(ProcTrack* p)
-{
- struct tmpproc_track * pt = p->privatedata;
- return pt->procname;
-}
/***********************************************************************
* Track our managed child processes...
@@ -6237,6 +6132,14 @@
/*
* $Log: heartbeat.c,v $
+ * Revision 1.502 2006/04/20 15:00:16 alan
+ * Put in code to use the library temporary process creation/run code
+ * instead of the inline heartbeat code
+ *
+ * Also turned off a feature where nodes could be "automatically" deleted.
+ * This was definitely a mistake. This isn't a permanent fix.
+ * Gshi's going to look at that.
+ *
* Revision 1.501 2006/04/19 12:15:59 andrew
* Tweak some log patterns to work regardless of how they're logged (syslog
vs. file)
*
------------------------------
_______________________________________________
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 107
*********************************************