flush cache in bp_index

netdisco/netdisco#496 has more background on the issue.

somewhere incorrect data is returned for bp_index mappings when running macsuck, but i cannot reproduce this when using snmp::info directly.

forcing i_index to reload works around the issue, performance impact is minimal.
This commit is contained in:
nick n
2019-04-14 21:10:26 +02:00
committed by GitHub
parent f0b429039e
commit e08d22d51c

View File

@@ -221,7 +221,10 @@ sub bp_index {
my $aerohive = shift;
my $partial = shift;
my $i_index = $aerohive->i_index($partial) || {};
# somewhere caching is doing something strange, without load_
# netdisco can't find bp_index mappings & will not registerer
# any clients. netdisco/netdisco#496
my $i_index = $aerohive->load_i_index($partial) || {};
my %bp_index;
foreach my $iid ( keys %$i_index ) {