Bug 511317 - Fence_scsi_test does not check to make sure the minimum node count is required..
Summary: Fence_scsi_test does not check to make sure the minimum node count is required..
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: cman
Version: 5.4
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Christine Caulfield
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-07-14 16:47 UTC by Toure Dunnon
Modified: 2009-07-14 17:19 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-07-14 17:19:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
fence scsi minimum node check (961 bytes, patch)
2009-07-14 16:47 UTC, Toure Dunnon
no flags Details | Diff

Description Toure Dunnon 2009-07-14 16:47:22 UTC
Created attachment 351634 [details]
fence scsi minimum node check

Description of problem:
fence_scsi does not check for a minimum node count, which in turn customers
will configure two node clusters with a fence_scsi agent. The attached proposed
patch does just that. I will parse the /proc/cluster/status file for node count and if it is less than or equal to two, it will exit out.

Version-Release number of selected component (if applicable):
RHEL4 and RHEL5

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

--- /sbin/fence_scsi_test	2009-04-22 13:38:58.000000000 -0400
+++ fence_scsi_test.new	2009-07-14 16:40:30.000000000 -0400
@@ -14,6 +14,21 @@ $REDHAT_COPYRIGHT=("Copyright (C) Red Ha
 $BUILD_DATE="(built Wed Apr 22 13:38:56 EDT 2009)";
 #END_VERSION_GENERATION
 
+sub node_check
+{
+# This will check the number of nodes and restrict the completion
+# of setup if the requirement is not meet.
+# (nodes >= 3)
+    open(FH, "/proc/cluster/status") or die "can't open status file: $!\n";
+
+    while(<FH>){
+         my @pars = split(":");
+         print "The minimum node count does not meet the requirement (3+nodes).\n" if ($pars[0] eq "Nodes" && $pars[1] <= 2);
+     }
+    close(FH);
+    exit 0;
+}
+
 sub get_scsi_block_devices
 {
     my $block_dir = "/sys/block";
@@ -189,6 +204,8 @@ sub print_usage
 
 ### MAIN #######################################################################
 
+node_check;
+
 if (getopts("cdhst:v") == 0)
 {
     print_usage;

Comment 1 Toure Dunnon 2009-07-14 17:19:32 UTC
this need some rethinking....


Note You need to log in before you can comment on or make changes to this bug.