From 9828ea58989d02073e48684b492ebfb67856a2e8 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 14 Sep 2020 11:02:00 -0400 Subject: [PATCH] Fix chained smm discovery on cumulus --- confluent_server/confluent/discovery/core.py | 10 +++++++--- confluent_server/confluent/networking/lldp.py | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/confluent_server/confluent/discovery/core.py b/confluent_server/confluent/discovery/core.py index b136ca85..9d436427 100644 --- a/confluent_server/confluent/discovery/core.py +++ b/confluent_server/confluent/discovery/core.py @@ -1020,9 +1020,13 @@ def eval_node(cfg, handler, info, nodename, manual=False): if nl: # The candidate nodename is the head of a chain, we must # validate the smm certificate by the switch - macmap.get_node_fingerprints(nodename, cfg) - util.cert_matches(fprint, handler.https_cert) - return + fprints = macmap.get_node_fingerprints(nodename, cfg) + for fprint in fprints: + if util.cert_matches(fprint[0], handler.https_cert): + if not discover_node(cfg, handler, info, + nodename, manual): + pending_nodes[nodename] = info + return if (info.get('maccount', False) and not handler.discoverable_by_switch(info['maccount'])): errorstr = 'The detected node {0} was detected using switch, ' \ diff --git a/confluent_server/confluent/networking/lldp.py b/confluent_server/confluent/networking/lldp.py index 8211aee7..dc1b3e32 100644 --- a/confluent_server/confluent/networking/lldp.py +++ b/confluent_server/confluent/networking/lldp.py @@ -199,6 +199,7 @@ def _extract_neighbor_data_affluent(switch, user, password, cfm, lldpdata): 'port': record['localport'], 'peerid': peerid, } + _extract_extended_desc(portdata, portdata['peerdescription'], True) _neighbypeerid[peerid] = portdata lldpdata[localport] = portdata neighdata[switch] = lldpdata