Rework some output, also avoid thrashing on redundant responses. Prefer fe80 addresses when proven feasible since those are guaranteed to be unique and some ipv4 responses might not be
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12921 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
83688cdfa3
commit
cfea72f1ef
@ -67,7 +67,10 @@ sub handle_new_slp_entity {
|
||||
if ($data->{SrvType} eq "service:management-hardware.IBM:integrated-management-module2" and $data->{attributes}->{"enclosure-form-factor"}->[0] eq "BC2") {
|
||||
$data->{macaddress}=$mac;
|
||||
#this is a Flex ITE, don't go mac searching for it, but remember the chassis UUID for later
|
||||
push @{$flexchassismap{$data->{attributes}->{"chassis-uuid"}->[0]}},$data;
|
||||
if ($flexchassismap{$data->{attributes}->{"chassis-uuid"}->[0]}->{$mac} and $data->{peername} !~ /fe80/) {
|
||||
return;
|
||||
}
|
||||
$flexchassismap{$data->{attributes}->{"chassis-uuid"}->[0]}->{$mac}=$data;
|
||||
return;
|
||||
}
|
||||
unless ($mac) { return; }
|
||||
@ -179,7 +182,7 @@ sub setupIMM {
|
||||
if ($newaddr) {
|
||||
@ips = xCAT::NetworkUtils::getipaddr($newaddr,GetAllAddresses=>1);
|
||||
}
|
||||
sendmsg(":Configuration of ".$node." commencing, configuration may take a few minutes to take effect",$callback);
|
||||
sendmsg(":Configuration commencing, configuration may take a few minutes to take effect",$callback,$node);
|
||||
my $child = fork();
|
||||
if ($child) { return; }
|
||||
unless (defined $child) { die "error spawining process" }
|
||||
@ -216,7 +219,7 @@ sub configure_hosted_elements {
|
||||
my $slot;
|
||||
my $user = $passwordmap{$cmm}->{username};
|
||||
my $pass = $passwordmap{$cmm}->{password};
|
||||
foreach $immdata (@{$flexchassismap{$uuid}}) {
|
||||
foreach $immdata (values %{$flexchassismap{$uuid}}) {
|
||||
$slot=$immdata->{attributes}->{slot}->[0];
|
||||
if ($node = $nodebymp{$cmm}->{$slot}) {
|
||||
my $addr = $immdata->{peername}; #todo, use sockaddr and remove the 427 port from it instead?
|
||||
@ -226,7 +229,10 @@ sub configure_hosted_elements {
|
||||
if ($doneaddrs{$node}) { next; }
|
||||
$doneaddrs{$node}=1;
|
||||
setupIMM($node,slpdata=>$immdata,curraddr=>$addr,username=>$user,password=>$pass);
|
||||
} else {
|
||||
sendmsg(": Ignoring target in bay $slot, no node found with mp.mpa/mp.id matching",$callback,$cmm);
|
||||
}
|
||||
|
||||
}
|
||||
while (wait() > 0) {}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user