Hi, this is a patch to allow fence_ibmblade to use udp port other than standard snmp (udp/161). Main reason for this is that IBM BladeCenter MM supports only 3 hosts and not hostgroups per community, and only 3 communities, which puts a limit to maximum of 9 nodes in a cluster. This is somewhat inconvinient, so, as a workaround, one can install a udp forwarder on some node(s) (preferably outside cluster) and use only its address in IBM BladeMM configuration. Port Forwarder will probably have to use some other port that standard snmp, not to block snmp access of "relay" node, so that's what this patch is all about. -- Lazar Obradovic, System Engineer ----- laza@xxxxxx YUnet International http://www.EUnet.yu Dubrovacka 35/III, 11000 Belgrade Tel: +381 11 3119901; Fax: +381 11 3119901 ----- This e-mail is confidential and intended only for the recipient. Unauthorized distribution, modification or disclosure of its contents is prohibited. If you have received this e-mail in error, please notify the sender by telephone +381 11 3119901. -----
--- cluster-20040831/fence/agents/ibmblade/fence_ibmblade.pl 2004-09-01 23:35:52.000000000 +0200 +++ cluster/fence/agents/ibmblade/fence_ibmblade.pl 2004-09-09 19:06:08.000000000 +0200 @@ -24,6 +24,7 @@ my $sleep_time = 5; my $snmp_timeout = 10; $opt_o = "reboot"; +$opt_u = 161; my $oid_powerState = ".1.3.6.1.4.1.2.3.51.2.22.1.5.1.1.4"; # remoteControlBladePowerState my $oid_powerChange = ".1.3.6.1.4.1.2.3.51.2.22.1.6.1.1.7"; # powerOnOffBlade @@ -50,6 +51,7 @@ print " -c <community> SNMP Community\n"; print " -n <num> Port number to disable\n"; print " -o <string> Action: Reboot (default), On or Off\n"; + print " -u <udpport> UDP port to use (default: 161)\n"; print " -q quiet mode\n"; print " -t test power state\n"; print " -V version\n"; @@ -128,7 +130,11 @@ elsif ($name eq "port" ) { $opt_n = $val; - } + } + elsif ($name eq "udpport" ) + { + $opt_u = $val; + } # FIXME should we do more error checking? # Excess name/vals will be eaten for now @@ -142,7 +148,7 @@ # ---------------------------- MAIN -------------------------------- if (@ARGV > 0) { - getopts("a:hc:n:o:qtV") || fail_usage ; + getopts("a:hc:n:o:qu:tV") || fail_usage ; usage if defined $opt_h; version if defined $opt_V; @@ -168,6 +174,7 @@ my ($snmpsess, $error) = Net::SNMP->session ( -hostname => $opt_a, -version => "snmpv1", + -port => $opt_u, -community => $opt_c, -timeout => $snmp_timeout);