Bug 511317 - Fence_scsi_test does not check to make sure the minimum node count is required..
Fence_scsi_test does not check to make sure the minimum node count is required..
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: cman (Show other bugs)
5.4
All Linux
low Severity medium
: rc
: ---
Assigned To: Christine Caulfield
Cluster QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-14 12:47 EDT by Toure Dunnon
Modified: 2009-07-14 13:19 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-07-14 13:19:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Toure Dunnon 2009-07-14 12:47:22 EDT
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 13:19:32 EDT
this need some rethinking....

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