From 2e4ad2d4426dd0724bdb63c1a83ca37be9f92141 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 21 Jan 2009 20:52:09 +0000 Subject: [PATCH] -Fix problem where snmp destinations could not be set once the SNMP was up and running on AMM git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2634 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/blade.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/blade.pm b/xCAT-server/lib/xcat/plugins/blade.pm index 751ed3174..68490f446 100644 --- a/xCAT-server/lib/xcat/plugins/blade.pm +++ b/xCAT-server/lib/xcat/plugins/blade.pm @@ -531,8 +531,17 @@ sub mpaconfig { } my $dstindex = $1; if ($assignment) { + my $restorev1agent = 0; + if (($session->get(['1.3.6.1.4.1.2.3.51.2.4.9.3.1.5',0])) == 1) { #per the BLADE MIB, this *must* be zero in order to change SNMP IPs + $restorev1agent=1; + setoid('1.3.6.1.4.1.2.3.51.2.4.9.3.1.5',0,0,'INTEGER'); + } setoid("1.3.6.1.4.1.2.3.51.2.4.9.3.1.4.1.1.".(2+$dstindex).".1",1,$value,'OCTET'); setoid("1.3.6.1.4.1.2.3.51.2.4.9.3.1.4.1.1.6.1",1,1,'INTEGER'); #access type: read-traps, don't give full write access to the community + if (restorev1agent) { #If we had to transiently disable the v1 agent, put it back the way it was + setoid('1.3.6.1.4.1.2.3.51.2.4.9.3.1.5',0,1,'INTEGER'); + } + } my $data = $session->get(["1.3.6.1.4.1.2.3.51.2.4.9.3.1.4.1.1.".(2+$dstindex).".1.1"]); push @cfgtext,"SP SNMP Destination $1: $data";