Commit graph

23065 commits

Author SHA1 Message Date
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
Lokesh Mandvekar
5f4acdf227 RPM: podman-iptables.conf only on Fedora
RHEL10 defaults to nftables and doesn't need
/usr/lib/modules-load.d/podman-iptables.conf so this should be Fedora
only.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-07-26 08:22:50 +00:00
openshift-merge-bot[bot]
10c1266f48
Merge pull request #23364 from mheon/bump_520_rc2
[CI:ALL] Bump to v5.2.0-rc2
2024-07-23 11:57:42 +00:00
Matt Heon
11f56fa42c Bump to v5.2.0-dev
Signed-off-by: Matt Heon <mheon@redhat.com>
2024-07-22 14:56:28 -04:00
Matt Heon
716874f44e
Bump to v5.2.0-rc2
Signed-off-by: Matt Heon <mheon@redhat.com>
2024-07-22 14:55:52 -04:00
Matt Heon
d72fefc418 Update release notes for v5.2.0-rc2
Signed-off-by: Matt Heon <mheon@redhat.com>
2024-07-22 14:55:23 -04:00
Matt Heon
579f36a061 Merge current main into v5.2 branch
We want everything from main into the v5.2 branch. We'll consider
ourselves officially branched after v5.2.0-rc2 releases.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-07-22 13:02:35 -04:00
openshift-merge-bot[bot]
dd52a39b21
Merge pull request #23350 from containers/renovate/github.com-vbauerster-mpb-v8-8.x
Update module github.com/vbauerster/mpb/v8 to v8.7.4
2024-07-22 16:42:41 +00:00
openshift-merge-bot[bot]
34e8c1e762
Merge pull request #23354 from rhatdan/quadlet
Add support for StopSignal in quadlet .container files
2024-07-22 15:20:11 +00:00
openshift-merge-bot[bot]
0551b0fb7e
Merge pull request #23339 from Luap99/nc-e2e-flake
test/e2e: fix ncat tests
2024-07-22 12:21:37 +00:00
openshift-merge-bot[bot]
249d042035
Merge pull request #23343 from Luap99/fix-hc-output
libpod: correctly capture healthcheck output
2024-07-22 12:18:34 +00:00
openshift-merge-bot[bot]
139e1791a5
Merge pull request #23345 from Luap99/sqlite-timeout
libpod: add hidden env to set sqlite timeout
2024-07-22 11:53:48 +00:00
Paul Holzinger
5209495865
test/e2e: fix ncat tests
These tests are flaking for unknown reasons. One problem could be ncat
did not bound the port before we connect to it. Simple fix do not use
ncat and just use the golang API to listen on the port without the
extra ncat process. This should be race free in theory.
Also do not run the nc container in the background, we want to see the
errors from the ncat process in the container.

And because both tests do the same thing deduplicate them into one that
just uses a loop to create both tests.

Fixes #23263

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-22 13:42:40 +02:00
Paul Holzinger
b6b61a6a49
libpod: add hidden env to set sqlite timeout
Some users want to experiment with different timeout values.

Fixes #23236

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-22 12:59:00 +02:00
openshift-merge-bot[bot]
d62ef3fb21
Merge pull request #23357 from Luap99/pod-stats-err
podman pod stats: fix race when ctr process exits
2024-07-22 10:45:02 +00:00
Daniel J Walsh
0ecd6fa59f
Add support for StopSignal in quadlet .container files
Fixes: https://github.com/containers/podman/issues/23050

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-07-22 06:43:45 -04:00
Paul Holzinger
55b6e4c3e8
podman pod stats: fix race when ctr process exits
Like commit 55749af0c7 but for podman *pod* stats not the normal podman
stats. We must ignore ErrCtrStopped here as well as this will happen
when the container process exited.

While at it remove a useless argument from the function as it was always
nil and restructure the logic flow to make it easier to read.

Fixes #23334

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-22 10:30:42 +02:00
openshift-merge-bot[bot]
003527fedc
Merge pull request #23254 from arixmkii/disable-mounts
Implement disable default mounts via command line
2024-07-21 10:49:17 +00:00
renovate[bot]
742d29e9d8
Update module github.com/vbauerster/mpb/v8 to v8.7.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-20 15:19:17 +00:00
openshift-merge-bot[bot]
db6f7d5e82
Merge pull request #23341 from Luap99/stats-err
podman stats: fix race when ctr process exists
2024-07-20 10:26:19 +00:00
openshift-merge-bot[bot]
5e47444a9e
Merge pull request #23342 from slp/update-krunkit-0.1.2
Bump bundled krunkit to 0.1.2
2024-07-19 13:40:35 +00:00
Paul Holzinger
5e8884ab0d
libpod: correctly capture healthcheck output
Using the scanner is just unnecessary complicated an buggy as it will
not read the final line with a newline. There is also the problem that
it happens in a separate goroutine so it could loose output if we read
the array before the scanner was done.

The API accepts a Writer so we can just directly use a bytes.Buffer
which captures all output in memory without the need of another
goroutine.

This also means that now we always include the final newline in the
output. I checked with docker and they do the same so this is good.

Fixes #23332

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-19 15:16:55 +02:00
Sergio Lopez
5a7199015a
Bump bundled krunkit to 0.1.2
Bump the bundled krunkit version from 0.1.1 to 0.1.2.

Fixes: #23194

Signed-off-by: Sergio Lopez <slp@redhat.com>
2024-07-19 13:35:49 +02:00
Paul Holzinger
55749af0c7
podman stats: fix race when ctr process exists
stats read from the cgroup, and in order to know the cgroup we check the
pid for the cgroup. However there is a window where the pid exited and
podman did not yet updated its internal state. In this case the code
returns ErrCtrStopped so we should ignore this error as well.

Fixes #23334

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-19 13:21:34 +02:00
openshift-merge-bot[bot]
a3d496ae1f
Merge pull request #23330 from edsantiago/backport-nc-fix
[v5.2] nc -p considered harmful
2024-07-18 18:15:56 +00:00
openshift-merge-bot[bot]
8a53e8eb67
Merge pull request #23323 from Luap99/machine-decompress-empty
pkg/machine/compression: skip decompress bar for empty file
2024-07-18 17:51:11 +00:00
openshift-merge-bot[bot]
164ecb2b5e
Merge pull request #23325 from Luap99/ps-pod-err
podman ps: fix racy pod name query
2024-07-18 17:48:26 +00:00
openshift-merge-bot[bot]
73986f67a3
Merge pull request #23313 from edsantiago/safename-kube-tests
CI: 700-play.bats: huge cleanup, with goal of making parallel-safe
2024-07-18 17:45:40 +00:00
openshift-merge-bot[bot]
ea7ee59571
Merge pull request #23310 from edsantiago/nc-dash-p-considered-harmful
nc -p considered harmful
2024-07-18 17:29:10 +00:00
Ed Santiago
7995e3de53 nc -p considered harmful
nmap-ncat has been downgraded on Fedora, to 7.92.
nc -l -p PORT requires 7.95. Switch to nc -l ADDR PORT.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-07-18 11:28:23 -06:00
openshift-merge-bot[bot]
9f873256b6
Merge pull request #23316 from umohnani8/farm-fix
Fix name for builder in farm connection
2024-07-18 17:26:24 +00:00
openshift-merge-bot[bot]
964b9a25ad
Merge pull request #23326 from Luap99/connection-remove-args
system connection remove: use Args function to validate
2024-07-18 16:42:25 +00:00
Paul Holzinger
182224defb
podman pod stats: fix pod rm race
If a pod is removed when calling podman pod stats there is a race where
the command might fail with no such pod. This is not a user error, like
the ps/ls command skip it and move to the next one.

Fixes #23327

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-18 17:48:21 +02:00
Paul Holzinger
e1caf80e81
podman ps: fix racy pod name query
The pod name was queried without holding the container lock, thus it was
possible that the pod was deleted in the meantime and podman just failed
with "no such pod" as the errors.Is() check matched the wrong error.

Move it into the locked code this should prevent anyone from removing
the pod while the container is part of it. Also fix the returned error,
there is no reason to special case one specific error just wrap any error
here so callers at least know where it happened. However this is not
good enough because the batch doesn't update the state which means it
see everything before the container was locked. In this case it might be
possible the ctr and pod was already removed so let the caller skip both
ctr and pod removed errors.

Fixes #23282

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-18 17:34:26 +02:00
Paul Holzinger
85f4f89810
system connection remove: use Args function to validate
Using the ExactArgs(1) function is better because we have less
duplication of the error text and the ValidArgsFunction uses that to
suggest shell completion. The command before this commit would suggest
connection names even if there was already one arg on the cli set.

However because there is the --all option we still must exclude that
first.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-18 16:37:37 +02:00
openshift-merge-bot[bot]
eecdba4009
Merge pull request #23304 from rhatdan/gpus
Remove references and checks for --gpus
2024-07-18 12:21:10 +00:00
openshift-merge-bot[bot]
22cf2b42d4
Merge pull request #23305 from Luap99/auto-update-race
podman auto-update/system df: fix ErrNoSuchCtr/Volume race
2024-07-18 11:31:46 +00:00
Paul Holzinger
f630eebcfa
pkg/machine/compression: skip decompress bar for empty file
When the file is empty it is possible our code panics as bar.ProxyReader
returns nil when the bar is finished which is the case for 0 size as it
doesn't have to read anything from there. However as this happens on
different goroutines it is race and most of the time still works.

To fix this simply skip the progress bar setup for empty files.

While at it fix the deprecated argument in the tests.

Fixes #23281

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-18 13:23:00 +02:00
Ed Santiago
7100ead475 nc -p considered harmful
nmap-ncat has been downgraded on Fedora, to 7.92.
nc -l -p PORT requires 7.95. Switch to nc -l ADDR PORT.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-07-18 05:15:57 -06:00
openshift-merge-bot[bot]
599967bf9f
Merge pull request #23265 from benniekiss/extended_drop_ins
Expand Quadlet drop-in search paths
2024-07-18 09:49:55 +00:00
openshift-merge-bot[bot]
aaa7138cdb
Merge pull request #23311 from containers/renovate/setuptools-71.x
chore(deps): update dependency setuptools to v71
2024-07-18 09:25:10 +00:00
Paul Holzinger
46f4044893
podman system df: fix fix ErrNoSuchCtr/Volume race
When a container or volume is removed during the loop this is not a
problem and we should just skip it as it is not a user bug and just a
normal race.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-18 10:52:25 +02:00
Paul Holzinger
1413a28409
podman auto-update: fix ErrNoSuchCtr race
If a container is removed during the loop we should just ignore it. No
reason to log this as error to the user.

Fixes #23279

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-18 10:52:12 +02:00
Urvashi Mohnani
02c094425f Fix name for builder in farm connection
Ensure that the map of builders we create links the
builder name and not the farm name to the image engine
of that node. This was a regression introduced during the
farm conf rework.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2024-07-17 22:31:48 -04:00
Ed Santiago
2f7fd64e98 700-play.bats: use unique pod/container/image/volume names
The end goal is making this test file parallel-safe, by:

  1) Having all tests use unique names for all objects; and
  2) Not doing "rm -a" or "expect ps to be empty".

This commit is not enough to make tests parallel-safe. The
rest of the changes are not relevant for now. This set of
changes is _necessary_ for parallelizing, and is _meaningful_
(good practice) for current linear-testing podman without
introducing any unnecessary cruft.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-07-17 18:24:07 -06:00
Ed Santiago
380ed3a40d safename: consistent within same test, and, dashes
Make safename() invocations consistent within the same
test. This puts the onus on the caller to add a unique
element when calling multiple times, e.g. "ctr1-$(safename)".
This is not too much of a burden. Major benefit is making
it easy for a reader to associate containers, pods, volumes,
images within a given test.

And, use dashes, not underscores. "podman generate kube"
removes underscores, making it very difficult to do
things like "podman inspect $podname" (because we need
to generate "$podname_with_underscores_removed")

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-07-17 18:24:07 -06:00
Ed Santiago
6d01ce417d 700-kube.bats: refactor $PODMAN_TMPDIR/test.yaml
Many instances. Simplify by having _write_test_yaml() define
the variable TESTYAML and make it available to callers.
Global replace, with care taken to undo any instances
where _write_test_yaml() is not invoked first.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-07-17 18:24:07 -06:00
Ed Santiago
987d15a378 700-play.bats: eliminate $testYaml
Get rid of the last two instances of the clunky $testYaml
writing, by adding a 'volume=' arg to _write_test_yaml()

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-07-17 18:24:07 -06:00
Ed Santiago
48aea083c0 700-play.bats: refactor clumsy yamlfile creation
Remnant from the very early days of this test file. There's
a boilerplate $testYaml string used in many tests; each
use requires three clunky lines of prep. Most of those
were not needed; we can (and now do) use _write_test_yaml()
instead.

There are still two instances that could not be fixed in
this commit. I will do those next. This commit is kept
relatively simple for ease of review.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-07-17 18:24:07 -06:00
Ed Santiago
517c6e6f10 700-play.bats: move _write_test_yaml up near top
This is almost a NOP; it's needed for making subsequent commits
reviewable.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-07-17 18:24:07 -06:00