Commit 061196b7 authored by Andrey Vertiprahov's avatar Andrey Vertiprahov
Browse files

Catch portmapper exception on NRI discovery.

parent bd30a950
Pipeline #23071 passed with stages
in 19 minutes and 25 seconds
......@@ -55,7 +55,13 @@ class NRIPortmapperCheck(DiscoveryCheck):
{"managed_object": self.object.id, "type": "physical"},
{"_id": 1, "name": 1, "nri_name": 1},
):
nri_name = portmapper.to_remote(d["name"], iface_hints=ifaces_hints)
try:
nri_name = portmapper.to_remote(d["name"], iface_hints=ifaces_hints)
except Exception as e:
self.logger.error(
"[%s] Unhandled exception on portmapper handler '%s'. Skipping checks.", nri, e
)
break
self.logger.debug("[%s] Port mapping %s <-> %s", nri, d["name"], nri_name)
if not nri_name:
self.logger.info("[%s] Cannot map port name '%s'", nri, d["name"])
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment