Put more useful messages in logging around discovery indicating failed discovery attempts

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11480 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2012-02-05 17:37:47 +00:00
parent e561211683
commit 416021e681
2 changed files with 12 additions and 1 deletions

View File

@ -525,6 +525,10 @@ sub refresh_switch {
}
unless ($session) { return; }
my $bridgetoifmap = walkoid($session,'.1.3.6.1.2.1.17.1.4.1.2',ciscowarn=>$iscisco); # Good for all switches
if (not ref $bridgetoifmap or !keys %{$bridgetoifmap}) {
xCAT::MsgUtils->message("S","Error communicating with ".$session->{DestHost}.": failed to get a valid response to BRIDGE-MIB request");
return;
}
# my $mactoindexmap = walkoid($session,'.1.3.6.1.2.1.17.4.3.1.2');
my $mactoindexmap = walkoid($session,'.1.3.6.1.2.1.17.7.1.2.2.1.2',silentfail=>1);
@ -532,6 +536,10 @@ sub refresh_switch {
#$mactoindexmap = walkoid($session,'.1.3.6.1.2.1.17.7.1.2.2.1.2');
$mactoindexmap = walkoid($session,'.1.3.6.1.2.1.17.4.3.1.2',ciscowarn=>$iscisco);
} #Ok, time to process the data
if (not ref $mactoindexmap or !keys %{$mactoindexmap}) {
xCAT::MsgUtils->message("S","Error communicating with ".$session->{DestHost}.": Unable to get MAC entries via either BRIDGE or Q-BRIDE MIB");
return;
}
foreach my $oid (keys %$namemap) {
#$oid =~ m/1.3.6.1.2.1.31.1.1.1.1.(.*)/;
my $ifindex = $oid;

View File

@ -520,6 +520,7 @@ sleep 0.05;
$req->{'_xcat_clientip'}=inet_ntoa($client);
$req->{'_xcat_clientport'}=$sport;
if (defined($cmd_handlers{"findme"}) and xCAT::Utils->nodeonmynet(inet_ntoa($client))) { #only discover from ips that appear to be on a managed network
xCAT::MsgUtils->message("S","xcatd: Processing discovery request from ".$req->{'_clientip'});
$req->{cacheonly}->[0] = 1;
plugin_command($req,undef,\&build_response);
if ($req->{cacheonly}->[0]) {
@ -532,7 +533,9 @@ sleep 0.05;
# }
}
}
} else {
xCAT::MsgUtils->message("S","xcatd: Skipping discovery from ".inet_ntoa($client)." because we either have no discovery plugins or the client address does not match an IP network that xCAT is managing");
}
}
if ($quit) { last; }
while ($select->can_read(0)) { #grab any incoming requests during run