Commit graph

17890 commits

Author SHA1 Message Date
OpenShift Merge Robot
fd0ea3b971
Merge pull request #18172 from TomSweeneyRedHat/dev/tsweeney/store1.45.5
[v4.4.1-rhel] Vendor c/storage v1.45.5
2023-04-13 13:31:31 -04:00
tomsweeneyredhat
b458fc63d2 [v4.4.1-rhel] Vendor c/storage v1.45.5
Vendor in c/storage v1.45.5

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2177925 and
https://bugzilla.redhat.com/show_bug.cgi?id=2176833

"Podman containers do not start after upgrade to v4.4.1 "

ZeroDay BZs for RHEL 8.8 and 9.2

Repushed with v1.45.5 after it was found that v1.45.4 was built
incorrectly from main.

[NO NEW TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2023-04-13 08:44:36 -04:00
OpenShift Merge Robot
05037d301b
Merge pull request #18006 from TomSweeneyRedHat/dev/tsweeney/dockerlog
[v4.4.1-rhel] compat: /auth: parse server address correctly
2023-04-03 04:40:59 -04:00
Valentin Rothberg
3101c8be24 [v4.4.1-rhel] compat: /auth: parse server address correctly
Use `auth.Login` as `podman login` does which parses and normalizes the
input addresses correctly, especially for docker.io.

This Cherry Picks https://github.com/containers/podman/pull/17581 and
brings in necessary changes to run_test.go from i
5f86fae71f

Addreses: https://bugzilla.redhat.com/show_bug.cgi?id=2183601 and
https://bugzilla.redhat.com/show_bug.cgi?id=2183602 for the RHEL 8.8 and
9.2 ZeroDay

The original Fixed: #17571
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2023-03-31 16:10:16 -04:00
OpenShift Merge Robot
67f7e1e941
Merge pull request #17969 from TomSweeneyRedHat/dev/tsweeney/keepid
[v4.4.1-rhel] fix slirp4netns resolv.conf ip with a userns
2023-03-29 17:58:49 +02:00
Paul Holzinger
62d347488a [v4.4.1-rhel] fix slirp4netns resolv.conf ip with a userns
When a userns is set we setup the network after the bind mounts, at the
point where resolv.conf is generated we do not yet know the subnet.
Just like the other dns servers for bridge networks we need to add the
ip later in completeNetworkSetup()

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2182492 and
https://bugzilla.redhat.com/show_bug.cgi?id=2182491

This is targeted to RHEL 8.8 and 9.2 ZeroDay

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2023-03-28 18:11:25 -04:00
OpenShift Merge Robot
4461c9c8b2
Merge pull request #17875 from edsantiago/v441rhel_rootless_journal_skip
quadlet tests: skip on RHEL8 rootless
2023-03-22 04:42:31 -04:00
Ed Santiago
ab0bbf7ba0 quadlet tests: skip on RHEL8 rootless
skip in setup() if journald unavailable.

To be pedantic, this is overkill: some quadlet tests pass
because they don't run journald. Too bad.

Also skip a play-kube test that requires journal

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-03-21 09:05:32 -06:00
OpenShift Merge Robot
bf400bd36f
Merge pull request #17863 from vrothberg/v4.4.1-rhel-backport-fix-17777
[v4.4.1-rhel] fix --health-on-failure=restart in transient unit
2023-03-21 07:29:21 -04:00
Valentin Rothberg
a2e80c53d4 [v4.4.1-rhel] fix --health-on-failure=restart in transient unit
As described in #17777, the `restart` on-failure action did not behave
correctly when the health check is being run by a transient systemd
unit.  It ran just fine when being executed outside such a unit, for
instance, manually or, as done in the system tests, in a scripted
fashion.

There were two issue causing the `restart` on-failure action to
misbehave:

1) The transient systemd units used the default `KillMode=cgroup` which
   will nuke all processes in the specific cgroup including the recently
   restarted container/conmon once the main `podman healthcheck run`
   process exits.

2) Podman attempted to remove the transient systemd unit and timer
   during restart.  That is perfectly fine when manually restarting the
   container but not when the restart itself is being executed inside
   such a transient unit.  Ultimately, Podman tried to shoot itself in
   the foot.

Fix both issues by moving the restart logic in the cleanup process.
Instead of restarting the container, the `healthcheck run` will just
stop the container and the cleanup process will restart the container
once it has turned unhealthy.

Backport of commit 9563415430.

Fixes: #17777
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2180125
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2180126
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-03-21 09:18:42 +01:00
OpenShift Merge Robot
ffc2614b8e
Merge pull request #17790 from TomSweeneyRedHat/dev/tsweeney/pick17755
[v4.4.1-rhel] Use append() to add elements to a slice (restore)
2023-03-16 11:15:22 -04:00
OpenShift Merge Robot
5464dbc2f6
Merge pull request #17810 from lsm5/v4.4.1-rhel-cve-2022-41723
[v4.4.1-rhel] bump golang.org/x/net to v0.8.0
2023-03-16 11:09:10 -04:00
Lokesh Mandvekar
75d0b4a787
bump golang.org/x/net to v0.8.0
Resolves: CVE-2022-41723

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-03-16 15:39:58 +05:30
tomsweeneyredhat
6b64861922 [v4.4.1-rhel] Use append() to add elements to a slice (restore)
Backports #17755 from @adrianreber to fix an append issue.  Will be
used for a ZeroDay delivery to RHEL 8.8/9.2.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2177611

Original commit message:

The code was not using append() to add items to a slice.

Accessing non allocated elements of the slice failed with:
```
$ podman container restore -l
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/containers/podman/v4/pkg/domain/infra/abi.(*ContainerEngine).ContainerRestore(0xc00051a8b8, {0x1dbced0, 0xc0000440d0}, {0x2a31b30, 0x0, 0x0}, {0x0, 0x0, 0x0, 0x0, ...})
        /share/go/src/github.com/containers/podman/pkg/domain/infra/abi/containers.go:676 +0x39c
github.com/containers/podman/v4/cmd/podman/containers.restore(0x28fb6c0?, {0xc0002c9080, 0x0, 0x1?})
        /share/go/src/github.com/containers/podman/cmd/podman/containers/restore.go:171 +0x4ef
github.com/spf13/cobra.(*Command).execute(0x28fb6c0, {0xc0000400b0, 0x1, 0x1})
        /share/go/src/github.com/containers/podman/vendor/github.com/spf13/cobra/command.go:916 +0x862
github.com/spf13/cobra.(*Command).ExecuteC(0x291ab00)
        /share/go/src/github.com/containers/podman/vendor/github.com/spf13/cobra/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
        /share/go/src/github.com/containers/podman/vendor/github.com/spf13/cobra/command.go:968
github.com/spf13/cobra.(*Command).ExecuteContext(...)
        /share/go/src/github.com/containers/podman/vendor/github.com/spf13/cobra/command.go:961
main.Execute()
        /share/go/src/github.com/containers/podman/cmd/podman/root.go:107 +0xcc
main.main()
        /share/go/src/github.com/containers/podman/cmd/podman/main.go:41 +0x7c
```

[NO NEW TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2023-03-14 19:52:14 -04:00
OpenShift Merge Robot
e1703bb7f4
Merge pull request #17531 from edsantiago/rhel8_test_skips
RHEL8 gating-test skips and tweaks
2023-02-20 13:36:38 +01:00
OpenShift Merge Robot
d865e23c6e
Merge pull request #17570 from openshift-cherrypick-robot/cherry-pick-17548-to-v4.4.1-rhel
[v4.4.1-rhel] kube play: only enforce passthrough in Quadlet
2023-02-20 12:48:49 +01:00
Valentin Rothberg
9ca3d1c28e kube play: only enforce passthrough in Quadlet
Only enforce the passthrough log driver for Quadlet. Commit 68fbebf
introduced a regression on the `podman-kube@` template as `podman logs`
stopped working and settings from containers.conf were ignored.

Fixes: #17482
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-20 07:53:56 +00:00
OpenShift Merge Robot
0b38633c42
Merge pull request #17559 from TomSweeneyRedHat/dev/tsweeney/fixsecret4.4.1
[v4.4.1-rhel] [CI:DOCS] Touch up secret man page
2023-02-18 13:59:10 +01:00
OpenShift Merge Robot
5a3b9834ec
Merge pull request #17558 from openshift-cherrypick-robot/cherry-pick-17554-to-v4.4.1-rhel
[v4.4.1-rhel] [CI:BUILD] Revert "CI: Temporarily disable all AWS EC2-based tasks"
2023-02-18 13:53:58 +01:00
tomsweeneyredhat
7ddac33de9 [v4.4.1-rhel] [CI:DOCS] Touch up secret man page
This is a working theory fix.  The man pages including the
secret.md option are not resolving properly.  The secret.md
file is the only one with a text line with three back ticks on the start
and end of the line.  Elsewhere we have the backticks on separate lines
and the text in it's own line.

This might not fix the issue, but at the very least it makes things
consistent.

[NO NEW TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2023-02-17 15:05:59 -05:00
Chris Evich
07b72bcf99 Revert "CI: Temporarily disable all AWS EC2-based tasks"
This reverts commit 7f8bc6f510.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-17 18:42:41 +00:00
OpenShift Merge Robot
ca30f811a2
Merge pull request #17533 from mheon/backport_17528_441rhel
[v4.4.1-rhel] Backport #17528
2023-02-17 19:41:20 +01:00
Aditya R
017535d05e volume,container: chroot to source before exporting content
* Utils must support higher level API to create Tar with chrooted into
  directory
* Volume export: use TarwithChroot instead of Tar so we can make sure no
  symlink can be exported by tar if it exists outside of the source
directory.
* container export: use chroot and Tar instead of Tar so we can make sure no
  symlink can be exported by tar if it exists outside of the mointPoint.

[NO NEW TESTS NEEDED]
[NO TESTS NEEDED]
Race needs combination of external/in-container mechanism which is hard to repro in CI.

CVE: https://access.redhat.com/security/cve/CVE-2023-0778

Signed-off-by: Aditya R <arajan@redhat.com>

MH: Cherry-pick to v4.4.1-rhel per RHBZ 2169618

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-02-17 11:33:30 -05:00
OpenShift Merge Robot
4f1dc3c6c3
Merge pull request #17546 from vrothberg/v4.4.1-rhel-backports
V4.4.1 rhel backports
2023-02-17 15:53:05 +01:00
Ed Santiago
51f1670230 events + container inspect test: RHEL fixes
Primarily, add skip_if_journald_unavailable because RHEL.

Secondarily, reverse a flipped actual/expect assertion
that made it difficult to understand the RHEL failure.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-02-17 11:17:08 +01:00
Chris Evich
98e4e2c5dc CI: Temporarily disable all AWS EC2-based tasks
An ongoing issue with uploading artifacts is hindering development
progress.  Temporarily disable all aflicted tasks until the problem is
resolved.  Typical error message:

```
Uploading 1 artifacts for
Failed to upload artifacts: Put
...cut...
tls: server selected unsupported protocol version 303
Re-trying to artifacts upload...
```

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-17 11:16:38 +01:00
Ed Santiago
146809b41a RHEL8 gating-test skips and tweaks
...to deal with runc, cgroups v1, whatever is causing these
failures on RHEL8.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-02-16 09:21:37 -07:00
OpenShift Merge Robot
ff4af7cc13
Merge pull request #17519 from TomSweeneyRedHat/dev/tsweeney/cimage_5.24.1_4.4.1
[v4.4.1-rhel] Bump c/image to v5.24.1
2023-02-16 11:07:20 -05:00
tomsweeneyredhat
f8a635a482 [v4.4.1-rhel] Bump c/image to v5.24.1
Bump c/image to v5.24.1 in preparation of the RHEL 8.8 and 9.2
release.

[NO NEW TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2023-02-15 16:14:22 -05:00
Ashley Cui
d4e285aa73 Cirrus: Update operating branch
Signed-off-by: Ashley Cui <acui@redhat.com>
2023-02-08 16:02:29 -05:00
Ashley Cui
34e8f39332
Bump to v4.4.1
Signed-off-by: Ashley Cui <acui@redhat.com>
2023-02-08 14:03:18 -05:00
Ashley Cui
7431f3d006 Update release notes for Podman 4.4.1
Signed-off-by: Ashley Cui <acui@redhat.com>
2023-02-08 14:01:19 -05:00
OpenShift Merge Robot
1bde07e041
Merge pull request #17429 from openshift-cherrypick-robot/cherry-pick-17027-to-v4.4
[v4.4] Resolve symlink path for qemu directory if possible
2023-02-08 13:03:47 -05:00
OpenShift Merge Robot
393336bd71
Merge pull request #17430 from openshift-cherrypick-robot/cherry-pick-17420-to-v4.4
[v4.4] kube play: do not teardown unconditionally on error
2023-02-08 11:43:05 -05:00
OpenShift Merge Robot
db50458c2b
Merge pull request #17390 from openshift-cherrypick-robot/cherry-pick-17364-to-v4.4
[v4.4] Add missing return after utils.Error()
2023-02-08 10:00:06 -05:00
Valentin Rothberg
68a58c9a12 kube play: do not teardown unconditionally on error
Commit 2f29639bd3 added a UX improvement to cleanup/teardown when
running the specified YAML has failed.  However, the teardown happens
unconditionally such that rerunning the same YAML file will teardown the
previously created workload instead of just failing with a name-conflict
error (e.g., "pod already exists").  The regression popped up testing
the Ansible system role with Podman v4.4.0.

For now, do not teardown at all on error to quickly fix this regression
for the upcoming Podman v4.4.1 release.  The UX improvement is still
desired but must be conditional and only happen on newly created
resources, which probably requires moving it down to the backend.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-08 14:30:08 +00:00
Daniel J Walsh
7b5f724824
Merge pull request #17404 from openshift-cherrypick-robot/cherry-pick-17351-to-v4.4
[v4.4]  Install podman-systemd.unit man page, make quadlet discoverable
2023-02-08 09:28:35 -05:00
Nathan Henrie
a1cc3733b1 Resolve symlink path for qemu directory if possible
Fixes https://github.com/containers/podman/issues/17026
Fixes https://github.com/NixOS/nixpkgs/issues/169118

[NO NEW TESTS NEEDED]

Related: https://github.com/NixOS/nixpkgs/pull/163015
Signed-off-by: Nathan Henrie <nate@n8henrie.com>
2023-02-08 14:17:19 +00:00
OpenShift Merge Robot
f5670f01c9
Merge pull request #17371 from openshift-cherrypick-robot/cherry-pick-17356-to-v4.4
[v4.4] oci: bind mount /sys with --userns=(auto|pod:)
2023-02-08 08:19:27 -05:00
OpenShift Merge Robot
5571faa9ed
Merge pull request #17408 from openshift-cherrypick-robot/cherry-pick-17293-to-v4.4
[v4.4] [CI:DOCS] docs: specify order preference for FROM
2023-02-08 07:16:50 -05:00
OpenShift Merge Robot
37f905cc91
Merge pull request #17410 from openshift-cherrypick-robot/cherry-pick-17398-to-v4.4
[v4.4] Quadlet: exit 0 when there are no files to process
2023-02-08 03:57:35 -05:00
OpenShift Merge Robot
168034546d
Merge pull request #17415 from openshift-cherrypick-robot/cherry-pick-17401-to-v4.4
[v4.4] [CI:DOCS] events: document journald identifiers
2023-02-08 03:30:29 -05:00
Valentin Rothberg
c3d781de0c events: document journald identifiers
Document the identifiers used in the journald events backend. Those can
be used to filter Podman events with journalctl and I need them to be
documented for a blog I am writing at the moment.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-08 01:53:00 +00:00
Valentin Rothberg
52ae4a2c40 Quadlet: exit 0 when there are no files to process
Quadlet should not exit with failure if no files to process have been
found.  Otherwise, even simple operations such as reloading systemd
will fail as it retriggers generators.

Fixes: #17374
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-07 15:18:03 -05:00
Daniel J Walsh
1ee04fcc71 Cleanup podman-systemd.unit file
Sort options alphabetically

Add kubernetes example.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-02-07 15:11:08 -05:00
Daniel J Walsh
f3ea361004 Install podman-systemd.unit man page, make quadlet discoverable
Currently we are shipping no data about quadlet, since the
podman-systemd.unit file is not shipped. Also want to add the
quadlet name to the description of the man page so that

man -k quadlet

will help users find the man page.

Also add a link file such that if the user types in
man quadlet
man will show the podman-systemd.unit file.

Also eliminate the subpackage podman-quadlet

Fixes: https://github.com/containers/podman/issues/17349

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-02-07 15:10:59 -05:00
Erik Sjölund
2b7ea64428 Add missing return after errors
Add missing return after utils.Error(),
utils.InternalServerError(), utils.BadRequest().

[NO NEW TESTS NEEDED]

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2023-02-07 14:51:07 -05:00
Giuseppe Scrivano
1d76a166c6 oci: bind mount /sys with --userns=(auto|pod:)
when using --userns=auto or --userns=pod, we should bind mount /sys
from the host instead of creating a new /sys in the container,
otherwise we rely on the fallback provided by crun, which might not be
available in other runtimes.

Also, in the last version of crun the fallback is stricter than it
used to be before and it uses a recursive bind mount through the new
mount API.  That can be missing on old kernel.

Closes: https://github.com/containers/crun/issues/1131

[NO NEW TESTS NEEDED] to trigger the failure, we need a specific
combination of kernel, libc and OCI runtime.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-02-07 14:40:56 -05:00
Aditya R
20d31a0a6b docs: specify order preference for FROM
When multiple files are specified buildah considers `FROM` instruction
from the last file specified and so does `buildkit` and `docker` so lets
specify that in docs.

[NO NEW TESTS NEEDED]
[NO TESTS NEEDED]

Similar to: https://github.com/containers/buildah/pull/4546

Signed-off-by: Aditya R <arajan@redhat.com>
2023-02-07 14:36:20 -05:00
OpenShift Merge Robot
7378b758ab
Merge pull request #17411 from cevich/fix_graphql_test
[CI:BUILD] Cirrus: Fix & remove GraphQL API tests
2023-02-07 13:46:15 -05:00