-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Wire network interface into libpod #11322
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
fa4b6f5
to
7d4bd3c
Compare
c00232c
to
3624b31
Compare
@edsantiago Is there something like |
There are no such cni=/usr/libexec/cni/bridge ! FIXME: there should be a better way to find this, but `podman info` does not help
test -x $cni || skip "CNI executable $cni not installed"
run $cni --version
cni_version=$(expr "$output" : ".* plugin version \(.*\)")
[[ $cni_version -ge 1.0 ]] || skip "Test requires CNI >= 1.0 (found: $cni_version)" Using |
|
Also it looks like the path is |
Well, that's obviously a bug and it must be fixed; but equally obviously, it can't get fixed in time for your PR. What is the shortest, simplest way to behavior-check and identify good-new-cni vs old-bad-cni? Is there a |
For now this is the only test which requires the new functionality so it doesn't make sense to use the same test to check if the test should be skipped so I will remove the parts which require v1.0. In future PRs I will add functionality to test this in a reasonable way. |
3624b31
to
89f6267
Compare
89f6267
to
ead17f1
Compare
Manpage changes LGTM. |
ce4881e
to
7b7a073
Compare
/hold cancel |
7b7a073
to
946b89f
Compare
You have a vendor conflict. LGTM once that's resolved. |
Check that the given subnet does not conflict with existing ones (other configs or host interfaces). Signed-off-by: Paul Holzinger <[email protected]>
The default network should not be validated against used subnets, we have to ensure that this network can always be created even when a subnet is already used on the host. This could happen if you run a container on this net, then the cni interface will be created on the host and "block" this subnet from being used again. Therefore the next podman command tries to create the default net again and it would fail because it thinks the network is used on the host. Signed-off-by: Paul Holzinger <[email protected]>
When configs are loaded from disk we need to check if they contain a ipv6 subnet and set ipv6 enables to true in this case. Signed-off-by: Paul Holzinger <[email protected]>
946b89f
to
af3b4cd
Compare
Make use of the new network interface in libpod. This commit contains several breaking changes: - podman network create only outputs the new network name and not file path. - podman network ls shows the network driver instead of the cni version and plugins. - podman network inspect outputs the new network struct and not the cni conflist. - The bindings and libpod api endpoints have been changed to use the new network structure. The container network status is stored in a new field in the state. The status should be received with the new `c.getNetworkStatus`. This will migrate the old status to the new format. Therefore old containers should contine to work correctly in all cases even when network connect/ disconnect is used. New features: - podman network reload keeps the ip and mac for more than one network. - podman container restore keeps the ip and mac for more than one network. - The network create compat endpoint can now use more than one ipam config. The man pages and the swagger doc are updated to reflect the latest changes. Signed-off-by: Paul Holzinger <[email protected]>
We do not use the ocicni code anymore so let's get rid of it. Only the port struct is used but we can copy this into libpod network types so we can debloat the binary. The next step is to remove the OCICNI port mapping form the container config and use the better PortMapping struct everywhere. Signed-off-by: Paul Holzinger <[email protected]>
Rootless cni with ipv6 needs the `ip6_tables` module loaded, normally the cni plugins will load this module but as rootless it does not have the necessary permission to do so. Therefore we load it manually. Signed-off-by: Paul Holzinger <[email protected]>
Drivers should return the list of supported network drivers by this plugin. This is useful for podman info. Signed-off-by: Paul Holzinger <[email protected]>
af3b4cd
to
5e83094
Compare
/lgtm |
/hold cancel |
Wire network interface into libpod
Make use of the new network interface in libpod.
This commit contains several breaking changes:
path.
and plugins.
conflist.
network structure.
The container network status is stored in a new field in the state. The
status should be received with the new
c.getNetworkStatus
. This willmigrate the old status to the new format. Therefore old containers should
continue to work correctly in all cases even when network connect/
disconnect is used.
New features:
network.
config.
The man pages and the swagger doc are updated to reflect the latest
changes.
Drop OCICNI dependency
We do not use the ocicni code anymore so let's get rid of it. Only the
port struct is used but we can copy this into libpod network types so
we can debloat the binary.
The next step is to remove the OCICNI port mapping form the container
config and use the better PortMapping struct everywhere.