Skip to content

Commit

Permalink
Debug Error Unknown exception while deleting address
Browse files Browse the repository at this point in the history
Add more debug info to help investigate the error
Jira: ALEPH-115

This convert the logging.error to a logging.exception
Which mean the traceback will be included in Sentry as well as more debug information
  • Loading branch information
olethanh authored and hoh committed Sep 20, 2024
1 parent 8cf10e4 commit c8ded1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/aleph/vm/network/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ def delete_ip_address(ipr: IPRoute, device_name: str, ip: IPv4Interface | IPv6In
try:
ipr.addr("del", index=interface_index[0], address=str(ip.ip), mask=ip.network.prefixlen)
except NetlinkError as e:
logger.error(f"Unknown exception while deleting address {ip} to interface {device_name}: {e}")
logger.exception(f"Unknown exception while deleting address {ip} to interface {device_name}: {e}")
except OSError as e:
logger.error(f"Unknown exception while deleting address {ip} to interface {device_name}: {e}")
logger.exception(f"Unknown exception while deleting address {ip} to interface {device_name}: {e}")


def set_link_up(ipr: IPRoute, device_name: str):
Expand Down

0 comments on commit c8ded1b

Please sign in to comment.