Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commi…
Commit: 078934a262d5516c234b65c1b3912789f035ebaf
Parent: a16b8148834dde5925bbc20465ddb8de567a9928
Author: Ryan O'Hara <rohara(a)redhat.com>
AuthorDate: Tue Mar 1 11:46:56 2011 -0600
Committer: Ryan O'Hara <rohara(a)redhat.com>
CommitterDate: Tue Mar 1 15:00:44 2011 -0600
fence_scsi: create /var/run/cluster if necessary
Before writing to fence_scsi.key or fence_scsi.dev, check to see if
/var/run/cluster directory exists. If not, create it.
Signed-off-by: Ryan O'Hara <rohara(a)redhat.com>
---
fence/agents/scsi/fence_scsi.pl | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/fence/agents/scsi/fence_scsi.pl b/fence/agents/scsi/fence_scsi.pl
index e6f82e7..9df5c0c 100644
--- a/fence/agents/scsi/fence_scsi.pl
+++ b/fence/agents/scsi/fence_scsi.pl
@@ -2,6 +2,7 @@
use Cwd 'realpath';
use File::Basename;
+use File::Path;
use Getopt::Std;
use POSIX;
@@ -359,6 +360,10 @@ sub dev_write ($)
my $file = "/var/run/cluster/fence_scsi.dev";
my $dev = shift;
+ if (! -d "/var/run/cluster") {
+ mkpath ("/var/run/cluster");
+ }
+
open (\*FILE, ">>$file") or die "$!\n";
print FILE "$dev\n";
close (FILE);
@@ -385,6 +390,10 @@ sub key_write ($)
my $file = "/var/run/cluster/fence_scsi.key";
my $key = shift;
+ if (! -d "/var/run/cluster") {
+ mkpath ("/var/run/cluster");
+ }
+
open (\*FILE, ">$file") or die "$!\n";
print FILE "$key\n";
close (FILE);
Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commi…
Commit: a16b8148834dde5925bbc20465ddb8de567a9928
Parent: 4069885281354264fc27997c699291cb3245c6b0
Author: Ryan O'Hara <rohara(a)redhat.com>
AuthorDate: Tue Mar 1 09:50:01 2011 -0600
Committer: Ryan O'Hara <rohara(a)redhat.com>
CommitterDate: Tue Mar 1 15:00:30 2011 -0600
fence_scsi: write devices to tmp file on unfence
When unfencing occurs (action=on), write list of devices that were
successfully registered to /var/run/cluster/fence_scsi.dev file. This
file will be used by the optional watchdog script. Note that the devices
are not added to the tmp file until the verification step.
Signed-off-by: Ryan O'Hara <rohara(a)redhat.com>
---
fence/agents/scsi/fence_scsi.pl | 38 +++++++++++++++++++++++++++++++++++---
1 files changed, 35 insertions(+), 3 deletions(-)
diff --git a/fence/agents/scsi/fence_scsi.pl b/fence/agents/scsi/fence_scsi.pl
index 004b4ba..e6f82e7 100644
--- a/fence/agents/scsi/fence_scsi.pl
+++ b/fence/agents/scsi/fence_scsi.pl
@@ -40,6 +40,7 @@ sub do_action_on ($@)
my $self = (caller(0))[3];
my ($node_key, @devices) = @_;
+ dev_unlink ();
key_write ($node_key);
foreach $dev (@devices) {
@@ -126,6 +127,9 @@ sub do_verify_on ($@)
next;
}
+ ## write dev to device file once registration is verified
+ dev_write ($dev);
+
## check that a reservation exists
if (!get_reservation_key ($dev)) {
log_debug ("no reservation exists on device $dev");
@@ -337,12 +341,38 @@ sub do_reset (S)
return;
}
+sub dev_unlink ()
+{
+ my $self = (caller(0))[3];
+ my $file = "/var/run/cluster/fence_scsi.dev";
+
+ if (-e $file) {
+ unlink ($file) or die "$!\n";
+ }
+
+ return;
+}
+
+sub dev_write ($)
+{
+ my $self = (caller(0))[3];
+ my $file = "/var/run/cluster/fence_scsi.dev";
+ my $dev = shift;
+
+ open (\*FILE, ">>$file") or die "$!\n";
+ print FILE "$dev\n";
+ close (FILE);
+
+ return;
+}
+
sub key_read ()
{
my $self = (caller(0))[3];
+ my $file = "/var/run/cluster/fence_scsi.key";
my $key;
- open (\*FILE, "</var/run/cluster/fence_scsi.key") or die "$!\n";
+ open (\*FILE, "<$file") or die "$!\n";
chomp ($key = <FILE>);
close (FILE);
@@ -352,9 +382,11 @@ sub key_read ()
sub key_write ($)
{
my $self = (caller(0))[3];
+ my $file = "/var/run/cluster/fence_scsi.key";
+ my $key = shift;
- open (\*FILE, ">/var/run/cluster/fence_scsi.key") or die "$!\n";
- print FILE "$_[0]\n";
+ open (\*FILE, ">$file") or die "$!\n";
+ print FILE "$key\n";
close (FILE);
return;
Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commi…
Commit: 4069885281354264fc27997c699291cb3245c6b0
Parent: e6c003fa751eeb958642fcf4c14d088c820a57e4
Author: Ryan O'Hara <rohara(a)redhat.com>
AuthorDate: Tue Mar 1 09:35:02 2011 -0600
Committer: Ryan O'Hara <rohara(a)redhat.com>
CommitterDate: Tue Mar 1 15:00:21 2011 -0600
fence_scsi: move key file to /var/run/cluster
Since the contents of /var/run/cluster/ directory are cleared on each
reboot, move the fence_scsi.key file to that directory. This is useful
for watchdog checks as a means to avoid watchdog reboots when a node has
not yet unfenced or unfencing fails.
Signed-off-by: Ryan O'Hara <rohara(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 6f68203..004b4ba 100644
--- a/fence/agents/scsi/fence_scsi.pl
+++ b/fence/agents/scsi/fence_scsi.pl
@@ -342,7 +342,7 @@ sub key_read ()
my $self = (caller(0))[3];
my $key;
- open (\*FILE, "</var/lib/cluster/fence_scsi.key") or die "$!\n";
+ open (\*FILE, "</var/run/cluster/fence_scsi.key") or die "$!\n";
chomp ($key = <FILE>);
close (FILE);
@@ -353,7 +353,7 @@ sub key_write ($)
{
my $self = (caller(0))[3];
- open (\*FILE, ">/var/lib/cluster/fence_scsi.key") or die "$!\n";
+ open (\*FILE, ">/var/run/cluster/fence_scsi.key") or die "$!\n";
print FILE "$_[0]\n";
close (FILE);
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=5f…
Commit: 5ffb95ad7a8013fc37145146ee3b815f6fbe311a
Parent: c449755291a536bafa27006a66301c13adcafdf3
Author: Ryan O'Hara <rohara(a)redhat.com>
AuthorDate: Tue Mar 1 11:46:56 2011 -0600
Committer: Ryan O'Hara <rohara(a)redhat.com>
CommitterDate: Tue Mar 1 11:46:56 2011 -0600
fence_scsi: create /var/run/cluster if necessary
Before writing to fence_scsi.key or fence_scsi.dev, check to see if
/var/run/cluster directory exists. If not, create it.
Signed-off-by: Ryan O'Hara <rohara(a)redhat.com>
---
fence/agents/scsi/fence_scsi.pl | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/fence/agents/scsi/fence_scsi.pl b/fence/agents/scsi/fence_scsi.pl
index 56653fc..ba9770f 100644
--- a/fence/agents/scsi/fence_scsi.pl
+++ b/fence/agents/scsi/fence_scsi.pl
@@ -2,6 +2,7 @@
use Cwd 'realpath';
use File::Basename;
+use File::Path;
use Getopt::Std;
use POSIX;
@@ -359,6 +360,10 @@ sub dev_write ($)
my $file = "/var/run/cluster/fence_scsi.dev";
my $dev = shift;
+ if (! -d "/var/run/cluster") {
+ mkpath ("/var/run/cluster");
+ }
+
open (\*FILE, ">>$file") or die "$!\n";
print FILE "$dev\n";
close (FILE);
@@ -385,6 +390,10 @@ sub key_write ($)
my $file = "/var/run/cluster/fence_scsi.key";
my $key = shift;
+ if (! -d "/var/run/cluster") {
+ mkpath ("/var/run/cluster");
+ }
+
open (\*FILE, ">$file") or die "$!\n";
print FILE "$key\n";
close (FILE);
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=c4…
Commit: c449755291a536bafa27006a66301c13adcafdf3
Parent: b62e49d1c476a6875e689e7d0a7b3fa44135ecb6
Author: Ryan O'Hara <rohara(a)redhat.com>
AuthorDate: Tue Mar 1 09:50:01 2011 -0600
Committer: Ryan O'Hara <rohara(a)redhat.com>
CommitterDate: Tue Mar 1 09:50:01 2011 -0600
fence_scsi: write devices to tmp file on unfence
When unfencing occurs (action=on), write list of devices that were
successfully registered to /var/run/cluster/fence_scsi.dev file. This
file will be used by the optional watchdog script. Note that the devices
are not added to the tmp file until the verification step.
Signed-off-by: Ryan O'Hara <rohara(a)redhat.com>
---
fence/agents/scsi/fence_scsi.pl | 38 +++++++++++++++++++++++++++++++++++---
1 files changed, 35 insertions(+), 3 deletions(-)
diff --git a/fence/agents/scsi/fence_scsi.pl b/fence/agents/scsi/fence_scsi.pl
index e162dfe..56653fc 100644
--- a/fence/agents/scsi/fence_scsi.pl
+++ b/fence/agents/scsi/fence_scsi.pl
@@ -40,6 +40,7 @@ sub do_action_on ($@)
my $self = (caller(0))[3];
my ($node_key, @devices) = @_;
+ dev_unlink ();
key_write ($node_key);
foreach $dev (@devices) {
@@ -126,6 +127,9 @@ sub do_verify_on ($@)
next;
}
+ ## write dev to device file once registration is verified
+ dev_write ($dev);
+
## check that a reservation exists
if (!get_reservation_key ($dev)) {
log_debug ("no reservation exists on device $dev");
@@ -337,12 +341,38 @@ sub do_reset (S)
return;
}
+sub dev_unlink ()
+{
+ my $self = (caller(0))[3];
+ my $file = "/var/run/cluster/fence_scsi.dev";
+
+ if (-e $file) {
+ unlink ($file) or die "$!\n";
+ }
+
+ return;
+}
+
+sub dev_write ($)
+{
+ my $self = (caller(0))[3];
+ my $file = "/var/run/cluster/fence_scsi.dev";
+ my $dev = shift;
+
+ open (\*FILE, ">>$file") or die "$!\n";
+ print FILE "$dev\n";
+ close (FILE);
+
+ return;
+}
+
sub key_read ()
{
my $self = (caller(0))[3];
+ my $file = "/var/run/cluster/fence_scsi.key";
my $key;
- open (\*FILE, "</var/run/cluster/fence_scsi.key") or die "$!\n";
+ open (\*FILE, "<$file") or die "$!\n";
chomp ($key = <FILE>);
close (FILE);
@@ -352,9 +382,11 @@ sub key_read ()
sub key_write ($)
{
my $self = (caller(0))[3];
+ my $file = "/var/run/cluster/fence_scsi.key";
+ my $key = shift;
- open (\*FILE, ">/var/run/cluster/fence_scsi.key") or die "$!\n";
- print FILE "$_[0]\n";
+ open (\*FILE, ">$file") or die "$!\n";
+ print FILE "$key\n";
close (FILE);
return;
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=b6…
Commit: b62e49d1c476a6875e689e7d0a7b3fa44135ecb6
Parent: 678661a05b1c5bb1ab81515ea97e3102d9e3f18c
Author: Ryan O'Hara <rohara(a)redhat.com>
AuthorDate: Tue Mar 1 09:35:02 2011 -0600
Committer: Ryan O'Hara <rohara(a)redhat.com>
CommitterDate: Tue Mar 1 09:35:02 2011 -0600
fence_scsi: move key file to /var/run/cluster
Since the contents of /var/run/cluster/ directory are cleared on each
reboot, move the fence_scsi.key file to that directory. This is useful
for watchdog checks as a means to avoid watchdog reboots when a node has
not yet unfenced or unfencing fails.
Signed-off-by: Ryan O'Hara <rohara(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 ae658ab..e162dfe 100644
--- a/fence/agents/scsi/fence_scsi.pl
+++ b/fence/agents/scsi/fence_scsi.pl
@@ -342,7 +342,7 @@ sub key_read ()
my $self = (caller(0))[3];
my $key;
- open (\*FILE, "</var/lib/cluster/fence_scsi.key") or die "$!\n";
+ open (\*FILE, "</var/run/cluster/fence_scsi.key") or die "$!\n";
chomp ($key = <FILE>);
close (FILE);
@@ -353,7 +353,7 @@ sub key_write ($)
{
my $self = (caller(0))[3];
- open (\*FILE, ">/var/lib/cluster/fence_scsi.key") or die "$!\n";
+ open (\*FILE, ">/var/run/cluster/fence_scsi.key") or die "$!\n";
print FILE "$_[0]\n";
close (FILE);
Gitweb: http://git.fedorahosted.org/git/resource-agents.git?p=resource-agents.git;a…
Commit: 11298c25c6c81cd73d2d1f0e63e9acb90b44cafa
Parent: 0000000000000000000000000000000000000000
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: 2011-03-01 14:37 +0000
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: 2011-03-01 14:37 +0000
annotated tag: v3.1.1 has been created
at 11298c25c6c81cd73d2d1f0e63e9acb90b44cafa (tag)
tagging 49ef8ffe48a2fc6a7e4c132bab87b11a76dd8f9e (commit)
replaces v3.1.0
v3.1.1 release
Fabio M. Di Nitto (1):
fs-lib: fix do_monitor device mapping
Lon Hohberger (3):
resource-agents: Fix migrateuriopt setting
resource-agents: Improve LD_LIBRARY_PATH handling by SAP*
resource-agents: Use literal quotes for tr calls
Marek 'marx' Grac (3):
resource-agents: Add option disable_rdisc to ip.sh
resource-agents: Apache resource with spaces in name fails to start
resource-agents: Remove netmask from IP address when creating list of them