-
Notifications
You must be signed in to change notification settings - Fork 586
Define Linux Network Devices #1271
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
Conversation
/assign @samuelkarp |
https://github.com/opencontainers/runtime-spec/blob/main/features.md should be updated too |
51e5104
to
3a666eb
Compare
updated and addressed the comments |
AI @aojea (document the cleanup and destroy of the network interfaces) |
From the in-person discussion today:
|
config-linux.md
Outdated
|
||
This schema focuses solely on moving existing network devices identified by name into the container namespace. It does not cover the complexities of network device creation or network configuration, such as IP address assignment, routing, and DNS setup. | ||
|
||
**`netDevices`** (object, OPTIONAL) set of network devices that MUST be available in the container. The runtime is responsible for providing these devices; the underlying mechanism is implementation-defined. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This spec said "MUST" but, I think it can't do it in the rootless container because the rootless container doesn't have CAP_NET_ADMIN, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we should take care of the rootless container.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be an error in the case of a rootless container, if the runtime is not able to satisfy the MUST condition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be an error in the case of a rootless container, if the runtime is not able to satisfy the MUST condition.
+1 but It'd be better to clarify it in the spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added mor explanations about runtime and network devices lifecycle and runtime checks, PTAL
Pushed a new commit addressing those comments, the changelog is
|
@AkihiroSuda @rata This PR has already got 6 approvals. I think it's ready for merging. Can we merge it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@utam0k Let's merge :) |
opencontainers/runtime-spec#1271 added support for moving existing network devices to the container network namespace. Closes: containers#1712 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
opencontainers/runtime-spec#1271 added support for moving existing network devices to the container network namespace. Closes: containers#1712 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
opencontainers/runtime-spec#1271 added support for moving existing network devices to the container network namespace. Closes: containers#1712 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
opencontainers/runtime-spec#1271 added support for moving existing network devices to the container network namespace. Closes: containers#1712 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
opencontainers/runtime-spec#1271 added support for moving existing network devices to the container network namespace. Closes: containers#1712 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
opencontainers/runtime-spec#1271 added support for moving existing network devices to the container network namespace. Closes: containers#1712 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
opencontainers/runtime-spec#1271 added support for moving existing network devices to the container network namespace. Closes: containers#1712 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
opencontainers/runtime-spec#1271 added support for moving existing network devices to the container network namespace. Closes: containers#1712 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
opencontainers/runtime-spec#1271 added support for moving existing network devices to the container network namespace. Closes: containers#1712 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
opencontainers/runtime-spec#1271 added support for moving existing network devices to the container network namespace. Closes: containers#1712 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
opencontainers/runtime-spec#1271 added support for moving existing network devices to the container network namespace. Closes: containers#1712 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
opencontainers/runtime-spec#1271 added support for moving existing network devices to the container network namespace. Closes: containers#1712 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
opencontainers/runtime-spec#1271 added support for moving existing network devices to the container network namespace. Closes: containers#1712 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
opencontainers/runtime-spec#1271 added support for moving existing network devices to the container network namespace. Closes: containers#1712 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
opencontainers/runtime-spec#1271 added support for moving existing network devices to the container network namespace. Closes: containers#1712 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
opencontainers/runtime-spec#1271 added support for moving existing network devices to the container network namespace. Closes: containers#1712 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
The proposed "netdevices" field provides a declarative way to specify which host network devices should be moved into a container's network namespace.
This approach is similar than the existing "devices" field used for block devices but uses a dictionary keyed by the interface name instead.
The proposed scheme is based on the existing representation of network device by the
struct net_device
https://docs.kernel.org/networking/netdevices.html.
This proposal focuses solely on moving existing network devices into the container namespace. It does not cover the complexities of network configuration or network interface creation, emphasizing the separation of device management and network configuration.
A list of real use cases that justify this proposal is:
Pre-Configuring Physical Devices:
netDevices
to move the pre-configured interface into the container.Creating and Moving Virtual Interfaces:
macvlan
interface on the host, based on an existing physical interface.netDevices
to move the MACVLAN interface into the container.Network Function Containers:
netDevices
to move multiple physical or virtual interfaces into the container.References
Implementations
Fixes: #1239