cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH] fence_scsi_test: add option for strict verification
@ 2012-04-09 14:37 Ryan O'Hara
  2012-04-09 17:18 ` Lon Hohberger
  0 siblings, 1 reply; 2+ messages in thread
From: Ryan O'Hara @ 2012-04-09 14:37 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Add new option --strict (-s) that will enable strict verification that
registrations are created on all paths. Previously this was the
default behavior. Strict verification will compare the number of times
the registration key exists on a device and the number of paths. This
is useful when testing multipath configurations. If this option is not
specified, the verification will simply check to make sure the
registration keys exist on the device.

Resolves: rhbz#782919

Signed-off-by: Ryan O'Hara <rohara@redhat.com>
---
  fence/agents/scsi/fence_scsi_test.pl |    6 +++++-
  fence/man/fence_scsi_test.8          |    8 ++++++++
  2 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/fence/agents/scsi/fence_scsi_test.pl 
b/fence/agents/scsi/fence_scsi_test.pl
index 5c2302c..4463ddf 100755
--- a/fence/agents/scsi/fence_scsi_test.pl
+++ b/fence/agents/scsi/fence_scsi_test.pl
@@ -101,7 +101,9 @@ sub do_verify_on (\@$$)
       @keys = grep { /^$node_key$/ } get_keys_register ($dev);
  -    if (scalar (@keys) != scalar (@devices)) {
+    if (scalar (@keys) == 0) {
+	$err++;
+    } elsif (defined $options{'s'} && (scalar (@keys) != scalar 
(@devices))) {
  	$err++;
      }
  @@ -322,6 +324,7 @@ sub get_options ()
  		"h|help",
  		"k|key=s",
  		"o|action=s",
+		"s|strict",
  		"t|test=s",
  		"v|verbose");
  @@ -608,6 +611,7 @@ sub print_usage
      print "\n";
      print "  -k, --key=VALUE       Key to use with current action.\n";
      print "  -d, --devices=LIST    Devices used for the current 
action.\n";
+    print "  -s, --strict          Perform strict verification.\n";
      print "  -h, --help            Display this help and exit.\n";
      print "  -v, --verbose         Verbose mode.\n";
      print "\n";
diff --git a/fence/man/fence_scsi_test.8 b/fence/man/fence_scsi_test.8
index 57c3713..596bc2d 100644
--- a/fence/man/fence_scsi_test.8
+++ b/fence/man/fence_scsi_test.8
@@ -77,6 +77,14 @@ specified, fence_scsi_test will automatically use all 
devices found in
  cluster volumes.
   .TP
+\fB-s, --strict\fR
+Perform strict verification that registrations exist on all
+paths. This option is recommended when testing multipath
+configurations. When specified, fence_scsi_test will compare the
+number of paths to the number of times the registration key exists on
+the I_T nexus. This option only is only used with the "on" action.
+
+.TP
  \fB-h, --help\fR
  Print out a help message describing available options, then exit.
  -- 1.7.1

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Attached Message Part
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20120409/b1363501/attachment.ksh>

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Cluster-devel] [PATCH] fence_scsi_test: add option for strict verification
  2012-04-09 14:37 [Cluster-devel] [PATCH] fence_scsi_test: add option for strict verification Ryan O'Hara
@ 2012-04-09 17:18 ` Lon Hohberger
  0 siblings, 0 replies; 2+ messages in thread
From: Lon Hohberger @ 2012-04-09 17:18 UTC (permalink / raw)
  To: cluster-devel.redhat.com

On 04/09/2012 10:37 AM, Ryan O'Hara wrote:
> Add new option --strict (-s) that will enable strict verification that
> registrations are created on all paths. Previously this was the
> default behavior. Strict verification will compare the number of times
> the registration key exists on a device and the number of paths. This
> is useful when testing multipath configurations. If this option is not
> specified, the verification will simply check to make sure the
> registration keys exist on the device.
>
> Resolves: rhbz#782919

Reviewed-by: Lon Hohberger <lhh@redhat.com>

-- Lon



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-09 17:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-09 14:37 [Cluster-devel] [PATCH] fence_scsi_test: add option for strict verification Ryan O'Hara
2012-04-09 17:18 ` Lon Hohberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).