I want to switch podman over to only using strings for the netns path.
So we no longer pass this interface around. Buildah doesn't use this so
we only need to fix it in Podman. I have a WIP PR[1] for that.
[1] https://github.com/containers/podman/pull/16756
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
For now, only add IgnoreIfExists flag.
Having this flag is very useful when using scripts or systemd unit files
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
Used `go fmt` rules to migrate away from deprecated functions, for
instance `gofmt -w -s -r 'ioutil.TempDir(a, b) -> os.MkdirTemp(a, b)'`
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
When we create a network with the ipam driver none we should disabled
dns automatically. Since we mange no ips we cannot provide name
resolution anyway.
This fixes a problem I spotted when adding test to the podman CI.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
When we read the cni result we should loop over the interfaces and then
the ips. If we only loop over ips we will miss interfaces that have no
ips assigned. We also only care about interfaces created in the netns.
This is required for ipam driver none case, see the test case.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
When we parse CNI config files to convert them into a native Network
struct we should not error unless there is something broken.
The goal is to allow all cni configs to still function but podman
inspect will not be able to show all informations such as subnets about
this network.
Because this is a valid use case we only log this at info level.
Fixescontainers/podman#12990Fixescontainers/podman#13124
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Copy the libpod/network packages from podman to here so we can use the
same code in buildah as well.
This is mostly a one to one copy only the import paths have been changed
and some errors were added.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>