Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commi…
Commit: 1d42f8ed7eea12b4bd15744bb746ae9d271722cc
Parent: 0000000000000000000000000000000000000000
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: 2011-02-08 07:29 +0000
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: 2011-02-08 07:29 +0000
annotated tag: v3.1.1 has been created
at 1d42f8ed7eea12b4bd15744bb746ae9d271722cc (tag)
tagging 66ad000089dc330e2467bdf233763cc07a96fba7 (commit)
replaces v3.1.0
v3.1.1 release
Fabio M. Di Nitto (3):
Fix build for distributions that don't use bash as default shell
build: fix make dist target
Update COPYRIGHT file
Marek 'marx' Grac (3):
fence_ipmilan: Add "diag" option to support "ipmitool chassis power diag"
fence_ipmilan: Fix manual page to describe usage with HP iLO 3
fence_eaton_snmp: New fence agent for Eaton devices
Ryan O'Hara (6):
fence_scsi: identify dm-multipath devices correctly
fence_scsi: fix regular expression for grep
fence_scsi: always do sg_turs before registration
fence_scsi: always do sg_turs for dm-mp devices
fence_scsi: verify that on/off actions succeed
fence_scsi: properly log errors for all commands
Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commi…
Commit: 66ad000089dc330e2467bdf233763cc07a96fba7
Parent: 8a0edf9d60fcc781bc4222c5f320da3a23c98faf
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Tue Feb 8 08:26:05 2011 +0100
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Tue Feb 8 08:26:05 2011 +0100
Update COPYRIGHT file
bump years to 2011
add fence_eaton_snmp information
fix email address to avoid autospam
drop fence_xvm bits since the agent has been dropped ages ago
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
doc/COPYRIGHT | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/doc/COPYRIGHT b/doc/COPYRIGHT
index 83d51aa..b10071c 100644
--- a/doc/COPYRIGHT
+++ b/doc/COPYRIGHT
@@ -1,7 +1,7 @@
Unless specified otherwise in the "exceptions section" below:
Copyright (C) 1997-2003 Sistina Software, Inc. All rights reserved.
-Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved.
+Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
Exceptions:
@@ -9,27 +9,26 @@ fence/agents/apc_snmp/powernet369.mib:
Copyright (c) 2005 American Power Conversion, Inc.
PowerNet is a Trademark of American Power Conversion Corp.
+fence/agents/eaton_snmp/fence_eaton_snmp.py:
+ Copyright (c) 2011 eaton.com
+ Author: Arnaud Quette <ArnaudQuette at Eaton.com>
+
fence/agents/ifmib/fence_ifmib.py:
- Copyright (C) 2008-2010 Ross Vandegrift.
+ Copyright (C) 2008-2011 Ross Vandegrift.
Written by Ross Vandegrift <ross at kallisti.us>
fence/agents/intelmodular/fence_intelmodular.pl:
- Contributed by Matthew Kent <matt(a)bravenet.com>
+ Contributed by Matthew Kent <matt at bravenet.com>
fence/agents/ipmilan/expect.{c,h}:
Copyright (C) 2000 Alan Robertson <alanr at unix.sh>
fence/agents/node_assassin/*
- Copyright (C) 2009-2010 Madison Kelly/Alteeve's Niche!
+ Copyright (C) 2009-2011 Madison Kelly/Alteeve's Niche!
Author: Digimer <digimer at alteeve.com>
-fence/agents/xvm/tcp.c:
- Copyright (C) 2000 Mission Critical Linux
- Copyright (C) 2002-2010 Red Hat, Inc. All rights reserved.
- Author: Jeff Moyer <jmoyer at redhat.com>
-
fence/man/fence_ifmib.8:
- Copyright (C) 2008-2010 Ross Vandegrift.
+ Copyright (C) 2008-2011 Ross Vandegrift.
Written by Ross Vandegrift <ross at kallisti.us>
Authors as known by current RCS as of the time of writing:
Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commi…
Commit: d9e40ee832d3705c3e952f11efa79d6e155d6277
Parent: 522fef7acb26c7cdc46f5b0da8b20c1900c692b7
Author: Ryan O'Hara <rohara(a)redhat.com>
AuthorDate: Mon Jan 24 13:54:25 2011 -0600
Committer: Ryan O'Hara <rohara(a)redhat.com>
CommitterDate: Mon Feb 7 12:42:39 2011 -0600
fence_scsi: verify that on/off actions succeed
This patch adds code to verify that both "on" and "off" actions are
successful. This is needed because there seem to be some arrays that
do not report an error even when no registration was created, etc.
These verification steps takes places after the action has been
performed successfully. If an error was encountered while performing
either an "on" or "off" action, fence_scsi will exit and no verification
will take place. Failure to verify that an action was successful for any
device will result is failure.
For the "on" action, do_verify_on will check that the key was
successfully registered with each devices and that a reservation exists
on each device.
For the "off" action, do_verify_off will check that the key was removed
from each device and that a reservation exists on each device.
Resolves: rhbz#644385
Signed-off-by: Ryan O'Hara <rohara(a)redhat.com>
Reviewed-by: Lon Hohberger <lhh(a)redhat.com>
---
fence/agents/scsi/fence_scsi.pl | 58 +++++++++++++++++++++++++++++++++++++++
1 files changed, 58 insertions(+), 0 deletions(-)
diff --git a/fence/agents/scsi/fence_scsi.pl b/fence/agents/scsi/fence_scsi.pl
index 7fcb685..0512f3e 100644
--- a/fence/agents/scsi/fence_scsi.pl
+++ b/fence/agents/scsi/fence_scsi.pl
@@ -110,6 +110,62 @@ sub do_action_status ($@)
}
}
+sub do_verify_on ($@)
+{
+ my $self = (caller(0))[3];
+ my ($node_key, @devices) = @_;
+ my $count = 0;
+
+ for $dev (@devices) {
+ my @keys = grep { /^$node_key$/ } get_registration_keys ($dev);
+
+ ## check that our key is registered
+ if (scalar (@keys) == 0) {
+ log_debug ("failed to register key $node_key on device $dev");
+ $count++;
+ next;
+ }
+
+ ## check that a reservation exists
+ if (!get_reservation_key ($dev)) {
+ log_debug ("no reservation exists on device $dev");
+ $count++;
+ }
+ }
+
+ if ($count != 0) {
+ log_error ("$self: failed to verify $count devices");
+ }
+}
+
+sub do_verify_off ($@)
+{
+ my $self = (caller(0))[3];
+ my ($node_key, @devices) = @_;
+ my $count = 0;
+
+ for $dev (@devices) {
+ my @keys = grep { /^$node_key$/ } get_registration_keys ($dev);
+
+ ## check that our key is not registered
+ if (scalar (@keys) != 0) {
+ log_debug ("failed to remove key $node_key from device $dev");
+ $count++;
+ next;
+ }
+
+ ## check that a reservation exists
+ if (!get_reservation_key ($dev)) {
+ log_debug ("no reservation exists on device $dev");
+ $count++;
+ }
+ }
+
+ if ($count != 0) {
+ log_error ("$self: failed to verify $count devices");
+ }
+}
+
sub do_register ($$$)
{
my $self = (caller(0))[3];
@@ -668,9 +724,11 @@ if (!defined $opt_o) {
##
if ($opt_o =~ /^on$/i) {
do_action_on ($key, @devices);
+ do_verify_on ($key, @devices);
}
elsif ($opt_o =~ /^off$/i) {
do_action_off ($key, @devices);
+ do_verify_off ($key, @devices);
}
elsif ($opt_o =~ /^status/i) {
do_action_status ($key, @devices);
Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commi…
Commit: 522fef7acb26c7cdc46f5b0da8b20c1900c692b7
Parent: da047800ec78e8015fb6c82af260f2325b8e27ac
Author: Ryan O'Hara <rohara(a)redhat.com>
AuthorDate: Mon Jan 24 12:47:23 2011 -0600
Committer: Ryan O'Hara <rohara(a)redhat.com>
CommitterDate: Mon Feb 7 12:42:27 2011 -0600
fence_scsi: always do sg_turs for dm-mp devices
This patch fixes a with the original patch posted last week. Before
attempting to register with a device, we should call sg_turs on the
device. If that device is a dm-multipath device, we should call sg_turs
on all the paths. This can be done by simply moving the call to do_reset
to do_register and do_register_ignore.
Also, the patch adds a call to do_reset before doing a "status" action.
If a node has been fenced and then proceeds to check its status, it will
be in "unit attention" state.
Resolves: rhbz#640343
Signed-off-by: Ryan O'Hara <rohara(a)redhat.com>
Reviewed-by: Lon Hohberger <lhh(a)redhat.com>
---
fence/agents/scsi/fence_scsi.pl | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/fence/agents/scsi/fence_scsi.pl b/fence/agents/scsi/fence_scsi.pl
index 03c692c..7fcb685 100644
--- a/fence/agents/scsi/fence_scsi.pl
+++ b/fence/agents/scsi/fence_scsi.pl
@@ -46,7 +46,6 @@ sub do_action_on ($@)
log_error ("device $dev does not exist") if (! -e $dev);
log_error ("device $dev is not a block device") if (! -b $dev);
- do_reset ($dev);
do_register_ignore ($node_key, $dev);
if (!get_reservation_key ($dev)) {
@@ -94,6 +93,8 @@ sub do_action_status ($@)
log_error ("device $dev does not exist") if (! -e $dev);
log_error ("device $dev is not a block device") if (! -b $dev);
+ do_reset ($dev);
+
my @keys = grep { /^$node_key$/ } get_registration_keys ($dev);
if (scalar (@keys) != 0) {
@@ -129,6 +130,8 @@ sub do_register ($$$)
my $cmd;
my $out;
+ do_reset ($dev);
+
$cmd = "sg_persist -n -o -G -K $host_key -S $node_key -d $dev";
$cmd .= " -Z" if (defined $opt_a);
$out = qx { $cmd };
@@ -158,11 +161,13 @@ sub do_register_ignore ($$)
my $cmd;
my $out;
+ do_reset ($dev);
+
$cmd = "sg_persist -n -o -I -S $node_key -d $dev";
$cmd .= " -Z" if (defined $opt_a);
$out = qx { $cmd };
- die "[error]: $self\n" if ($?>>8);
+ die "[error]: $self ($dev)\n" if ($?>>8);
return;
}
Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commi…
Commit: da047800ec78e8015fb6c82af260f2325b8e27ac
Parent: c9871a397ec024fc9d0ece0fc71b3ee3cca0d480
Author: Ryan O'Hara <rohara(a)redhat.com>
AuthorDate: Wed Jan 19 14:18:54 2011 -0600
Committer: Ryan O'Hara <rohara(a)redhat.com>
CommitterDate: Mon Feb 7 12:41:45 2011 -0600
fence_scsi: always do sg_turs before registration
If a node has been fenced, or its key has been forcibly removed from
device(s) by another node, the victim will see "unit attention" from the
devices if/when it attempts to re-register. This error is normally
reported just once, but will cause registration to fail. We can safely
avoid this by calling sg_turs prior to each attempt to register with a
device.
Resolves: rhbz#640343
Signed-off-by: Ryan O'Hara <rohara(a)redhat.com>
Reviewed-by: Lon Hohberger <lhh(a)redhat.com>
---
fence/agents/scsi/fence_scsi.pl | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/fence/agents/scsi/fence_scsi.pl b/fence/agents/scsi/fence_scsi.pl
index 38e5210..03c692c 100644
--- a/fence/agents/scsi/fence_scsi.pl
+++ b/fence/agents/scsi/fence_scsi.pl
@@ -46,6 +46,7 @@ sub do_action_on ($@)
log_error ("device $dev does not exist") if (! -e $dev);
log_error ("device $dev is not a block device") if (! -b $dev);
+ do_reset ($dev);
do_register_ignore ($node_key, $dev);
if (!get_reservation_key ($dev)) {
@@ -226,6 +227,23 @@ sub do_preempt_abort ($$$)
return;
}
+sub do_reset (S)
+{
+ my $self = (caller(0))[3];
+ my ($dev) = @_;
+
+ my $cmd = "sg_turs $dev";
+ my @out = qx { $cmd 2> /dev/null };
+ my $err = ($?>>8);
+
+ ## note that it is not necessarily an error is $err is non-zero,
+ ## so just log the device and status and continue.
+
+ log_debug ("$self (dev=$dev, status=$err)");
+
+ return;
+}
+
sub key_read ()
{
my $self = (caller(0))[3];
Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commi…
Commit: c9871a397ec024fc9d0ece0fc71b3ee3cca0d480
Parent: e4dbdbf552a70c45957f4da5f6dc578f3e163bc9
Author: Ryan O'Hara <rohara(a)redhat.com>
AuthorDate: Wed Jan 19 10:57:15 2011 -0600
Committer: Ryan O'Hara <rohara(a)redhat.com>
CommitterDate: Mon Feb 7 12:41:15 2011 -0600
fence_scsi: fix regular expression for grep
When fence_scsi checks to see if a specific keys is registered for a
specific device, it uses grep to look through a list of all registered
keys. The existing regular expression was not specific enough, and could
result in false positives. This patch fixes the problem by using anchors
to make the regular expression more specific.
Resolves: rhbz#670910
Signed-off-by: Ryan O'Hara <rohara(a)redhat.com>
Reviewed-by: Lon Hohberger <lhh(a)redhat.com>
---
fence/agents/scsi/fence_scsi.pl | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fence/agents/scsi/fence_scsi.pl b/fence/agents/scsi/fence_scsi.pl
index 620af3f..38e5210 100644
--- a/fence/agents/scsi/fence_scsi.pl
+++ b/fence/agents/scsi/fence_scsi.pl
@@ -71,7 +71,7 @@ sub do_action_off ($@)
log_error ("device $dev does not exist") if (! -e $dev);
log_error ("device $dev is not a block device") if (! -b $dev);
- my @keys = grep { /$node_key/ } get_registration_keys ($dev);
+ my @keys = grep { /^$node_key$/ } get_registration_keys ($dev);
if (scalar (@keys) != 0) {
do_preempt_abort ($host_key, $node_key, $dev);
@@ -93,7 +93,7 @@ sub do_action_status ($@)
log_error ("device $dev does not exist") if (! -e $dev);
log_error ("device $dev is not a block device") if (! -b $dev);
- my @keys = grep { /$node_key/ } get_registration_keys ($dev);
+ my @keys = grep { /^$node_key$/ } get_registration_keys ($dev);
if (scalar (@keys) != 0) {
$dev_count++;
Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commi…
Commit: e4dbdbf552a70c45957f4da5f6dc578f3e163bc9
Parent: 9316eeaac07eddd979819803d0e93a5646cb70c5
Author: Ryan O'Hara <rohara(a)redhat.com>
AuthorDate: Tue Jan 18 14:21:02 2011 -0600
Committer: Ryan O'Hara <rohara(a)redhat.com>
CommitterDate: Mon Feb 7 12:40:52 2011 -0600
fence_scsi: identify dm-multipath devices correctly
Previously, fence_scsi would only identify /dev/dm* devices as being
multipath devices. This prevented the use of "friendly" dm-multipath
names (eg. /dev/mapper/mpath1). Since fence_scsi can now be passed
devices to operate on, it should be able to handle "friendly" names,
too. This patch fixes the problem by getting the absolute path of the
device at registration time.
Resolves: rhbz#644389
Signed-off-by: Ryan O'Hara <rohara(a)redhat.com>
Reviewed-by: Lon Hohberger <lhh(a)redhat.com>
---
fence/agents/scsi/fence_scsi.pl | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/fence/agents/scsi/fence_scsi.pl b/fence/agents/scsi/fence_scsi.pl
index 992a3eb..620af3f 100644
--- a/fence/agents/scsi/fence_scsi.pl
+++ b/fence/agents/scsi/fence_scsi.pl
@@ -1,5 +1,6 @@
#!/usr/bin/perl
+use Cwd 'realpath';
use File::Basename;
use Getopt::Std;
use POSIX;
@@ -112,6 +113,8 @@ sub do_register ($$$)
my $self = (caller(0))[3];
my ($host_key, $node_key, $dev) = @_;
+ $dev = realpath ($dev);
+
if (substr ($dev, 5) =~ /^dm/) {
my @slaves = get_mpath_slaves ($dev);
foreach (@slaves) {
@@ -139,6 +142,8 @@ sub do_register_ignore ($$)
my $self = (caller(0))[3];
my ($node_key, $dev) = @_;
+ $dev = realpath ($dev);
+
if (substr ($dev, 5) =~ /^dm/) {
my @slaves = get_mpath_slaves ($dev);
foreach (@slaves) {
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=ad…
Commit: ada14ea123c508224f758cd2eb8c5a51c3c19dc0
Parent: cbf98a5623e7177d497092f7a7b0e170b8b3177e
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Mon Feb 7 17:33:21 2011 +0100
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Mon Feb 7 17:33:21 2011 +0100
cman init: another fix to network manager detection
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
cman/init.d/cman.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index 45a607e..fbca2fb 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -317,7 +317,7 @@ cluster_disabled_at_boot()
network_manager_enabled()
{
- if status NetworkManager > /dev/null 2>&1 || \
+ if status $netmanager > /dev/null 2>&1 || \
chkconfig2 $netmanager; then
errmsg="\nNetwork Manager is either running or configured to run. Please disable it in the cluster."
return 1