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

[RFC] Linux Network Devices #4538

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

aojea
Copy link

@aojea aojea commented Nov 21, 2024

Draft implementation of opencontainers/runtime-spec#1271

It implements the new proposal to the OCI spec to be able to specify Network Devices that get attached/dettached from the containers

[[ "$output" == *"2001:db8::2/64"* ]]

ip netns del "$ns_name"
ip link del dev dummy1
Copy link
Author

Choose a reason for hiding this comment

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

this guarantees the interface is brought back to the root namespcae, otherwise this command will fail

@aojea aojea force-pushed the netdevices branch 2 times, most recently from 07d3b0b to 3833056 Compare December 2, 2024 15:40
Copy link

@kad kad left a comment

Choose a reason for hiding this comment

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

LGTM. We are also interested in this use case for our accelerator devices.

libcontainer/network_linux.go Outdated Show resolved Hide resolved
tests/integration/netdev.bats Outdated Show resolved Hide resolved
@aojea aojea force-pushed the netdevices branch 2 times, most recently from 67f12e0 to d114afe Compare December 12, 2024 07:15
libcontainer/network_linux.go Outdated Show resolved Hide resolved
Vendor the OCI spec with the Network Devices support

Signed-off-by: Antonio Ojea <[email protected]>
Implement support for passing Linux Network Devices to the container
network namespace.

The network device is passed during the creation of the container,
before the process is started.

It implements the logic defined in the OCI runtime specification.

Change-Id: I1306a783b84ead7b03eea679941bd4db9dc1e353
Signed-off-by: Antonio Ojea <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants