21092 Commits

Author SHA1 Message Date
9e648a1f50 lint: disable testifylint
The new linter testifylint reports way to many issues, although they
look like correct findings it is only a small expected vs actual swap
which should not effect the tests other than a (maybe )confusing
error message.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-20 16:27:46 +02:00
29273cda10 lint: fix warnings found by perfsprint
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-20 16:27:46 +02:00
64f43fed4d lint: fix warnings found by inamedparam
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-20 16:27:41 +02:00
c21f42a4ed lint: fix warnings found by protogetter
features.GetMemTrack() already does all the pointer checks so we can
just use it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-20 16:26:10 +02:00
03947ab031 libpod: skip DBUS_SESSION_BUS_ADDRESS in conmon
commit 7ade9721020468438e822b16ed7a65380cc7fbd2 introduced the change
that caused an issue in crun since it forces the root user session
instead of the system one when DBUS_SESSION_BUS_ADDRESS is set.

I am addressing it in crun, but for the time being, let's also not
pass the variable down to conmon since the assumption is that when
running as root the containers must be created on the system bus.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-10-20 16:06:51 +02:00
e49ed78a40 Merge pull request #20385 from umohnani8/host-net
Use node hostname in kube play when hostNetwork=true
2023-10-20 12:35:45 +00:00
110914d872 Merge pull request #20359 from containers/renovate/common-image-and-storage-deps
fix(deps): update github.com/containers/storage digest to 79aa304
2023-10-20 09:25:49 +00:00
26681c09af Merge pull request #20414 from edsantiago/perlunicode
cirrus setup: special-case perl unicode
2023-10-20 08:27:01 +00:00
37292a10be Merge pull request #20405 from giuseppe/do-not-leak-sessions-with-remote
remote: exec: do not leak session IDs on errors
2023-10-19 20:26:49 +00:00
c1980a6a26 Merge pull request #20409 from Luap99/port-fw
[CI:DOCS] network: document ports and macvlan interaction
2023-10-19 19:48:37 +00:00
85e8aa4e83 Merge pull request #20413 from Luap99/quadlet-cgroupv2
[CI:DOCS] quadlet: document cgroupv2 requirement
2023-10-19 18:45:23 +00:00
936e30f68b Use node hostname in kube play when hostNetwork=true
When the hostNetwork option is set to true in the k8s yaml,
set the pod's hostname to the name of the machine/node as is
done in k8s. Also set the utsns to host.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-10-19 12:22:58 -04:00
bd953fdc71 cirrus setup: special-case perl unicode
Perl is still stuck in the 1980s. Try to override that.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-10-19 09:30:10 -06:00
ca9efb0cda network: document ports and macvlan interaction
The network backend will ignore ports for macvlan and ipvlan networks so
they do not do anything. No warning or error is shown because containers
may be later connected to a bridge network in which case they would be
useful.

Fixes #17927

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-19 17:04:29 +02:00
f2bc638944 quadlet: document cgroupv2 requirement
Units created with quadlet need cgroupv2 in order to work.

Fixes #19365

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-19 16:39:55 +02:00
0b0f128bfb Merge pull request #20410 from containers/renovate/actions-checkout-digest
[skip-ci] Update actions/checkout digest to b4ffde6
2023-10-19 12:44:12 +00:00
e8183e836c [skip-ci] Update actions/checkout digest to b4ffde6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-19 11:14:37 +00:00
1d2589c3f1 Revert "Emergency workaround for CI breakage"
This reverts commit 44ed415b2513f1ee9bd6485b923d3de1e91b9aca.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-10-19 11:34:36 +02:00
f48a706abc remote: exec: do not leak session IDs on errors
commit fa19e1baa27024f8e0078e27254a8cfb6586f9f4 partially introduced
the fix, but was merged too quickly and didn't work with remote.

Introduce a new binding to allow removing a session from the remote
client.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-10-19 11:34:36 +02:00
30b14b33ae Merge pull request #20403 from containers/renovate/k8s.io-kubernetes-1.x
fix(deps): update module k8s.io/kubernetes to v1.28.3
2023-10-19 09:34:09 +00:00
c2e1debe8d Merge pull request #20395 from rhatdan/quadlet
Allow systemd specifiers in User and Group Quadlet keys
2023-10-19 09:28:12 +00:00
ad1ab71b8c fix(deps): update github.com/containers/storage digest to 79aa304
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-19 08:24:49 +00:00
d1086281bb fix(deps): update module k8s.io/kubernetes to v1.28.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-19 07:44:35 +00:00
68636416d7 Merge pull request #20357 from rhatdan/TERM
Add TERM iff TERM not defined in container when podman exec -t
2023-10-18 23:50:41 +00:00
b2192695bc Merge pull request #20406 from edsantiago/systest_bork
System tests: fix broken silence127
2023-10-18 22:16:28 +00:00
4c249a219e Change default QEMU CPU level to qemu64 on Windows amd64
Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
2023-10-19 00:37:09 +03:00
657029da78 System tests: fix broken silence127
Followup to #20394. For years (since BATS 1.5) we've been
seeing and ignoring nasty red warnings at the end of every
system test run. Thanks for fixing it, @giuseppe! But it
broke down in the '?' case when $expected_rc is empty:

   test/system/helpers.bash: line 345: [: -eq: unary operator expected

Simple fix.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-10-18 14:33:25 -06:00
9a29eb05ef Merge pull request #20400 from baude/issue20361
Fix path for omvf vars on Darwin/arm64
2023-10-18 20:07:53 +00:00
b72bb11629 Add TERM iff TERM not defined in container when podman exec -t
Fixes: https://github.com/containers/podman/issues/20334

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-10-18 15:40:52 -04:00
d4086f5ac4 Merge pull request #20404 from edsantiago/emergency_ci_fix
Emergency workaround for CI breakage
2023-10-18 19:24:38 +00:00
6c7104c4fe Merge pull request #20402 from baude/applehvrmstopgvproxy
Kill gvproxy when machine rm -f
2023-10-18 19:18:32 +00:00
44ed415b25 Emergency workaround for CI breakage
Skip new exec-leak test

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-10-18 12:07:55 -06:00
62a81a166a Merge pull request #20383 from Luap99/init-path
use FindInitBinary() for init binary
2023-10-18 17:17:59 +00:00
d4d76479c1 Kill gvproxy when machine rm -f
In applehv, we were not killing gvproxy when stopping via podman machine rm with force.

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-10-18 12:12:23 -05:00
cad4d0ee9f Fix path for omvf vars on Darwin/arm64
On darwin arm64, we need to set the location of the ovmf vars. It should be put into the imageDir (also known as as dataDir).  But because qemu determines the image path late in Init(), the image path is set something like a stream marker.

Fixes #20361

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-10-18 10:40:08 -05:00
c73e99aabe Merge pull request #20397 from edsantiago/cp_test_cleanup
systests: cp test: lots of cleanup
2023-10-18 15:07:45 +00:00
553cfb6b63 Merge pull request #20368 from ygalblum/quadlet-image-name
Quadlet - support ImageName for .image files
2023-10-18 14:08:56 +00:00
aabe5c8aa5 Merge pull request #20394 from giuseppe/cleanup-exec-session-on-errors
exec: do not leak session IDs on errors
2023-10-18 13:52:12 +00:00
02757ab20d Merge pull request #20391 from sstosh/nanocpu-api-test
test/apiv2/20-containers.at: fix NanoCPUs tests on cgroups v1
2023-10-18 13:39:18 +00:00
285718915c Allow systemd specifiers in User and Group Quadlet keys
Replaces: https://github.com/containers/podman/pull/18262

Signed-off-by: Tom Mombourquette <tom@devnode.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-10-18 09:23:35 -04:00
caef657c5b libpod: rename confusing import name
The packge is called slirp4netns and renaming it makes no sense, this
was likely done by accident.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-18 15:14:23 +02:00
efe5e98d06 use FindInitBinary() for init binary
Use the new FindInitBinary() function to lookup the init binary, this
allows the use of helper_binaries_dir in contianers.conf[1]

[NO NEW TESTS NEEDED]

[1] https://github.com/containers/common/issues/1110

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-18 15:14:22 +02:00
1d3ec78e00 vendor latest c/common
Includes init path changes.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-18 15:14:13 +02:00
fa19e1baa2 exec: do not leak session IDs on errors
always cleanup the exec session when the command specified to the
"exec" is not found.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-10-18 15:02:22 +02:00
1efcd1ecfb systests: cp test: lots of cleanup
cp tests flake constantly under VFS (discovered in #20161),
and the way these tests were written makes it very, very hard
to understand failures.

This is a (sorry) hard-to-review cleanup:

 - use distinctive container names, not just "cpcontainer"
 - add distinctive test names (e.g. RUNNING vs CREATED)
 - remove unnecessary code
 - remove --pause=false (option is deprecated and, IIUC, a NOP)
 - clean up some confusing slashes in paths
 - "dot notation" tests:
   - add a comment linking to issue, because that's a weird one
     that makes no sense whatsoever
   - fix tests, because they were actually not testing

This cleanup has been tested repeatedly in 20161, I'm just bringing
it into main because 20161's future is uncertain.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-10-18 06:47:18 -06:00
2d65e57ae6 Define better error message for container name conflicts with external storage.
Updated the error message to suggest user to use --replace option to instruct Podman to replace the existsing external container with a newly created one.

closes #16759

Signed-off-by: Chetan Giradkar <cgiradka@redhat.com>
2023-10-18 12:52:02 +01:00
9b8e01efd6 Quadlet - support ImageName for .image files
Allow overriding the image name resolved from the .image file
Add test and doc

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-10-18 13:43:54 +03:00
ef2392f21c Merge pull request #20381 from vrothberg/fix-20375
image history: fix walking layers
2023-10-18 10:37:48 +00:00
64171043ac test/system: ignore 127 if it is the expected rc
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-10-18 12:24:05 +02:00
a1982c043d Merge pull request #20365 from p-fruck/fix/api-compat-network-connected
fix(API): Catch ErrNetworkConnected for compat
2023-10-18 08:55:31 +00:00