dlm: master - dlm_controld: Reset fs_notified when check_fs_done
by David Teigland
Gitweb: http://git.fedorahosted.org/git/dlm.git?p=dlm.git;a=commitdiff;h=70a61dc4...
Commit: 70a61dc4d5d91119da30a7165e70bb9646a6d6c1
Parent: 9ccd853b6d36e99af1100548d1e389fc921f10d4
Author: Jiaju Zhang <jjzhang.linux(a)gmail.com>
AuthorDate: Mon Nov 8 16:07:31 2010 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Feb 22 11:09:10 2011 -0600
dlm_controld: Reset fs_notified when check_fs_done
This situation only seems to arise with ocfs2_controld.
Copying bug description from email
https://www.redhat.com/archives/cluster-devel/2010-November/msg00004.html
> About the issue that dlm_controld and fs_controld sit spinning,
> retrying and replying for the fs_notified check, I have a suspision
> that another scenario may also hit that logic:
>
> If the node->fs_notified has been set to 1 by previous change, when a
> new change comes and needs to check the node->fs_notified, because it
> has not been reset to 0, so check_fs_done will succeed even if
> dlm_controld has not received the notification from fs_controld this
> time.
> For example, given that the following membership changes n, n+1, n+2,
> we see what happens on node X:
> Step 1: cg n: node Y leaves with CPG_REASON_NODEDOWN reason,
> eventually in node X's ls->node_history, node Y's fs_notified
> = 1
> Step 2: cg n+1: node Y joins ...
> Step 3: cg n+2: node Y leaves with CPG_REASON_NODEDOWN reason, one
> possible scenario is: before fs_controld's notification
> arrives, dlm_controld has known node Y is down from CPG
> message and done a lot of work, and it saw node Y's
> fs_notified = 1 (been set in Step 1) then passed the fs check
> wrongly. So node Y's check_fs reset to 0.
> Step 4: fs_controld's notification arrives, it sees node Y's check_fs
> = 0 and assumes dlm_controld has not known node Y is down and
> retries to send the notification. But in fact, dlm_controld
> has already known this and finished all the work, which will
> result in the spinning ...
Signed-off-by: Jiaju Zhang <jjzhang.linux(a)gmail.com>
Signed-off-by: David Teigland <teigland(a)redhat.com>
---
group/dlm_controld/cpg.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/group/dlm_controld/cpg.c b/group/dlm_controld/cpg.c
index 9b0d223..12cb202 100644
--- a/group/dlm_controld/cpg.c
+++ b/group/dlm_controld/cpg.c
@@ -651,6 +651,7 @@ static int check_fs_done(struct lockspace *ls)
if (node->fs_notified) {
log_group(ls, "check_fs nodeid %d clear", node->nodeid);
node->check_fs = 0;
+ node->fs_notified = 0;
} else {
log_group(ls, "check_fs nodeid %d needs fs notify",
node->nodeid);
13 years, 2 months
fence-agents: master - fence_wti: Unable to parse output when splitted into several screens (2/2)
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=com...
Commit: 693d93c73fb6cd4a7978a507f0fce33c85feda6f
Parent: 7a8fa47877b462bd0f892d62c5488036113143e3
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Mon Feb 21 20:55:30 2011 +0100
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Mon Feb 21 20:55:30 2011 +0100
fence_wti: Unable to parse output when splitted into several screens (2/2)
Minor changes to previous patch. Power ON/OFF now works as expected
Resolves: rhbz#678522
---
fence/agents/wti/fence_wti.py | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/fence/agents/wti/fence_wti.py b/fence/agents/wti/fence_wti.py
index d05676b..8caa4c2 100644
--- a/fence/agents/wti/fence_wti.py
+++ b/fence/agents/wti/fence_wti.py
@@ -28,13 +28,12 @@ def get_power_status(conn, options):
conn.send("/S"+"\r\n")
if isinstance(options["-c"], list):
- re_all = options["-c"]
+ re_all = list(options["-c"])
else:
re_all = [options["-c"]]
re_next = re.compile("Enter: ", re.IGNORECASE)
re_all.append(re_next)
- conn.send("/S"+"\r\n")
result = conn.log_expect(options, re_all, int(options["-Y"]))
listing = conn.before
if result == (len(re_all) - 1):
13 years, 2 months
fence-agents: master - fence_wti: Unable to parse output when splitted into several screens
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=com...
Commit: 7a8fa47877b462bd0f892d62c5488036113143e3
Parent: 1c57218c8735553ba74e1c286295dd0cf95c3d42
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Mon Feb 21 19:42:18 2011 +0100
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Mon Feb 21 19:42:18 2011 +0100
fence_wti: Unable to parse output when splitted into several screens
Parsing of listing that consists of several screens added.
Resolves: rhbz#678522
---
fence/agents/wti/fence_wti.py | 28 +++++++++++++++++++++++-----
1 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/fence/agents/wti/fence_wti.py b/fence/agents/wti/fence_wti.py
index a71852a..d05676b 100644
--- a/fence/agents/wti/fence_wti.py
+++ b/fence/agents/wti/fence_wti.py
@@ -22,9 +22,26 @@ BUILD_DATE="March, 2008"
#END_VERSION_GENERATION
def get_power_status(conn, options):
- try:
+ listing = ""
+
+ try:
+ conn.send("/S"+"\r\n")
+
+ if isinstance(options["-c"], list):
+ re_all = options["-c"]
+ else:
+ re_all = [options["-c"]]
+ re_next = re.compile("Enter: ", re.IGNORECASE)
+ re_all.append(re_next)
+
conn.send("/S"+"\r\n")
- conn.log_expect(options, options["-c"], int(options["-Y"]))
+ result = conn.log_expect(options, re_all, int(options["-Y"]))
+ listing = conn.before
+ if result == (len(re_all) - 1):
+ conn.send("\r\n")
+ conn.log_expect(options, options["-c"], int(options["-Y"]))
+ listing += conn.before
+
except pexpect.EOF:
fail(EC_CONNECTION_LOST)
except pexpect.TIMEOUT:
@@ -32,8 +49,8 @@ def get_power_status(conn, options):
plug_section = 0
outlets = {}
- for line in conn.before.splitlines():
- if (plug_section == 2) and line.find("|") >= 0:
+ for line in listing.splitlines():
+ if (plug_section == 2) and line.find("|") >= 0 and line.startswith("PLUG") == False:
plug_line = [x.strip().lower() for x in line.split("|")]
if len(plug_line) < len(plug_header):
plug_section = -1
@@ -42,7 +59,8 @@ def get_power_status(conn, options):
return plug_line[status_index]
else:
## We already believe that first column contains plug number
- outlets[plug_line[0]] = (plug_line[name_index], plug_line[status_index])
+ if len(plug_line[0]) != 0:
+ outlets[plug_line[0]] = (plug_line[name_index], plug_line[status_index])
elif (plug_section == 1):
plug_section = 2
pass
13 years, 2 months
cluster: STABLE31 - cman init: fence_xvmd is long gone...
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: c217c686b16f9aa8be3b2b49d017b11bf05b26fc
Parent: f7d98e763f40e3e7630cf687ec791c446aade8cc
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Mon Feb 21 18:29:34 2011 +0100
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Mon Feb 21 18:29:34 2011 +0100
cman init: fence_xvmd is long gone...
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
cman/init.d/cman.in | 8 --------
1 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index fbca2fb..3cef0df 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -448,14 +448,6 @@ fence_join_enabled()
fi
}
-check_fence_opt()
-{
- for i in $(getopt dfi:a:p:I:C:U:c:k:u?hLXV $FENCE_XVMD_OPTS); do
- [ -$1 = $i ] && return 0
- done
- return 1
-}
-
### the real stuff starts here
start_global()
13 years, 2 months
fence: master - build: add support for dbus notification
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/fence.git?p=fence.git;a=commitdiff;h=7181...
Commit: 7181608a3a497bff3d9d1306e77503dbfc4c32f5
Parent: a8e523a8ed9df5d54d9c41349a19e1c95252a45e
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Fri Feb 18 20:24:05 2011 +0100
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Fri Feb 18 20:24:05 2011 +0100
build: add support for dbus notification
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
configure.ac | 11 ++++++++++-
fence/fenced/Makefile.am | 11 ++++++++++-
fence/fenced/main.c | 4 +---
3 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac
index 4da5a0f..3393315 100644
--- a/configure.ac
+++ b/configure.ac
@@ -109,9 +109,18 @@ AC_CHECK_FUNCS([ftruncate gettimeofday memset mkfifo select socket strcasecmp st
# local options
AC_ARG_ENABLE([debug],
- [ --enable-debug enable debug build. ],
+ [ --enable-debug enable debug build [default=no].],
[ default="no" ])
+AC_ARG_ENABLE([dbus],
+ [ --enable-dbus enable support for dbus [default=yes]. ],
+ [ default="yes" ])
+
+AM_CONDITIONAL(BUILD_DBUS, test "x${enable_dbus}" != "xno")
+if test "x${enable_dbus}" != "xno"; then
+ PKG_CHECK_MODULES([dbus],[dbus-1])
+fi
+
AC_ARG_WITH([syslogfacility],
[ --syslogfacility=FACILITY
cluster default syslog facility. ],
diff --git a/fence/fenced/Makefile.am b/fence/fenced/Makefile.am
index 3bb6dfe..f309383 100644
--- a/fence/fenced/Makefile.am
+++ b/fence/fenced/Makefile.am
@@ -4,7 +4,8 @@ sbin_PROGRAMS = fenced
noinst_HEADERS = config.h fd.h fenced.h
-fenced_SOURCES = config.c cpg.c logging.c main.c member_cman.c recover.c
+fenced_SOURCES = config.c cpg.c dbus.c \
+ logging.c main.c member_cman.c recover.c
fenced_CPPFLAGS = -D_FILE_OFFSET_BITS=64 \
-I$(top_srcdir)/fence/include \
@@ -17,4 +18,12 @@ fenced_CFLAGS = $(logt_CFLAGS) $(cfg_CFLAGS) \
fenced_LDFLAGS = $(logt_LIBS) $(cfg_LIBS) $(cpg_LIBS) $(quorum_LIBS) \
-lpthread
+if BUILD_DBUS
+fenced_CPPFLAGS += -DDBUS
+
+fenced_CFLAGS += $(dbus_CFLAGS)
+
+fenced_LDFLAGS += $(dbus_LIBS)
+endif
+
fenced_LDADD = $(top_builddir)/fence/libfence/libfence.la
diff --git a/fence/fenced/main.c b/fence/fenced/main.c
index 555fb36..a20aae2 100644
--- a/fence/fenced/main.c
+++ b/fence/fenced/main.c
@@ -988,11 +988,9 @@ int main(int argc, char **argv)
loop();
-<<<<<<< HEAD
-=======
fd_dbus_exit();
unlink(LOCKFILE_NAME);
->>>>>>> 4536bfb... fenced: send dbus signal when node is fenced
+
return 0;
}
13 years, 2 months
fence: master - fenced: send dbus signal when node is fenced
by rohara
Gitweb: http://git.fedorahosted.org/git/fence.git?p=fence.git;a=commitdiff;h=a8e5...
Commit: a8e523a8ed9df5d54d9c41349a19e1c95252a45e
Parent: c36edde1d07fa8ba54cc9e9f78a3b4905b8b4f68
Author: Ryan O'Hara <rohara(a)redhat.com>
AuthorDate: Wed Feb 2 18:15:32 2011 -0600
Committer: Ryan O'Hara <rohara(a)cyclone.(none)>
CommitterDate: Fri Feb 18 11:03:42 2011 -0600
fenced: send dbus signal when node is fenced
This patch adds the ability to send a dbus signal when a node is fenced.
This code is can reestablish a connection with dbus if necessary.
Signed-off-by: Ryan O'Hara <rohara(a)redhat.com>
Reviewed-by: David Teigland <teigland(a)redhat.com>
---
fence/fenced/config.c | 2 +
fence/fenced/config.h | 3 ++
fence/fenced/dbus.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++++
fence/fenced/fd.h | 6 +++
fence/fenced/main.c | 18 +++++++++-
fence/fenced/recover.c | 4 ++
6 files changed, 118 insertions(+), 2 deletions(-)
diff --git a/fence/fenced/config.c b/fence/fenced/config.c
index f8e9846..5b657d0 100644
--- a/fence/fenced/config.c
+++ b/fence/fenced/config.c
@@ -10,6 +10,7 @@ int ccs_handle;
int optd_debug_logfile;
int optd_clean_start;
+int optd_disable_dbus;
int optd_skip_undefined;
int optd_post_join_delay;
int optd_post_fail_delay;
@@ -20,6 +21,7 @@ int optd_override_path;
int cfgd_debug_logfile = DEFAULT_DEBUG_LOGFILE;
int cfgd_clean_start = DEFAULT_CLEAN_START;
+int cfgd_disable_dbus = DEFAULT_DISABLE_DBUS;
int cfgd_skip_undefined = DEFAULT_SKIP_UNDEFINED;
int cfgd_post_join_delay = DEFAULT_POST_JOIN_DELAY;
int cfgd_post_fail_delay = DEFAULT_POST_FAIL_DELAY;
diff --git a/fence/fenced/config.h b/fence/fenced/config.h
index 102b91a..18cc762 100644
--- a/fence/fenced/config.h
+++ b/fence/fenced/config.h
@@ -5,6 +5,7 @@
#define DEFAULT_DEBUG_LOGFILE 0
#define DEFAULT_CLEAN_START 0
+#define DEFAULT_DISABLE_DBUS 0
#define DEFAULT_SKIP_UNDEFINED 0
#define DEFAULT_POST_JOIN_DELAY 6
#define DEFAULT_POST_FAIL_DELAY 0
@@ -13,6 +14,7 @@
extern int optd_debug_logfile;
extern int optd_clean_start;
+extern int optd_disable_dbus;
extern int optd_skip_undefined;
extern int optd_post_join_delay;
extern int optd_post_fail_delay;
@@ -21,6 +23,7 @@ extern int optd_override_path;
extern int cfgd_debug_logfile;
extern int cfgd_clean_start;
+extern int cfgd_disable_dbus;
extern int cfgd_skip_undefined;
extern int cfgd_post_join_delay;
extern int cfgd_post_fail_delay;
diff --git a/fence/fenced/dbus.c b/fence/fenced/dbus.c
new file mode 100644
index 0000000..5d1e1d5
--- /dev/null
+++ b/fence/fenced/dbus.c
@@ -0,0 +1,87 @@
+#include "fd.h"
+#include "config.h"
+
+#ifdef DBUS
+#include <dbus/dbus.h>
+
+#define DBUS_FENCE_NAME "com.redhat.cluster.fence"
+#define DBUS_FENCE_IFACE "com.redhat.cluster.fence"
+#define DBUS_FENCE_PATH "/com/redhat/cluster/fence"
+
+static DBusConnection *bus = NULL;
+
+void fd_dbus_init(void)
+{
+ if (!(bus = dbus_bus_get_private(DBUS_BUS_SYSTEM, NULL))) {
+ log_error("failed to get dbus connection");
+ } else {
+ log_debug("connected to dbus %s", dbus_bus_get_unique_name(bus));
+ }
+}
+
+void fd_dbus_exit(void)
+{
+ if (bus) {
+ dbus_connection_close(bus);
+ dbus_connection_unref(bus);
+ }
+ bus = NULL;
+}
+
+void fd_dbus_send(const char *nodename, int nodeid, int result)
+{
+ DBusMessage *msg = NULL;
+
+ if (bus && !dbus_connection_read_write(bus, 1)) {
+ log_debug("disconnected from dbus");
+ fd_dbus_exit();
+ }
+
+ if (!bus) {
+ fd_dbus_init();
+ }
+
+ if (!bus) {
+ goto out;
+ }
+
+ if (!(msg = dbus_message_new_signal(DBUS_FENCE_PATH,
+ DBUS_FENCE_IFACE,
+ "FenceNode"))) {
+ log_error("failed to create dbus signal");
+ goto out;
+ }
+
+ if (!dbus_message_append_args(msg,
+ DBUS_TYPE_STRING, &nodename,
+ DBUS_TYPE_INT32, &nodeid,
+ DBUS_TYPE_INT32, &result,
+ DBUS_TYPE_INVALID)) {
+ log_error("failed to append args to dbus signal");
+ goto out;
+ }
+
+ dbus_connection_send(bus, msg, NULL);
+ dbus_connection_flush(bus);
+
+out:
+ if (msg) {
+ dbus_message_unref(msg);
+ }
+}
+
+#else
+
+void fd_dbus_init(void)
+{
+}
+
+void fd_dbus_exit(void)
+{
+}
+
+void fd_dbus_send(const char *nodename, int nodeid, int result)
+{
+}
+
+#endif /* DBUS */
diff --git a/fence/fenced/fd.h b/fence/fenced/fd.h
index 1182ef5..aead409 100644
--- a/fence/fenced/fd.h
+++ b/fence/fenced/fd.h
@@ -258,5 +258,11 @@ void init_logging(void);
void setup_logging(void);
void close_logging(void);
+/* dbus.c */
+
+void fd_dbus_init(void);
+void fd_dbus_exit(void);
+void fd_dbus_send(const char *nodename, int nodeid, int result);
+
#endif /* __FD_DOT_H__ */
diff --git a/fence/fenced/main.c b/fence/fenced/main.c
index 2a4678f..555fb36 100644
--- a/fence/fenced/main.c
+++ b/fence/fenced/main.c
@@ -855,7 +855,7 @@ static void print_usage(void)
printf(" -j <secs> Post-join fencing delay (default %d)\n", DEFAULT_POST_JOIN_DELAY);
printf(" -f <secs> Post-fail fencing delay (default %d)\n", DEFAULT_POST_FAIL_DELAY);
printf(" -R <secs> Override time (default %d)\n", DEFAULT_OVERRIDE_TIME);
-
+ printf(" -q Disable dbus signals\n");
printf(" -O <path> Override path (default %s)\n", DEFAULT_OVERRIDE_PATH);
printf(" -h Print this help, then exit\n");
printf(" -V Print program version information, then exit\n");
@@ -865,7 +865,7 @@ static void print_usage(void)
printf("\n");
}
-#define OPTION_STRING "Lcj:f:Dn:O:hVSse:r:"
+#define OPTION_STRING "Lcj:f:Dn:O:hVSse:r:q:"
static void read_arguments(int argc, char **argv)
{
@@ -918,6 +918,11 @@ static void read_arguments(int argc, char **argv)
cfgd_override_path = strdup(optarg);
break;
+ case 'q':
+ optd_disable_dbus = 1;
+ cfgd_disable_dbus = 1;
+ break;
+
case 'r':
register_controlled_dir(optarg);
break;
@@ -977,8 +982,17 @@ int main(int argc, char **argv)
log_level(LOG_INFO, "fenced %s started", VERSION);
signal(SIGTERM, sigterm_handler);
+ if (!cfgd_disable_dbus) {
+ fd_dbus_init();
+ }
+
loop();
+<<<<<<< HEAD
+=======
+ fd_dbus_exit();
+ unlink(LOCKFILE_NAME);
+>>>>>>> 4536bfb... fenced: send dbus signal when node is fenced
return 0;
}
diff --git a/fence/fenced/recover.c b/fence/fenced/recover.c
index 1847246..4434256 100644
--- a/fence/fenced/recover.c
+++ b/fence/fenced/recover.c
@@ -383,6 +383,10 @@ void fence_victims(struct fd *fd)
log_error("fence %s %s", node->name,
error ? "failed" : "success");
+ if (!cfgd_disable_dbus) {
+ fd_dbus_send(node->name, node->nodeid, error);
+ }
+
skip_log_message:
if (!error) {
node->local_victim_done = 1;
13 years, 2 months
cluster: RHEL57 - fence_rsa: Better error handling
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 415fc5f19db6780c76dfc00f680a9617dacd7b31
Parent: a93f8e62758d78e50877efbfe55a1101088a141d
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Wed Feb 16 15:00:35 2011 +0100
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Wed Feb 16 15:18:19 2011 +0100
fence_rsa: Better error handling
In some special cases (reason is not known yet) fence agent for RSA fails to
get status because it can't find pattern 'Power: (.*)'. After applying this
patch agent will end with proper error message instead of python backtrace.
Resolves: rhbz#652619
---
fence/agents/rsa/fence_rsa.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/fence/agents/rsa/fence_rsa.py b/fence/agents/rsa/fence_rsa.py
index 36a9f04..33c7fe9 100755
--- a/fence/agents/rsa/fence_rsa.py
+++ b/fence/agents/rsa/fence_rsa.py
@@ -26,7 +26,12 @@ def get_power_status(conn, options):
except pexpect.TIMEOUT:
fail(EC_TIMED_OUT)
- status = re.compile("Power: (.*)", re.IGNORECASE).search(conn.before).group(1)
+ match = re.compile("Power: (.*)", re.IGNORECASE).search(conn.before)
+ if (match != None):
+ status = match.group(1)
+ else:
+ status = "undefined"
+
return status.lower().strip()
def set_power_status(conn, options):
13 years, 2 months
fence-agents: master - fence_rsa: Better error handling
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=com...
Commit: 1c57218c8735553ba74e1c286295dd0cf95c3d42
Parent: 9b1a7fa8ad83152d729017accf3dff2ffbe90ea3
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Wed Feb 16 15:00:35 2011 +0100
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Wed Feb 16 15:00:35 2011 +0100
fence_rsa: Better error handling
In some special cases (reason is not known yet) fence agent for RSA fails to
get status because it can't find pattern 'Power: (.*)'. After applying this
patch agent will end with proper error message instead of python backtrace.
Resolves: rhbz#652619
---
fence/agents/rsa/fence_rsa.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/fence/agents/rsa/fence_rsa.py b/fence/agents/rsa/fence_rsa.py
index 888063b..2dc18fe 100644
--- a/fence/agents/rsa/fence_rsa.py
+++ b/fence/agents/rsa/fence_rsa.py
@@ -25,7 +25,12 @@ def get_power_status(conn, options):
except pexpect.TIMEOUT:
fail(EC_TIMED_OUT)
- status = re.compile("Power: (.*)", re.IGNORECASE).search(conn.before).group(1)
+ match = re.compile("Power: (.*)", re.IGNORECASE).search(conn.before)
+ if (match != None):
+ status = match.group(1)
+ else:
+ status = "undefined"
+
return status.lower().strip()
def set_power_status(conn, options):
13 years, 2 months
cluster: RHEL57 - fence_ipmilan: Fix manual page to describe usage with HP iLO 3
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: a93f8e62758d78e50877efbfe55a1101088a141d
Parent: 144e764cfcb5cdd937cb1eb9316146aadce794e1
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Thu Jan 13 15:02:11 2011 +0100
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Tue Feb 15 16:55:58 2011 -0500
fence_ipmilan: Fix manual page to describe usage with HP iLO 3
Resolves: rhbz#671089
Reviewed-by: Lon Hohberger <lhh(a)redhat.com>
---
fence/agents/ipmilan/ipmilan.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/fence/agents/ipmilan/ipmilan.c b/fence/agents/ipmilan/ipmilan.c
index e894e60..2f46078 100644
--- a/fence/agents/ipmilan/ipmilan.c
+++ b/fence/agents/ipmilan/ipmilan.c
@@ -1106,7 +1106,10 @@ void print_xml_metadata(char *pname) {
printf("<longdesc>\n");
printf("fence_ipmilan is an I/O Fencing agent which can be used with "
"machines controlled by IPMI. This agent calls support software "
- "using ipmitool (http://ipmitool.sf.net/).");
+ "using ipmitool (http://ipmitool.sf.net/).\n\n"
+ "To use fence_ipmilan with HP iLO 3 you have to enable lanplus "
+ "option (lanplus / -P) and increase wait after operation to "
+ "4 seconds (power_wait=4 / -T 4)");
printf("</longdesc>\n");
printf("%s\n","<parameters>");
13 years, 2 months
cluster: RHEL57 - cman: Fix cman_tool reporting with quorum disk
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 144e764cfcb5cdd937cb1eb9316146aadce794e1
Parent: 4ec386998729159bb68c74c9ddb8636d9f901025
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Mon Nov 29 16:46:20 2010 -0500
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Tue Feb 15 16:01:46 2011 -0500
cman: Fix cman_tool reporting with quorum disk
This fixes a segmentation fault caused by an
uninitialized variable when running:
cman_tool nodes -F id,name,type,addr
Resolves: rhbz#654894
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
Reviewed-by: Shane Bradley <sbradley(a)redhat.com>
---
cman/cman_tool/main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cman/cman_tool/main.c b/cman/cman_tool/main.c
index 9575c59..e059c9f 100644
--- a/cman/cman_tool/main.c
+++ b/cman/cman_tool/main.c
@@ -457,7 +457,7 @@ static void show_nodes(commandline_t *comline)
}
}
- int numaddrs;
+ int numaddrs = 0;
struct cman_node_address addrs[MAX_INTERFACES];
if (comline->addresses_opt || comline->format_opts) {
13 years, 2 months