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: enable loopback device in network isolation #477

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

tiran
Copy link
Collaborator

@tiran tiran commented Oct 15, 2024

Some software like OpenMPI's mpicc do not work correctly without a loopback device. Replace the unshare call with a wrapper script that combines unshare -rn and ip link set lo up before exec-ing the final command.

unshare is a util-linux-core command and therefore available pretty much in all Linux distributions.

@mergify mergify bot added the ci label Oct 15, 2024
@tiran tiran force-pushed the run-network-isolation branch from 735831a to 938e4f9 Compare October 15, 2024 06:03
Some software like OpenMPI's `mpicc` do not work correctly without a
loopback device. Replace the `unshare` call with a wrapper script that
combines `unshare -rn` and `ip link set lo up` before `exec`-ing the
final command.

`unshare` is a `util-linux-core` command and therefore available pretty
much in all Linux distributions.

Signed-off-by: Christian Heimes <cheimes@redhat.com>
@tiran tiran force-pushed the run-network-isolation branch from 938e4f9 to 0ab9db0 Compare October 15, 2024 06:15
Copy link
Member

@dhellmann dhellmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this approach. It's much easier to document the environment in which an individual wheel build runs, and leaves the possibility that we make it user-configurable in the future.

@mergify mergify bot merged commit 80b8563 into python-wheel-build:main Oct 15, 2024
71 checks passed
@shubhbapna shubhbapna linked an issue Oct 15, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use bubblewrap (bwrap) instead of unshare for network isolation
2 participants