Skip to content

Commit

Permalink
Change log level for get_all_addresses and get_any_address (#2850)
Browse files Browse the repository at this point in the history
Logging an exception for every missed address resolution has these issues:
* Even when there are no faults, users stumble on these and we receive spurious fault reports over slack. It makes for a bad first impression
* These non-critical errors act as a diversion from real faults for users attempting to debug on their own.
  • Loading branch information
yadudoc authored Aug 2, 2023
1 parent 4b8b0b8 commit 9783b79
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions parsl/addresses.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,15 @@ def get_all_addresses() -> Set[str]:
try:
s_addresses.add(address_by_interface(interface))
except Exception:
logger.exception("Ignoring failure to fetch address from interface {}".format(interface))
logger.info("Ignoring failure to fetch address from interface {}".format(interface))

resolution_functions: List[Callable[[], str]]
resolution_functions = [address_by_hostname, address_by_route, address_by_query]
for f in resolution_functions:
try:
s_addresses.add(f())
except Exception:
logger.exception("Ignoring an address finder exception")
logger.info("Ignoring an address finder exception")

return s_addresses

Expand All @@ -137,7 +137,7 @@ def get_any_address() -> str:
addr = address_by_interface(interface)
return addr
except Exception:
logger.exception("Ignoring failure to fetch address from interface {}".format(interface))
logger.info("Ignoring failure to fetch address from interface {}".format(interface))

resolution_functions: List[Callable[[], str]]
resolution_functions = [address_by_hostname, address_by_route, address_by_query]
Expand All @@ -146,7 +146,7 @@ def get_any_address() -> str:
addr = f()
return addr
except Exception:
logger.exception("Ignoring an address finder exception")
logger.info("Ignoring an address finder exception")

if addr == '':
raise Exception('Cannot find address of the local machine.')
Expand Down

0 comments on commit 9783b79

Please sign in to comment.