Commit graph

24453 commits

Author SHA1 Message Date
openshift-merge-bot[bot]
76e6a3d5e2
Merge pull request #25515 from openshift-cherrypick-robot/cherry-pick-25488-to-v5.4
[v5.4] Create quota before _data dir for volumes
2025-03-10 15:08:00 +00:00
Matt Heon
bff9da4e3a Create quota before _data dir for volumes
This resolves an ordering issue that prevented quotas from being
applied. XFS quotas are applied recursively, but only for
subdirectories created after the quota is applied; if we create
`_data` before the quota, and then use `_data` for all data in
the volume, the quota will never be used by the volume.

Also, add a test that volume quotas are working as designed using
an XFS formatted loop device in the system tests. This should
prevent any further regressions on basic quota functionality,
such as quotas being shared between volumes.

Fixes #25368
Fixes https://issues.redhat.com/browse/RHEL-82198
Fixes https://issues.redhat.com/browse/RHEL-82199

Signed-off-by: Matt Heon <mheon@redhat.com>
2025-03-10 14:18:41 +00:00
openshift-merge-bot[bot]
7b0a999baf
Merge pull request #25482 from openshift-cherrypick-robot/cherry-pick-25478-to-v5.4
[v5.4] [CI:DOCS] Packit: clarify secondary status in CI
2025-03-06 13:20:23 +00:00
Lokesh Mandvekar
a15623d12f Packit: clarify secondary status in CI
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-03-05 14:01:45 +00:00
openshift-merge-bot[bot]
7f6c2ade94
Merge pull request #25444 from openshift-cherrypick-robot/cherry-pick-25408-to-v5.4
[v5.4] podman run: fix --pids-limit -1 wrt runc
2025-03-03 17:19:32 +00:00
Kir Kolyshkin
fea21e9bc0 podman run: fix --pids-limit -1 wrt runc
Since commit c25cc7230 ("Allow a value of -1 to set unlimited pids
limit") podman converts the pids-limit value of -1 to 0 for OCI spec.

Unfortunately, different runtimes (crun and runc) treat pids.limit=0
differently, and the runtime-spec definition is somewhat vague
(see [1]).

Long term fix belongs to runtime-spec and then runtimes should follow
it.

Short term fix is do not convert -1 to 0 (as all runtimes treat -1 as
unlimited).

[NO NEW TESTS NEEDED] -- this is covered by test added in commit 553e53d44.

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

[1]: https://github.com/opencontainers/runc/issues/4014#issuecomment-1888185352
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-03 10:55:12 +00:00
openshift-merge-bot[bot]
6f616936f5
Merge pull request #25418 from openshift-cherrypick-robot/cherry-pick-25416-to-v5.4
[v5.4] vendor: update github.com/go-jose/go-jose/v3 to v3.0.4
2025-02-27 19:04:59 +00:00
Paul Holzinger
07d7101429 vendor: update github.com/go-jose/go-jose/v3 to v3.0.4
Contains a fix for CVE-2025-27144

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-27 18:00:53 +00:00
openshift-merge-bot[bot]
672cc33ad1
Merge pull request #25405 from openshift-cherrypick-robot/cherry-pick-25403-to-v5.4
[v5.4] chore(deps): update module github.com/go-jose/go-jose/v4 to v4.0.5 [security]
2025-02-27 11:07:59 +00:00
renovate[bot]
599a0b71a6 chore(deps): update module github.com/go-jose/go-jose/v4 to v4.0.5 [security]
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-26 14:53:11 +00:00
openshift-merge-bot[bot]
98c413333c
Merge pull request #25364 from openshift-cherrypick-robot/cherry-pick-25352-to-v5.4
[v5.4] wire up --retry-delay for artifact pull
2025-02-24 21:10:32 +00:00
Brent Baude
b8b0639e7c wire up --retry-delay for artifact pull
fixed a bug in the artifact code where --retry-delay was being
discarded.

Fixes: https://issues.redhat.com/browse/RUN-2511

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-02-24 20:27:23 +00:00
openshift-merge-bot[bot]
c64fee41b2
Merge pull request #25373 from Luap99/v5.4
[v5.4] Backport linter update
2025-02-20 19:43:27 +00:00
Paul Holzinger
5671cfe3ab
Revert "silence false positve from golangci-lint"
This reverts commit 8b6f14f95b.

https://github.com/golangci/golangci-lint/issues/5398 is fixed

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
(cherry picked from commit 77737132a5)
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-20 10:55:49 +01:00
Paul Holzinger
2d18a7cc47
update golangci-lint to v1.64.4
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
(cherry picked from commit 035fff5fd2)
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-20 10:55:49 +01:00
Paul Holzinger
0b31c710ce
update golangci-lint to v1.64.2
- exportloopref is deprecated and deactivated so it should be removed
  from the disable list.
- tenv is deprecated and was replaced by usetesting

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
(cherry picked from commit 986fc9f465)
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-20 10:55:49 +01:00
Paul Holzinger
fc63a340f3
silence false positve from golangci-lint
This is valid and the upstream linter allows it but somehow with
golangci-lint it produces an error:

Success matcher only support a single error value, or function with Gomega as its first parameter

I reported a bug upstream[1] but for now let's just ignore it so we can
update the linter.

[1] https://github.com/golangci/golangci-lint/issues/5398

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
(cherry picked from commit 8b6f14f95b)
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-20 10:55:49 +01:00
Paul Holzinger
e50898e1f7
cmd/podman: refactor Context handling
The PodmanOptionsKey is never used anywhere so it is pointless to add
this. Second having several functions to return the same context makes
no sense so fold them all into one. Lastly create the context once and
always return the same one instead of having to nil check each time.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
(cherry picked from commit 34de0feda5)
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-20 10:55:49 +01:00
Paul Holzinger
11ef179de2
fix new usetesting lint issue
Using t.Setenv() is much better is automatically takes care of the env
cleanup after the test.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
(cherry picked from commit 78717e6ae9)
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-20 10:55:48 +01:00
openshift-merge-bot[bot]
e4ff7c6a5e
Merge pull request #25363 from openshift-cherrypick-robot/cherry-pick-25360-to-v5.4
[v5.4] [skip-ci] Packit/Copr: Fix `podman version` in rpm
2025-02-19 15:26:53 +00:00
Lokesh Mandvekar
f5d96a5959 Packit/Copr: Fix podman version in rpm
Additional rpm patching to show upstream short sha in `podman --version`
caused podman-machine-os tests to fail.

This commit gets rid of that patching and instead sets define.gitCommit
LDFLAG for Copr rpms.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-02-19 15:05:49 +00:00
openshift-merge-bot[bot]
2a5492d6d7
Merge pull request #25299 from openshift-cherrypick-robot/cherry-pick-25297-to-v5.4
[v5.4] Remove persist directory when cleaning up Conmon files
2025-02-11 23:48:27 +00:00
Matt Heon
fd5eb1fdf3 Remove persist directory when cleaning up Conmon files
This seems to have been added as part of the cleanup of our
handling of OOM files, but code was never added to remove it, so
we leaked a single directory with an exit file and OOM file per
container run. Apparently have been doing this for a while - I'd
guess since March of '23 - so I'm surprised more people didn't
notice.

Fixes #25291

Signed-off-by: Matt Heon <mheon@redhat.com>
2025-02-11 21:10:25 +00:00
openshift-merge-bot[bot]
19cb9f3a2f
Merge pull request #25296 from mheon/bump_540
Bump to v5.4.0
2025-02-11 17:41:23 +00:00
Matt Heon
223f827213 Bump to v5.4.1-dev
Signed-off-by: Matt Heon <mheon@redhat.com>
2025-02-11 11:08:04 -05:00
Matt Heon
f9f7d48b24 Bump to v5.4.0
Signed-off-by: Matt Heon <mheon@redhat.com>
2025-02-11 11:08:03 -05:00
Matt Heon
246011458c Update release notes for v5.4.0 final
Signed-off-by: Matt Heon <mheon@redhat.com>
2025-02-11 11:02:20 -05:00
Matt Heon
3d344ffd26 In SQLite state, use defaults for empty-string checks
As part of our database init, we perform a check of the current
values for a few fields (graph driver, graph root, static dir,
and a few more) to validate that Libpod is being started with a
sane & sensible config, and the user's containers can actually be
expected to work. Basically, we take the current runtime config
and compare against values cached in the database from the first
time Podman was run.

We've had some issues with this logic before this year around
symlink resolution, but this is a new edge case. Somehow, the
database is being loaded with the empty string for some fields
(at least graph driver) which is causing comparisons to fail
because we will never compare against "" for those fields - we
insert the default value instead, assuming we have one.

Having a value of "" in the database largely invalidates the
check so arguably we could just drop it, but what BoltDB did -
and what SQLite does after this patch - is to use the default
value for comparison instead of "". This should still catch some
edge cases, and shouldn't be too harmful.

What this does not do is identify or solve the reason that we are
seeing the empty string in the database at all. From my read on
the logic, it must mean that the graph driver is explicitly set
to "" in the c/storage config at the time Podman is first run and
I'm not precisely sure how that happens.

Fixes #24738

Signed-off-by: Matt Heon <mheon@redhat.com>
2025-02-11 11:01:00 -05:00
Jan Rodák
2612e3c233 Bump FreeBSD version to 13.4
Version 13.3 is EOL. See https://www.freebsd.org/releases/

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-02-11 09:21:54 -05:00
Paul Holzinger
3d917a395c docs: add v5.4 to API reference
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-11 09:21:33 -05:00
openshift-merge-bot[bot]
a8a01ca426
Merge pull request #25287 from openshift-cherrypick-robot/cherry-pick-25235-to-v5.4
[v5.4] [skip-ci] RPM: set BUILD_ORIGIN
2025-02-11 07:13:43 +00:00
Lokesh Mandvekar
13ebc5860c Update rpm/podman.spec
Co-authored-by: Paul Holzinger <git@holzinger.dev>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2025-02-11 07:10:30 +00:00
Lokesh Mandvekar
f34d6c76db RPM: set buildOrigin in LDFLAG
For Copr builds, it will mention the Copr info from where the rpm is
installed.

For non-copr builds, it will mention the value of the packager macro
if set, and skip this field altogether if not.

On local rpm builds, this shows:
```
Build Origin:  Lokesh Mandvekar <lsm5@fedoraproject.org>
```

On koji rpm builds, this shows:
```
Build Origin: Fedora Project
```

On copr rpm builds (for eg. rhcontainerbot/playground), this shows:
```
Build Origin: Copr: rhcontainerbot/playground
```

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-02-11 07:10:30 +00:00
openshift-merge-bot[bot]
7839a1ce1b
Merge pull request #25274 from openshift-cherrypick-robot/cherry-pick-24864-to-v5.4
[v5.4] [skip-ci] RPM: cleanup macro defs
2025-02-10 13:38:19 +00:00
Lokesh Mandvekar
6218d42ed6 RPM: cleanup macro defs
The default `gobuild` macro on CentOS Stream 9 now includes support for
`BUILDTAGS`.

CentOS Stream envs now also define `_user_tmpfilesdir` macro by default.
Both these definitions are no longer needed here.

`libtrust_openssl` buildtag is also set in spec wherever relevant.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-02-10 13:30:14 +00:00
openshift-merge-bot[bot]
e4bfcf9b02
Merge pull request #25258 from openshift-cherrypick-robot/cherry-pick-25252-to-v5.4
[v5.4] Makefile: escape BUILD_ORIGIN properly
2025-02-07 16:36:59 +00:00
Paul Holzinger
18249e10c1 Makefile: escape BUILD_ORIGIN properly
When trying to pass a string with spaces that broke the go command cli
parsing, the full argument must be put in quotes to avoid escaping
issues.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-07 15:28:53 +00:00
openshift-merge-bot[bot]
fcbce3648c
Merge pull request #25249 from openshift-cherrypick-robot/cherry-pick-25245-to-v5.4
[v5.4] rootless: fix hang on s390x
2025-02-06 16:43:29 +00:00
Giuseppe Scrivano
d280feb96c rootless: fix hang on s390x
avoid using the glibc fork() function after using directly the clone()
syscall, as it confuses glibc causing the fork() to hang in some
cases.

The issue has been observed only on s390x, and the fix was confirmed
in the issue discussion.

Closes: https://github.com/containers/podman/issues/25184

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-02-06 15:22:00 +00:00
openshift-merge-bot[bot]
582d7185df
Merge pull request #25225 from mheon/bump_540_rc3
[CI:ALL] Bump to v5.4.0-RC3
2025-02-05 19:00:15 +00:00
Matt Heon
fa263d2cc9 Set Cirrus DEST_BRANCH appropriately to fix CI
Signed-off-by: Matt Heon <mheon@redhat.com>
2025-02-05 08:55:17 -05:00
Matt Heon
0f01f00f03 Bump to v5.4.0-dev
Signed-off-by: Matt Heon <mheon@redhat.com>
2025-02-05 08:55:17 -05:00
Matt Heon
ad54787bf0 Bump to v5.4.0-rc3
Signed-off-by: Matt Heon <mheon@redhat.com>
2025-02-05 08:55:17 -05:00
Matt Heon
6c78bad0dd Update release notes for v5.4.0-rc3
Signed-off-by: Matt Heon <mheon@redhat.com>
2025-02-05 08:55:17 -05:00
Ashley Cui
02eac2979c Add BuildOrigin field to podman info
BuildOrigin is a field that can be set at build time by packagers. This helps us trace how and where the binary was built and installed from, allowing us to see if the issue is due to a specfic installation or a general podman bug. This field shows up in podman version and in podman info when populated. Note that podman info has a new field, Client, that only appears when running podman info using the remote client.

Automatically set the BuildOrigin field when building the macOS pkginstaller to pkginstaller.

Usage: make podman-remote BUILD_ORIGIN="mypackaging"

Signed-off-by: Ashley Cui <acui@redhat.com>
2025-02-04 15:17:24 -05:00
Paul Holzinger
141eae99b8 artifact: only allow single manifest
Allowing for multiple manifest per artifact just makes the code and cli
design harder to work with it. It is not clear how mounting, extracting
or edit on a multi manifest artifact should have worked.

A single manifest should make the code much easier to work with.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-04 15:13:00 -05:00
Paul Holzinger
d5989990d5 test/e2e: improve write/removeConf()
First use proper ginkgo error handling to ensure errors are actually
reported and fail the test. Mark it as helper function to have better
stack traces.

Then use a atomic write function to prevent issues with partial written
files. I think this is causing CI flakes[1].

Lastly fix the file permissions, do not make it world writable and do
not set the executable bit on the file.

[1] https://api.cirrus-ci.com/v1/artifact/task/5985244932734976/html/int-podman-fedora-41-root-host-sqlite.log.html#t--Podman-network-podman-network-ID-test--1

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-04 15:13:00 -05:00
Brent Baude
522f9de9e3 Add --noheading to artifact ls
like images and containers, it could be handy to have a --noheading
option that removes the headings on the output.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-02-04 15:13:00 -05:00
Brent Baude
9e83191c8f Add --no-trunc to artifact ls
added a --no-trunc flag to artifact ls, which follows what images has
done.  by default now, the ls output will have the shortened 12
character digest.  the --no-trunc will output the full digest.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-02-04 15:13:00 -05:00
Brent Baude
4cd76ef27b Add type and annotations to artifact add
podman artifact add now supports two new command line switches.

--type string that describes the type of artifact
--annotation string slice in the form of key=val

These new options allow users to "tag" information in on their artifacts
for any number of purposes down the line

RUN-2446

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-02-04 15:13:00 -05:00