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";