Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Failing to restart nddpd caused the exception to escalate #584

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/aleph/vm/network/ndp_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from dataclasses import dataclass
from ipaddress import IPv6Network
from pathlib import Path
from subprocess import CalledProcessError

from aleph.vm.utils import run_in_subprocess

Expand All @@ -33,7 +34,11 @@
@staticmethod
async def _restart_ndppd():
logger.debug("Restarting ndppd")
await run_in_subprocess(["systemctl", "restart", "ndppd"])
try:
await run_in_subprocess(["systemctl", "restart", "ndppd"])
except CalledProcessError as error:
logger.error("Failed to restart ndppd: %s", error)

Check warning on line 40 in src/aleph/vm/network/ndp_proxy.py

View check run for this annotation

Codecov / codecov/patch

src/aleph/vm/network/ndp_proxy.py#L37-L40

Added lines #L37 - L40 were not covered by tests
# We do not raise the error here, since this should not crash the entire system

async def _update_ndppd_conf(self):
config = f"proxy {self.host_network_interface} {{\n"
Expand Down
Loading