Commit graph

23114 commits

Author SHA1 Message Date
Lokesh Mandvekar
602f71991c
Bump to v5.2.3-dev
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2024-08-21 13:43:11 -04:00
Lokesh Mandvekar
fcee48106a
Bump to v5.2.2
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2024-08-21 13:43:11 -04:00
Lokesh Mandvekar
37af07836a
Update RELEASE_NOTES for v5.2.2
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2024-08-21 13:43:10 -04:00
openshift-merge-bot[bot]
b6fb91c971
Merge pull request #23699 from TomSweeneyRedHat/dev/tsweeney/buildah_v1.37.2
[v5.2] Bump Buildah to v1.37.2, c/common v0.60.2, c/image v5.32.2
2024-08-21 17:12:05 +00:00
tomsweeneyredhat
570fbc49aa [v5.2] Bump Buildah to v1.37.2, c/common v0.60.2, c/image v5.32.2
As the title says.  Finishes the vendor dance for Podman v5.2.2

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-08-21 12:06:44 -04:00
Paul Holzinger
458d15cf5d [v5.2] golangci-lint: make darwin linting happy
Fix one minor issue with vfkit error handling. First checking if err !=
nil OR errors.Is() is pointless as the err != is already true.
Second nilerr complains because we return nil when we hit an error
branch, in this case this is correct because an error means VM is
stopped.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-08-21 12:06:44 -04:00
Paul Holzinger
faf3edb5f4 [v5.2] golangci-lint: make windows linting happy
It qemu cannot be compiled anyway so make sure we do not try to compile
parts where the typechecker complains about on windows.
Also all the e2e test files are only used on linux as well.
pkg/machine/wsl also reports some error but to many for me to fix them
now. One minor problem was fixed in pkg/machine/machine_windows.go.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-08-21 12:06:44 -04:00
Paul Holzinger
b96312af0f [v5.2] test/e2e: remove kernel version check
We need something newer than 4.14 anyway now for most Podman functions.
This is breaking liniting on windows as the function doesn't work there.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-08-21 12:06:44 -04:00
Paul Holzinger
462c1c6d8e [v5.2] golangci-lint: remove most skip dirs
Now that we have propert !remote tags set everywhere we can just rely on
that and do not need to skip any dirs.
Also on linux do not lint three times, one remote run is enough.
We still have to skip the test dir for windows/macos though or we need
to add linux build tags there everywhere as well. This seems simpler.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-08-21 12:06:44 -04:00
Paul Holzinger
35290c9b32 [v5.2] set !remote build tags where needed
The new golangci-lint version 1.60.1 has problems with typecheck when
linting remote files. We have certain pakcages that should never be
inlcuded in remote but the typecheck tries to compile all of them but
this never works and it seems to ignore the exclude files we gave it.

To fix this the proper way is to mark all packages we only use locally
with !remote tags. This is a bit ugly but more correct. I also moved the
DecodeChanges() code around as it is called from the client so the
handles package which should only be remote doesn't really fit anyway.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-08-21 12:06:44 -04:00
Paul Holzinger
3ca3c1d456 [v5.2] update golangci-lint to 1.60.1
Fixes new spotted issues around printf() formats and using os.Setenv()
in tests.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-08-21 12:06:44 -04:00
openshift-merge-bot[bot]
b54f985986
Merge pull request #23687 from openshift-cherrypick-robot/cherry-pick-23669-to-v5.2
[v5.2] [skip-ci] Packit: update targets for propose-downstream
2024-08-21 12:31:23 +00:00
Lokesh Mandvekar
d61b5d9409 Packit: update targets for propose-downstream
When a new Fedora target (41 currently), is branched from rawhide,
`fedora-latest` packit target will point to fedora-41, while
`fedora-latest-stable` will point to `fedora-40`. Once fedora-41 has
released, `fedora-latest` and `fedora-latest-stable` will both point to
fedora-41.

So, to have Packit continue to create PRs for Fedora 40 once Fedora 41
has released, it's best to set the target back to `fedora-all`.

Caution: `fedora-all` will create v5.x PRs for Fedora-39 until it goes
EOL. Since dist-git PRs need to be merged manually, we can just manually
close F39 PRs.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2024-08-20 20:27:14 +00:00
openshift-merge-bot[bot]
679276e136
Merge pull request #23647 from openshift-cherrypick-robot/cherry-pick-23524-to-v5.2
[v5.2] Create volume path before state initialization
2024-08-16 15:28:10 +00:00
Matt Heon
dbdff97042 Create volume path before state initialization
Strictly speaking we don't need the path yet, but it existing
prevents a lot of strangeness in our path-checking logic to
validate the current Podman configuration, as it was the only
path that might not exist this early in init.

Fixes #23515

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-08-16 14:07:03 +00:00
openshift-merge-bot[bot]
1c995badd6
Merge pull request #23617 from mheon/bump_521
Bump to v5.2.1
2024-08-14 18:05:56 +00:00
Matt Heon
628446c88c Update Cirrus DEST_BRANCH
Signed-off-by: Matt Heon <mheon@redhat.com>
2024-08-14 09:59:51 -04:00
Matt Heon
30f104cf36 Bump to v5.2.2-dev
Signed-off-by: Matt Heon <mheon@redhat.com>
2024-08-14 08:42:41 -04:00
Matt Heon
d0582c9e1e
Bump to v5.2.1
Signed-off-by: Matt Heon <mheon@redhat.com>
2024-08-14 08:25:43 -04:00
Matt Heon
1cec5dc24e Update release notes for v5.2.1
Signed-off-by: Matt Heon <mheon@redhat.com>
2024-08-14 08:24:34 -04:00
openshift-merge-bot[bot]
972fa2f46a
Merge pull request #23606 from TomSweeneyRedHat/dev/tsweeney/v5.2_buildah_1.37.1
[v5.2] Bump Buildah to v1.37.1, c/common v0.60.1, c/image v5.32.1
2024-08-14 09:42:42 +00:00
tomsweeneyredhat
8227722c3c [v5.2] Add zstd:chunked test fix
Add a fix to pull and push tests to address a zstd:chunked issue as noted in
https://github.com/containers/image/issues/2485

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-08-13 20:50:50 -04:00
tomsweeneyredhat
854e0c2eb4 [v5.2] Bump Buildah to v1.37.1, c/common v0.60.1, c/image v5.32.1
Bump Buildah to v1.37.1, c/common to v0.60.1, c/image v5.32.1
in preparation of Podman v5.2.1

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-08-13 14:29:01 -04:00
openshift-merge-bot[bot]
ef09b45dfc
Merge pull request #23580 from openshift-cherrypick-robot/cherry-pick-23577-to-v5.2
[v5.2] libpod: fix broken saveContainerError()
2024-08-12 15:29:09 +00:00
Paul Holzinger
8f198092d7 libpod: reset state error on init
If we manage to init/start a container successfully we should unset any
previously stored state errors. Otherwise a user might be confused why
there is an error in the state about some old error even though the
container works/runs.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-08-12 13:23:42 +00:00
Paul Holzinger
669767c3a9 libpod: do not save expected stop errors in ctr state
If we try to stop a contianer that is not running or paused we get an
ErrCtrStateInvalid or ErrCtrStopped error. As podman stop is idempotent
this is not a user visable error at all so we should also never log it
in the container state.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-08-12 13:23:42 +00:00
Paul Holzinger
851ec1f81c libpod: fix broken saveContainerError()
We cannot unlock then lock again without syncing the state as this will
then save a potentially old state causing very bad things, such as
double netns cleanup issues.

The fix here is simple move the saveContainerError() under the same
lock. The comment about the re-lock is just wrong. Not doing this under
the same lock would cause us to update the error after something else
changed the container alreayd.

Most likely this was caused by a misunderstanding on how go defer's work.
Given they run Last In - First Out (LIFO) it is safe as long as out
defer function is after the defer unlock() call.

I think this issue is very bad and might have caused a variety of other
weird flakes. As fact I am confident that this fixes the double cleanup
errors.

Fixes #21569
Also fixes the netns removal ENOENT issues seen in #19721.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-08-12 13:23:42 +00:00
openshift-merge-bot[bot]
14f4605a7b
Merge pull request #23481 from mheon/bump_520_final
Bump to v5.2.0
2024-08-02 07:53:44 +00:00
Matt Heon
6b45888959 Bump to v5.2.1-dev
Signed-off-by: Matt Heon <mheon@redhat.com>
2024-08-01 13:32:37 -04:00
Matt Heon
b22d5c61ee
Bump to v5.2.0
Signed-off-by: Matt Heon <mheon@redhat.com>
2024-08-01 13:32:02 -04:00
openshift-merge-bot[bot]
9331788ecc
Merge pull request #23475 from openshift-cherrypick-robot/cherry-pick-23474-to-v5.2
[v5.2] Never skip checkout step in release workflow
2024-08-01 16:02:16 +00:00
Mario Loriedo
3f13c38048 Never skip checkout step in release workflow
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2024-08-01 15:05:16 +00:00
openshift-merge-bot[bot]
8b246b68ac
Merge pull request #23462 from mheon/bump_520_rc3
[CI:ALL] Bump to v5.2.0-rc3
2024-07-31 21:52:26 +00:00
Matt Heon
c83c891fb2 Bump to v5.2.0-dev
Signed-off-by: Matt Heon <mheon@redhat.com>
2024-07-31 14:40:25 -04:00
Matt Heon
028bee289e
Bump to v5.2.0-rc3
Signed-off-by: Matt Heon <mheon@redhat.com>
2024-07-31 14:40:10 -04:00
Matt Heon
23c6e0fb9f Update release notes for v5.2.0-rc3
Signed-off-by: Matt Heon <mheon@redhat.com>
2024-07-31 14:37:46 -04:00
tomsweeneyredhat
784856b6ae Tweak versions in register_images.go
Fix up a couple of versions in comments in the
pkg/api/server/register_images.go file.  Based on comments
from #23440

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-07-31 14:37:46 -04:00
Paul Holzinger
d6ae7427f7 fix network cleanup flake in play kube
When using service containers and play kube we create a complicated set
of dependencies.

First in a pod all conmon/container cgroups are part of one slice, that
slice will be removed when the entire pod is stopped resulting in
systemd killing all processes that were part in it.

Now the issue here is around the working of stopPodIfNeeded() and
stopIfOnlyInfraRemains(), once a container is cleaned up it will check
if the pod should be stopped depending on the pod ExitPolicy. If this is
the case it wil stop all containers in that pod. However in our flaky
test we calle podman pod kill which logically killed all containers
already. Thus the logic now thinks on cleanup it must stop the pod and
calls into pod.stopWithTimeout(). Then there we try to stop but because
all containers are already stopped it just throws errors and never gets
to the point were it would call Cleanup(). So the code does not do
cleanup and eventually calls removePodCgroup() which will cause all
conmon and other podman cleanup processes of this pod to be killed.

Thus the podman container cleanup process was likely killed while
actually trying to the the proper cleanup which leaves us in a bad
state.

Following commands such as podman pod rm will try to the cleanup again
as they see it was not completed but then fail as they are unable to
recover from the partial cleanup state.

Long term network cleanup needs to be more robust and ideally should be
idempotent to handle cases were cleanup was killed in the middle.

Fixes #21569

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-31 14:37:46 -04:00
Ed Santiago
c0f3ce462c WIP: Fixes for vendoring Buildah
This commit was automatically cherry-picked
by buildah-vendor-treadmill v0.3
from the buildah vendor treadmill PR, #13808

/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
> The git commit message from that PR is below. Please review it,
> edit as necessary, then remove this comment block.
\^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Changes since 2024-05-21:

  * document --compat-volumes
  * Fix conflict caused by Ed's local-registry PR in buildah

Signed-off-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-07-31 14:31:23 -04:00
tomsweeneyredhat
a8f4c12003 Add --compat-volumes option to build and farm build
Add the `--compat-volumes option from Buildah v1.37 into
Podman in preparation of Podman v5.2

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-07-31 14:31:23 -04:00
Matt Heon
8bc493324a Bump Buildah, c/storage, c/image, c/common
Signed-off-by: Matt Heon <mheon@redhat.com>
2024-07-31 14:31:23 -04:00
Paul Holzinger
4fbcece05f libpod: bind ports before network setup
We bind ports to ensure there are no conflicts and we leak them into
conmon to keep them open. However we bound the ports after the network
was set up so it was possible for a second network setup to overwrite
the firewall configs of a previous container as it failed only later
when binding the port. As such we must ensure we bind before the network
is set up.

This is not so simple because we still have to take care of
PostConfigureNetNS bool in which case the network set up happens after
we launch conmon. Thus we end up with two different conditions.

Also it is possible that we "leak" the ports that are set on the
container until the garbage collector will close them. This is not
perfect but the alternative is adding special error handling on each
function exit after prepare until we start conmon which is a lot of work
to do correctly.

Fixes https://issues.redhat.com/browse/RHEL-50746

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-31 14:24:07 -04:00
Paul Holzinger
3f14fcf7c3 pkg/api: do not leak config pointers into specgen
The value of the pointer might be changed while creating the container
causing unexpected side effects.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-31 14:23:21 -04:00
Christophe Fergeau
02a932372b build: Update gvisor-tap-vsock to 0.7.4
This contains a fix for a gvproxy crash on macos on fast connections
with heavy network load.

This should fix https://github.com/containers/podman/issues/23114

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
2024-07-31 14:23:11 -04:00
Paul Holzinger
929c64ecf3 test/system: fix borken pasta interface name checks
The tests didn't check anything actually because default_ifname requires
an ip version argument to work. Thus pasta_iface was empty, add new
checks to prevent this kind of error again.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-31 14:22:00 -04:00
Paul Holzinger
c231ba8b23 test/system: fix bridge host.containers.internal test
The test assumes that if more than 1 ip on the host we should be able to
set host.containers.internal. This however is not how the logic works in
the code. What it actually does is to check all ips in the
rootless-netns and then it knows that it cannot use any of these ips.
This includes any podman bridge ips.

You can reproduce the error when you have only one ipv4 on the host then
run a container as root in the background and run the test:
hack/bats --rootless 505:host.containers.internal

So the failure here was that there was already a podman container
running as root on the default bridge thus the test saw 2 ips but then
the rootless run also uses the same subnet for its bridge and the code
knew that ip would not work either. I could have made another special
condition in test but the better way to work around it is to create a
new network. A new network will make sure there are no conflicting
subnets assigned so the test will pass.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-31 14:21:55 -04:00
Ed Santiago
b1ad869560 CI: system tests: instrument to allow failure analysis
Two tests failing in gating but never CI; add some debug
instrumentation to make it possible to find out what
is going on

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-07-31 14:21:21 -04:00
openshift-merge-bot[bot]
76c2cb2c6a
Merge pull request #23430 from openshift-cherrypick-robot/cherry-pick-23324-to-v5.2
[v5.2] Use uploaded .zip for Windows action
2024-07-29 15:45:09 +00:00
Ashley Cui
5da126dc49 Use uploaded .zip for Windows action
Restore behavior for using uploaded zp file to generate the windows installer. This ensures that actions can always build and sign the installer, no matter how old the release, provided a .zip.

Signed-off-by: Ashley Cui <acui@redhat.com>
2024-07-29 14:12:35 +00:00
openshift-merge-bot[bot]
dbfaf236c8
Merge pull request #23407 from openshift-cherrypick-robot/cherry-pick-23402-to-v5.2
[v5.2] [skip-ci] RPM: podman-iptables.conf only on Fedora
2024-07-26 09:30:09 +00:00