Commit Graph

12 Commits

Author SHA1 Message Date
Chris Evich fcebc34cdc Cirrus: Update CI VM images to F37
Thanks to @Luap99 for the test fix.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-03-15 14:11:03 -04:00
Paul Holzinger 70d14082ea pkg/netns: UnmountNS() accept netns path as string
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>
2022-12-07 14:53:47 +01:00
Ygal Blum f7978269e7 Libnetwork: Add NetworkCreateOptions to the NetworkCreate method
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>
2022-12-05 15:57:15 +02:00
Valentin Rothberg e17483b871 bump to golangci-lint v1.50.0
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>
2022-10-17 15:03:07 +02:00
Kir Kolyshkin 4393468343 *_test.go: fix or suppress errcheck warnings
Where we can check the error, do it. Where we can not, ignore it.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-04-09 15:18:22 -07:00
Paul Holzinger 82616479ae libnetwork: ipam driver none disable dns
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>
2022-03-31 16:39:23 +02:00
Sascha Grunert a6b63a5c47 Switch to ginkgo/v2
Update ginkgo to the next major version which has been released a while
ago.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2022-03-30 10:03:17 +02:00
Paul Holzinger cc5a65ab0f libnetwork/netavark: allow network create with no ipam driver
Network create now uses the ipam driver. This allows the user to
configure the ipam driver manually instead of choosing a fixed default.
If the ipam driver is `none` no ips will be assigned to this container.
This means that only the interfaces are created.

This will require a patch in netavark since it rejects the config when
no static ips are provided.

Ref containers/podman#13521

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-29 18:46:29 +02:00
Valentin Rothberg 095aded91c go fmt: use go 1.18 conditional-build syntax
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-03-18 11:04:40 +01:00
Paul Holzinger 641e6dff04 libnetwork: netavark fix mac address marshal
The HardwareAddr type must bbe the actual value and not a pointer
otherwise the marshal logic will not use this function. Added a test to
confirm that this works.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-01-05 18:27:14 +01:00
Paul Holzinger 4fcb18dca7 libnetwork: fix lint errors
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-12-17 14:24:21 +01:00
Paul Holzinger 002673d22f add libnetwork package
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>
2021-12-16 19:07:38 +01:00