-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Linux Network Devices #4538
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
base: main
Are you sure you want to change the base?
Linux Network Devices #4538
Conversation
bdb31c1
to
0b771ca
Compare
07d3b0b
to
3833056
Compare
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. We are also interested in this use case for our accelerator devices.
67f12e0
to
d114afe
Compare
ec90a02
to
f4f5d02
Compare
735f9d5
to
ce1f612
Compare
6262c5e
to
c530772
Compare
4380e86
to
f53d263
Compare
@aojea friendly reminder that this should be ready soon, we are cutting 1.3.0-rc.1 soon (maybe this week). The spec part is still not sure when it will be merged? |
but it seems it still tries to setup the interfaces and network namespaces ... I added a check to ignore those steps if is not root on the setup and teardown |
|
||
# verify the interface is still present in the network namespace | ||
ip netns exec "$ns_name" ip address show dev ctr_dummy0 | ||
[ "$status" -eq 0 ] |
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.
Which $status
are you checking here?
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.
IIUIC the status is cascaded
# ip netns exec ns1 ip addr show dev ctr0
Device "ctr0" does not exist.
# echo $?
1
tests/integration/netdev.bats
Outdated
[[ "$output" == *"$global_ip"* ]] | ||
[[ "$output" == *"ether $mac_address"* ]] | ||
[[ "$output" == *"mtu $mtu_value"* ]] |
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.
Same question for $output
.
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.
it gets the output of the command executed inside the namespace
tests/integration/netdev.bats
Outdated
# tell runc which network namespace to use | ||
update_config '(.. | select(.type? == "network")) .path |= "'"$ns_path"'"' |
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.
nit: can you move it close to other update_config
(just for the sake of readability)?
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.
done
folks apologies for leaving this half way yesterdat, but we had a total blackout in spain and portugal and I lost connection until today :) |
08f6e2f
to
eaf2d7a
Compare
The rootless jobs fail when I move the network namespace logic to the |
954978a
to
e87aa5e
Compare
kindly ping @kolyshkin @rata , please let me know what is missing |
Sorry, so far you are not missing anything, I'm quite overloaded with lot of stuff now and I didn't manage to get back to this. It was very close last time I checked, I guess it's ready or almost. I can try to have a look next week. Sorry again for the delay, it's quite hard with lot of deadlines in these weeks for me to find the time. But For sure I'll have the time for this is included in 1.4, don't worry about that :) |
Signed-off-by: Antonio Ojea <aojea@google.com>
Signed-off-by: Antonio Ojea <aojea@google.com>
cc520e0
to
5e36d0b
Compare
updated the code to handle the change on the vishvananda library and recover the previous behavior of the library, do not think we need to add retries as they were not needed before |
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. Signed-off-by: Antonio Ojea <aojea@google.com>
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/detached from the containers