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: Interface being busy prevented instance creation #579

Merged
merged 1 commit into from
Mar 19, 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
6 changes: 2 additions & 4 deletions src/aleph/vm/network/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,12 @@
if error.code == 17:
logger.warning(f"Interface {device_name} already exists")
elif error.code == 16:
raise InterfaceBusyError(
f"Interface {device_name} is busy - is there another process using it ?"
) from error
logger.warning(f"Interface {device_name} is busy - is there another process using it ?")

Check warning on line 37 in src/aleph/vm/network/interfaces.py

View check run for this annotation

Codecov / codecov/patch

src/aleph/vm/network/interfaces.py#L37

Added line #L37 was not covered by tests
else:
raise
except OSError as error:
if error.errno == errno.EBUSY:
raise InterfaceBusyError(f"Interface {device_name} is busy. Is another process using it ?") from error
logger.warning(f"Interface {device_name} is busy - is there another process using it ?")

Check warning on line 42 in src/aleph/vm/network/interfaces.py

View check run for this annotation

Codecov / codecov/patch

src/aleph/vm/network/interfaces.py#L42

Added line #L42 was not covered by tests


def add_ip_address(ipr: IPRoute, device_name: str, ip: Union[IPv4Interface, IPv6Interface]):
Expand Down
Loading