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: lrm by alan from ([email protected])
----------------------------------------------------------------------
Message: 1
Date: Thu, 9 Feb 2006 22:37:28 -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/tengine
Modified Files:
callbacks.c utils.c
Log Message:
Needed the LSB include file
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/callbacks.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -3 -r1.61 -r1.62
--- callbacks.c 10 Feb 2006 05:18:22 -0000 1.61
+++ callbacks.c 10 Feb 2006 05:37:27 -0000 1.62
@@ -1,4 +1,4 @@
-/* $Id: callbacks.c,v 1.61 2006/02/10 05:18:22 andrew Exp $ */
+/* $Id: callbacks.c,v 1.62 2006/02/10 05:37:27 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -23,6 +23,7 @@
#include <hb_api.h>
+#include <clplumbing/lsb_exitcodes.h>
#include <crm/crm.h>
#include <crm/common/xml.h>
#include <crm/msg_xml.h>
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/tengine/utils.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -3 -r1.51 -r1.52
--- utils.c 10 Feb 2006 05:18:22 -0000 1.51
+++ utils.c 10 Feb 2006 05:37:27 -0000 1.52
@@ -1,4 +1,4 @@
-/* $Id: utils.c,v 1.51 2006/02/10 05:18:22 andrew Exp $ */
+/* $Id: utils.c,v 1.52 2006/02/10 05:37:27 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -28,6 +28,7 @@
#include <tengine.h>
#include <heartbeat.h>
#include <clplumbing/Gmain_timeout.h>
+#include <clplumbing/lsb_exitcodes.h>
#include <lrm/lrm_api.h>
extern cib_t *te_cib_conn;
------------------------------
Message: 2
Date: Thu, 9 Feb 2006 22:41:21 -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/crmd
Modified Files:
control.c fsa_defines.h
Log Message:
The TE needs the HA connection to stay a little longer
- so it can complete its transition and exit
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/control.c,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -3 -r1.111 -r1.112
--- control.c 8 Feb 2006 22:15:44 -0000 1.111
+++ control.c 10 Feb 2006 05:41:20 -0000 1.112
@@ -207,6 +207,11 @@
}
crm_info("Waiting for the TE to disconnect");
do_exit = FALSE;
+
+ } else if(is_set(fsa_input_register, R_HA_DISCONNECTED) ==
FALSE) {
+ do_ha_control(A_HA_DISCONNECT,
+ cause, cur_state, current_input,
msg_data);
+ do_exit = FALSE;
}
if(do_exit) {
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/crm/crmd/fsa_defines.h,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -3 -r1.42 -r1.43
--- fsa_defines.h 13 Jan 2006 19:02:38 -0000 1.42
+++ fsa_defines.h 10 Feb 2006 05:41:20 -0000 1.43
@@ -1,4 +1,4 @@
-/* $Id: fsa_defines.h,v 1.42 2006/01/13 19:02:38 andrew Exp $ */
+/* $Id: fsa_defines.h,v 1.43 2006/02/10 05:41:20 andrew Exp $ */
/*
* Copyright (C) 2004 Andrew Beekhof <[EMAIL PROTECTED]>
*
@@ -396,7 +396,7 @@
#define A_ERROR 0x2000000000000000ULL
#define A_WARN 0x4000000000000000ULL
-#define O_EXIT
(A_STOP|A_CCM_DISCONNECT|A_LRM_DISCONNECT|A_HA_DISCONNECT|A_EXIT_0|A_CIB_STOP)
+#define O_EXIT (A_STOP|A_CCM_DISCONNECT|A_LRM_DISCONNECT|A_EXIT_0|A_CIB_STOP)
#define O_RELEASE
(A_DC_TIMER_STOP|A_DC_RELEASE|A_PE_STOP|A_TE_STOP|A_DC_RELEASED)
#define O_DC_TIMER_RESTART (A_NOTHING)
#define O_PE_RESTART (A_PE_START|A_PE_STOP)
------------------------------
Message: 3
Date: Thu, 9 Feb 2006 22:55:14 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lrm by alan from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : alan
Host :
Project : linux-ha
Module : lrm
Dir : linux-ha/lrm/lrmd
Modified Files:
lrmd.c
Log Message:
Put more code in to catch the invalid file descriptor earlier on.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lrm/lrmd/lrmd.c,v
retrieving revision 1.213
retrieving revision 1.214
diff -u -3 -r1.213 -r1.214
--- lrmd.c 10 Feb 2006 05:00:35 -0000 1.213
+++ lrmd.c 10 Feb 2006 05:55:14 -0000 1.214
@@ -1,4 +1,4 @@
-/* $Id: lrmd.c,v 1.213 2006/02/10 05:00:35 alan Exp $ */
+/* $Id: lrmd.c,v 1.214 2006/02/10 05:55:14 alan Exp $ */
/*
* Local Resource Manager Daemon
*
@@ -447,13 +447,19 @@
op->ra_stderr_gsource = NULL;
}
- if (op->ra_stdout_fd >= 0) {
+ if (op->ra_stdout_fd >= STDERR_FILENO) {
close(op->ra_stdout_fd);
op->ra_stdout_fd = -1;
+ }else if (op->ra_stdout_fd >= 0) {
+ lrmd_log(LOG_ERR, "%s: invalid stdout fd %d"
+ , __FUNCTION__, op->ra_stdout_fd);
}
- if (op->ra_stderr_fd >= 0) {
+ if (op->ra_stderr_fd >= STDERR_FILENO) {
close(op->ra_stderr_fd);
op->ra_stderr_fd = -1;
+ }else if (op->ra_stderr_fd >= 0) {
+ lrmd_log(LOG_ERR, "%s: invalid stderr fd %d"
+ , __FUNCTION__, op->ra_stderr_fd);
}
op->first_line_ra_stdout[0] = EOS;
@@ -3069,6 +3075,17 @@
op->ra_stdout_fd = stdout_fd[0];
op->ra_stderr_fd = stderr_fd[0];
+ if (op->ra_stdout_fd <= STDERR_FILENO) {
+ lrmd_log(LOG_ERR
+ , "%s: invalid stdout fd [%d]"
+ , __FUNCTION__, op->ra_stdout_fd);
+ }
+ if (op->ra_stderr_fd <= STDERR_FILENO) {
+ lrmd_log(LOG_ERR
+ , "%s: invalid stderr fd [%d]"
+ , __FUNCTION__, op->ra_stderr_fd);
+ }
+
op->ra_stdout_gsource = G_main_add_fd(G_PRIORITY_HIGH
, stdout_fd[0], FALSE, handle_pipe_ra_stdout
, op, destroy_pipe_ra_stdout);
@@ -3340,10 +3357,14 @@
{
lrmd_op_t* op = (lrmd_op_t *)user_data;
- if (op->ra_stdout_fd >= 0) {
+ if (op->ra_stdout_fd > STDERR_FILENO) {
close(op->ra_stdout_fd);
op->ra_stdout_fd = -1;
+ }else if (op->ra_stdout_fd >= 0) {
+ lrmd_log(LOG_ERR, "%s:Attempt to close file descriptor %d"
+ , __FUNCTION__, op->ra_stdout_fd);
}
+
}
static void
@@ -3351,9 +3372,12 @@
{
lrmd_op_t* op = (lrmd_op_t *)user_data;
- if (op->ra_stderr_fd >= 0) {
+ if (op->ra_stderr_fd > STDERR_FILENO) {
close(op->ra_stderr_fd);
op->ra_stderr_fd = -1;
+ }else if (op->ra_stderr_fd >= 0) {
+ lrmd_log(LOG_ERR, "%s:Attempt to close file descriptor %d"
+ , __FUNCTION__, op->ra_stderr_fd);
}
}
@@ -3380,7 +3404,7 @@
fd = op->ra_stdout_fd;
}
- if (fd <= 0) {
+ if (fd <= STDERR_FILENO) {
lrmd_log(LOG_CRIT
, "%s:%d: Attempt to read from closed/invalid file
descriptor %d."
, __FUNCTION__, __LINE__, fd);
@@ -3393,9 +3417,11 @@
G_main_del_fd(op->ra_stdout_gsource);
op->ra_stdout_gsource = NULL;
}
- if (op->ra_stdout_fd >= 0) {
- close(op->ra_stdout_fd);
- op->ra_stdout_fd = -1;
+ if (fd > STDERR_FILENO) {
+ close(fd);
+ if (fd == op->ra_stdout_fd) {
+ op->ra_stdout_fd = -1;
+ }
}
rc = FALSE;
}
@@ -3446,7 +3472,7 @@
return FALSE;
}
- if (fd <= 0) {
+ if (fd <= STDERR_FILENO) {
lrmd_log(LOG_CRIT
, "%s:%d: Attempt to read from closed/invalid file
descriptor %d."
, __FUNCTION__, __LINE__, fd);
@@ -3459,9 +3485,11 @@
G_main_del_fd(op->ra_stderr_gsource);
op->ra_stderr_gsource = NULL;
}
- if (op->ra_stderr_fd >= 0) {
- close(op->ra_stderr_fd);
- op->ra_stderr_fd = -1;
+ if (fd >= STDERR_FILENO) {
+ close(fd);
+ if (fd == op->ra_stderr_fd) {
+ op->ra_stderr_fd = -1;
+ }
}
rc = FALSE;
}
@@ -3653,6 +3681,9 @@
}
/*
* $Log: lrmd.c,v $
+ * Revision 1.214 2006/02/10 05:55:14 alan
+ * Put more code in to catch the invalid file descriptor earlier on.
+ *
* Revision 1.213 2006/02/10 05:00:35 alan
* Fixed two very small lrmd errors.
* Improved checking for bad lrmd file descriptors - hopefully catching things
sooner.
------------------------------
_______________________________________________
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 45
********************************************