[Linux-cluster] SNMP modules?

Adam Manthei amanthei at redhat.com
Tue Aug 24 16:15:45 UTC 2004


On Mon, Jul 26, 2004 at 07:08:35PM +0200, Lazar Obradovic wrote:
> Hello all, 
> 
> I'd like to develop my own fencing agents (for IBM BladeCenter and
> QLogic SANBox2 switches), but they will require SNMP bindings.
> 
> Is that ok with general development philosophy, since I'd like to
> contribude them? net-snmp-5.x.x-based API? 

I've added these to the repository.  I also made the following adjustment:

 o removed the deprecated "fm" and "name" stdin parameters that were residue
   of the old GFS-5.1.x fencing system

 o changed a couple errors to warnings.  If a powered off the blade, the
   fencing agent would detect that it was powered off and fail.  If it knows
   that the blade is off, it should still succeed.

Patch is attached (but already checked into CVS)
-- 
Adam Manthei  <amanthei at redhat.com>
-------------- next part --------------
diff -urNp ibmblade/fence_ibmblade.pl ibmblade.mantis/fence_ibmblade.pl
--- ibmblade/fence_ibmblade.pl	2004-08-24 11:09:55.680240183 -0500
+++ ibmblade.mantis/fence_ibmblade.pl	2004-08-24 10:58:57.558573326 -0500
@@ -112,13 +112,6 @@ sub get_options_stdin
         # DO NOTHING -- this field is used by fenced
 	elsif ($name eq "agent" ) { } 
 
-	# FIXME -- depricated.  use "port" instead.
-        elsif ($name eq "fm" ) 
-	{
-            (my $dummy,$opt_n) = split /\s+/,$val;
-	    print STDERR "Depricated \"fm\" entry detected.  refer to man page.\n";
-	}
-
         elsif ($name eq "ipaddr" ) 
 	{
             $opt_a = $val;
@@ -127,8 +120,6 @@ sub get_options_stdin
 	{
             $opt_c = $val;
         } 
-	# FIXME -- depreicated residue of old fencing system
-	elsif ($name eq "name" ) { } 
 
         elsif ($name eq "option" )
         {
@@ -204,15 +195,15 @@ if (defined ($opt_t)) { 
 
 if ($opt_o =~ /^(reboot|off)$/i) { 
 	if ($result->{$oid} == "0") { 
-		printf ("$FENCE_RELEASE_NAME ERROR: Port %d on %s already down.\n", $opt_n, $opt_a); 
+		printf ("$FENCE_RELEASE_NAME WARNING: Port %d on %s already down.\n", $opt_n, $opt_a); 
 		$snmpsess->close; 
-		exit 1; 
+		exit 0; 
 	}; 
 } else { 
 	if ($result->{$oid} == "1") { 
-		printf ("$FENCE_RELEASE_NAME ERROR: Port %d on %s already up.\n", $opt_n, $opt_a); 
+		printf ("$FENCE_RELEASE_NAME WARNING: Port %d on %s already up.\n", $opt_n, $opt_a); 
 		$snmpsess->close; 
-		exit 1; 
+		exit 0; 
 	};
 };
 


More information about the Linux-cluster mailing list