20964 Commits

Author SHA1 Message Date
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
074a0de7f9 Merge pull request #20388 from cevich/cross_target_comment
[CI:DOCS] Add cross-build target info.
2023-10-18 08:41:06 +00:00
c65d1c02b9 test/apiv2/20-containers.at: fix NanoCPUs tests on cgroups v1
* rootful: NanoCpus needs to set more than 10000000 on cgroups v1.
* rootless: Resource limits that include NanoCPUs are not supported and ignored.

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2023-10-18 16:56:18 +09:00
6624ccb4b1 Merge pull request #20384 from Luap99/double-netns
libpod: restart+userns cleanup netns correctly
2023-10-18 07:47:02 +00:00
9394171cbb Merge pull request #20387 from Luap99/machine-doc
[CI:DOCS] machine set: document --rootful better
2023-10-18 07:45:06 +00:00
831844b596 image history: fix walking layers
libimage did not walk thte layers correctly which was probably
inherited by old Podman code.  Fix that by vendoring in the
corresponding changes in c/common.

Fixes: #20375
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-10-18 09:19:24 +02:00
ad53190253 fix(api): Ensure compatibality for network connect
When trying to connect a container to a network and the connection
already exists, an error should only be raised if the container is
already running (or is in the `ContainerStateCreated` transition)
to mimic the behavior of Docker as described here:
https://github.com/containers/podman/pull/15516#issuecomment-1229265942
For running and connected containers 403 is returned which fixes #20365

Signed-off-by: Philipp Fruck <dev@p-fruck.de>
2023-10-17 22:56:32 +02:00
b0a45a905b Merge pull request #20366 from ygalblum/quadlet-kube-down-force
Quadlet - add support for KubeDownForce
2023-10-17 19:50:45 +00:00
91264e7d2e Merge pull request #19586 from rhatdan/ps
Fix output of podman --remote top
2023-10-17 19:12:27 +00:00
c909afb883 Merge pull request #20239 from jackgris/docker-api-error-response
fix: pull error response docker rest api compatibility
2023-10-17 18:51:37 +00:00
e0561301c9 [CI:DOCS] Add cross-build target info.
In case a future maintainer asks "why" all these weird looking
four-letter architectures are present here and in CI.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-10-17 14:23:21 -04:00
dc705d3702 machine set: document --rootful better
If you change this option all the containers disappear from the default
connection and socket. Thus it is required to recreate the resources.
Sharing between root and rootless is not possible for various reasons.

Fixes #19936

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-17 18:09:13 +02:00
bbd6281ecc libpod: restart+userns cleanup netns correctly
When a userns and netns is used we need to let the runtime create the
netns otherwise the netns is not owned by the right userns and thus
the capabilities would not be correct.

The current restart logic tries to reuse the netns which is fine if no
userns is used but when one is used we setup a new netns (which is
correct) but forgot to cleanup the old netns. This resulted in leaked
network namespaces and because no teardown was ever called leaked ipam
assignments, thus a quickly restarting container will run out of ip
space very fast.

Fixes #18615

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-17 17:25:50 +02:00
3b6a4ac37a Minor log and doc fixes
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-10-17 14:43:02 +03:00
f875ae3176 Quadlet man page - discuss volume removal explicitly
Co-authored-by: Valentin Rothberg <vrothberg@redhat.com>
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-10-17 14:43:02 +03:00
5d5facbd79 Quadlet - add support for KubeDownForce
Allow users to set --force for Stop command
Add doc and tests

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-10-17 14:43:01 +03:00
5853e2bee9 Merge pull request #20363 from ygalblum/quadlet-kube-oneshot-test
System Test - Quadlet kube oneshot
2023-10-17 10:53:40 +00:00
6ba67ba96c System Test - Quadlet kube oneshot
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-10-17 11:15:11 +03:00
206177c592 Merge pull request #20376 from edsantiago/buildah_tests
buildah-bud: test relative TMPDIR
2023-10-17 04:50:10 +00:00
ae707b58d8 Merge pull request #20338 from umohnani8/vendor-common
Update common and buildah vendor
2023-10-17 04:48:17 +00:00
9637fed2fd Fix output of podman --remote top
Allow users to specify

podman-remote top $cid -eo "pid comm"
or
podman-remote top $cid -eo pid,comm

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

didid#	new file:   test/system/085-top.bats

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-10-16 17:25:10 -04:00
acc7a94dfc Merge pull request #20235 from rhatdan/read-only
Fix handling of --read-only-tmpfs flag
2023-10-16 21:22:53 +00:00
dcb421bc5b buildah-bud: test relative TMPDIR
(buildah PR 5084). Should actually have been added as a bud.bats
test in that PR, but I didn't catch it in time.

Also, remove an obsolete bud-tests skip

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-10-16 14:11:35 -06:00
c8604081e8 Fix handling of --read-only-tmpfs flag
Fixes: https://github.com/containers/podman/issues/20225

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-10-16 14:18:55 -04:00
1b0be2f348 Vendor common and buildah main
Update the common and buildah vendor to pull in the
platform code move.

[NO NEW TESTS NEEDED]

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-10-16 13:35:29 -04:00
dabf6c83a7 Merge pull request #20367 from flouthoc/bump-and-test-buildah
buildah: bump to `v1.32.1-0.20231012130144-244170240d85` and test builds with relative `TMPDIR`
2023-10-16 14:44:18 +00:00
091d83d3c9 Merge pull request #20360 from containers/renovate/github.com-vbauerster-mpb-v8-8.x
fix(deps): update module github.com/vbauerster/mpb/v8 to v8.6.2
2023-10-16 12:57:30 +00:00
5db3b753af remote,build: wire unsetlabels
Signed-off-by: Aditya R <arajan@redhat.com>
2023-10-16 15:34:02 +05:30
331e47acb1 test: build with TMPDIR as relative
Test edge-case described here: https://github.com/containers/buildah/pull/5084
Test case in: RHEL-2598

Signed-off-by: Aditya R <arajan@redhat.com>
2023-10-16 14:02:31 +05:30