Commit Graph

6094 Commits

Author SHA1 Message Date
Toshiki Sonoda 2e57746ffd test/apiv2: adapt apiv2 test on cgroups v1 environment
Some apiv2 tests are now support on cgroups v1 environment.

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2023-10-24 11:52:03 +09:00
Ed Santiago c3ba0221ec ginkgo setup: retry cache pulls
Because all registries flake.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-10-23 19:29:18 -06:00
openshift-ci[bot] 83f07729c8
Merge pull request #20454 from containers/renovate/github.com-vbatts-git-validation-1.x
fix(deps): update module github.com/vbatts/git-validation to v1.2.1
2023-10-23 20:42:12 +00:00
openshift-ci[bot] 3abf5c9291
Merge pull request #20452 from edsantiago/cache_k8s_pause
CI: stop using registry.k8s.io
2023-10-23 20:39:08 +00:00
Daniel J Walsh ee60708880
Support size option when creating tmpfs volumes
Fixes: https://github.com/containers/podman/issues/20449

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-10-23 16:31:54 -04:00
Ed Santiago 85cc4092fc CI: stop using registry.k8s.io
It's flaky.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-10-23 11:50:41 -06:00
renovate[bot] a8e1a5ed1b
fix(deps): update module github.com/vbatts/git-validation to v1.2.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-23 17:03:31 +00:00
Paul Holzinger 6d99cb5cd6
test fixes for c/common tag chnages
Tag now does a prepend internally instead of append with the names. Thus
the order changed which needs some test changes.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-23 15:45:46 +02:00
openshift-ci[bot] 19c870da0d
Merge pull request #20425 from giuseppe/podman-do-not-leak-DBUS_SESSION_BUS_ADDRESS-into-conmon
libpod: skip DBUS_SESSION_BUS_ADDRESS in conmon
2023-10-21 18:36:02 +00:00
Paul Holzinger 29273cda10
lint: fix warnings found by perfsprint
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-20 16:27:46 +02:00
Giuseppe Scrivano 03947ab031
libpod: skip DBUS_SESSION_BUS_ADDRESS in conmon
commit 7ade972102 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
openshift-ci[bot] 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
openshift-ci[bot] 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
Urvashi Mohnani 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
Giuseppe Scrivano 1d2589c3f1
Revert "Emergency workaround for CI breakage"
This reverts commit 44ed415b25.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-10-19 11:34:36 +02:00
openshift-ci[bot] 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
openshift-ci[bot] 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
Ed Santiago 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
Daniel J Walsh 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
Ed Santiago 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
openshift-ci[bot] c73e99aabe
Merge pull request #20397 from edsantiago/cp_test_cleanup
systests: cp test: lots of cleanup
2023-10-18 15:07:45 +00:00
openshift-ci[bot] 553cfb6b63
Merge pull request #20368 from ygalblum/quadlet-image-name
Quadlet - support ImageName for .image files
2023-10-18 14:08:56 +00:00
openshift-ci[bot] 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
openshift-ci[bot] 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
Daniel J Walsh 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
Giuseppe Scrivano 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
Ed Santiago 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
Chetan Giradkar 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
Ygal Blum 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
openshift-ci[bot] ef2392f21c
Merge pull request #20381 from vrothberg/fix-20375
image history: fix walking layers
2023-10-18 10:37:48 +00:00
Giuseppe Scrivano 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
openshift-ci[bot] 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
Toshiki Sonoda 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
openshift-ci[bot] 6624ccb4b1
Merge pull request #20384 from Luap99/double-netns
libpod: restart+userns cleanup netns correctly
2023-10-18 07:47:02 +00:00
Valentin Rothberg 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
Philipp Fruck 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
openshift-ci[bot] b0a45a905b
Merge pull request #20366 from ygalblum/quadlet-kube-down-force
Quadlet - add support for KubeDownForce
2023-10-17 19:50:45 +00:00
openshift-ci[bot] 91264e7d2e
Merge pull request #19586 from rhatdan/ps
Fix output of podman --remote top
2023-10-17 19:12:27 +00:00
openshift-ci[bot] 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
Paul Holzinger 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
Ygal Blum 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
openshift-ci[bot] 5853e2bee9
Merge pull request #20363 from ygalblum/quadlet-kube-oneshot-test
System Test - Quadlet kube oneshot
2023-10-17 10:53:40 +00:00
Ygal Blum 6ba67ba96c System Test - Quadlet kube oneshot
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-10-17 11:15:11 +03:00
openshift-ci[bot] 206177c592
Merge pull request #20376 from edsantiago/buildah_tests
buildah-bud: test relative TMPDIR
2023-10-17 04:50:10 +00:00
Daniel J Walsh 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
Ed Santiago 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
Daniel J Walsh 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
Aditya R 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
Gabriel Pozo b9f2c4d171 fix: pull error response docker rest api compatibility
This is related to the issue #20013

Signed-off-by: Gabriel Pozo <jackgris2@gmail.com>
2023-10-13 20:19:18 -03:00
Brent Baude 29f5c563e4 Show client info even if remote connection fails
When people report issues, we often ask for the result of `podman info`.
However, if the problem is the remote connection, it will error out with
no information at all.  This PR at least will report client information
before disclosing the connection error.  For example on Windows:

> .\bin\windows\podman.exe info
client:
  OS: windows/amd64
  provider: hyperv
  version: 4.8.0-dev
  host: null

Satisfies: RUN-1720

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-10-13 08:53:56 -05:00
openshift-ci[bot] e4ef271376
Merge pull request #20347 from Luap99/healthcheck-event
healthcheck: make sure to always show health_status events
2023-10-12 18:15:58 +00:00
Paul Holzinger 99a14332ef
healthcheck: make sure to always show health_status events
This fixes a regression caused by commit 7e6e267329, unfortunately this
was not caught during review as for some reason this works fine rootless
and only fails as root.

Because we set the systemd log level to notice in order to hide the unit
started/stopped messages to prevent spamming the journal the issue is
that this now also causes systemd to ignore the events we write to
journald as we also send them as info level.

To fix this we simply send health_status events now on notice level. I
decided against sending all events on notice as I think info is fine for
them. Whenever the notice level is right is of course debatable but
given it may contain the unhealthy message I think having this a notice
should be ok.

The main reason this made it through testing is because we do not rely
on the systemd unit to fire healthchecks in the tests as this is flaky.
There is one test were we rely on it though and I added a check there
to make sure events are displayed correctly when trigger via systemd.

Fixes #20342

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-12 15:02:32 +02:00
Ygal Blum 702f155288 Quadlet - support oneshot .kube files
Allow users to manually set the Service Type
Add test
Update README

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-10-11 18:56:29 +03:00
openshift-ci[bot] d437ca8fdc
Merge pull request #20328 from vrothberg/RUN-1936
api: add `compatMode` parameter to libpod's pull endpoint
2023-10-11 13:48:13 +00:00
Valentin Rothberg 8b46e852ef api: add `compatMode` paramenter to libpod's pull endpoint
Add a new `compatMode` parameter to libpod's pull endpoint. If set, the
streamed JSON payload is identical to the one of the Docker compat
endpoint and allows for a smooth integration into existing tooling such
as podman-py and Podman Desktop, some of which already have code for
rendering the compat progress data.

We may add a libpod-specific parameter in the future which will stream
differnt progress data.

Fixes: issues.redhat.com/browse/RUN-1936?
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-10-11 10:58:05 +02:00
renovate[bot] 40f8976536
fix(deps): update module github.com/cpuguy83/go-md2man/v2 to v2.0.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-10 19:11:10 +00:00
Paul Holzinger 29ae516006
use sqlite as default database
Use sqlite as default but for upgrades it will still use boltdb to avoid
breaking anyone. This is done by checking if the boltdb file already
exists and if it does then we have to use it.

I added a e2e test to check the new logic and removed the system test
for it, the problem with the system test is that we share the storage
dir there so all following commands without --db-backend would try to
use boltdb as a single --db-backend boltdb command will create the file
and then all folllwing commands will use it because of the backwards
compat. In e2e tests each test uses their own --root so it is not an
issue there.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-10 17:11:28 +02:00
Urvashi Mohnani d18369ee88 Check for image with /libpod/containers/create
The libpod containers create endpoint wasn't checking whether
the image existed before creating the container. If the image
doesn't exist, it should return a 404 status code but it was
failing and returning a 500 status code.
This fix matches the behavior of the compat endpoint.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-10-09 13:07:24 -04:00
renovate[bot] 787b1b25c7
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.13.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-09 13:26:51 +00:00
openshift-ci[bot] b2c5418fb7
Merge pull request #20288 from albnnc/fix/do-not-ignore-external-containerfiles
fix: don't ignore containerfiles outside of build context
2023-10-09 13:25:29 +00:00
openshift-ci[bot] 6e7e87503c
Merge pull request #20253 from ygalblum/quadlet-command-args
Quadlet - add support for global arguments
2023-10-09 09:01:36 +00:00
Ygal Blum d321d427dc Quadlet - add support for global arguments
Add support for adding podman level arguments before subcommand
Add specific key for Containers Conf Modules
Global arguments are added for both start and stop commands
Adjust testing environment
Add tests
Add to man page

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-10-08 10:14:06 +03:00
openshift-ci[bot] e9d6ffa8f0
Merge pull request #20252 from vrothberg/privileged
containers.conf: add `privileged` field to containers table
2023-10-07 11:34:45 +00:00
Aleksei Kosyrev 732cec794e Add system test
Signed-off-by: Aleksei Kosyrev <albnnc@gmail.com>
2023-10-07 10:55:51 +03:00
renovate[bot] 10aa390684
fix(deps): update module golang.org/x/tools to v0.14.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-06 14:03:02 +00:00
Valentin Rothberg 362eca6691 containers.conf: add `privileged` field to containers table
As requested in containers/podman/issues/20000, add a `privileged` field
to the containers table in containers.conf.  I was hesitant to add such
a field at first (for security reasons) but I understand that such a
field can come in handy when using modules - certain workloads require a
privileged container.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-10-05 20:14:18 +02:00
openshift-ci[bot] 4a67d22765
Merge pull request #20256 from Luap99/revert-env
Revert --env-file changes
2023-10-05 01:41:59 +00:00
openshift-ci[bot] 3b39d4b082
Merge pull request #20132 from cgiradkar/Issue-17856
Change log level for health_check
2023-10-04 17:59:32 +00:00
Paul Holzinger 1b3cedbf31
test/system: --env-file test fixes
Now that the newline env file change is reverted we have to adapt the
tests.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-04 18:18:18 +02:00
Chetan Giradkar 7e6e267329 Filter health_check and exec events for logging in console
Podman server logs are mostly full of healthcheck output, making them hard to navigate. Hence, made healthcheck service to run with LogLevelMax=notice, this would remove the normal output, inclusive the started/stopped messages from systemd itself.

Fixes #17856

Signed-off-by: Chetan Giradkar <cgiradka@redhat.com>
2023-10-04 14:50:15 +01:00
Aditya R b576b79329
test, manifest: test push retry
Test: https://github.com/containers/common/pull/1666

Signed-off-by: Aditya R <arajan@redhat.com>
2023-10-03 20:38:02 +05:30
openshift-ci[bot] fe828d2238
Merge pull request #20192 from umohnani8/images
Fix broken podman images filters
2023-10-02 17:49:40 +00:00
OpenShift Merge Robot bbd9590b47
Merge pull request #20194 from umohnani8/kube-mode
Add DefaultMode to kube play
2023-10-02 03:52:34 -04:00
Ygal Blum 979c77f10e Volume create - fast exit when ignore is set and volume exists
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-10-01 16:54:24 +03:00
Urvashi Mohnani 17cebb3ff8 Add DefaultMode to kube play
Add support for DefaultMode for configMaps and secrets.
This allows users to set the file permissions for files
created with their volume mounts. Adheres to k8s defaults.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-09-29 11:58:38 -04:00
Urvashi Mohnani ba788c1bb8 Fix broken podman images filters
The id, digest, and intermediate filters were broken
for podman images. Fix to match on substrings instead of
the whole string for id and digest. Add the intermediate value
correctly when set.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-09-29 11:39:49 -04:00
OpenShift Merge Robot d602038c2b
Merge pull request #20189 from giuseppe/run--replace-print-only-cid
podman: run --replace prints only the new container id
2023-09-28 21:11:44 -04:00
Giuseppe Scrivano f21c1d238d
podman: run --replace prints only the new container id
print only the new container ID when using --replace instead of the
terminated container ID if it was stopped.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-09-28 23:32:27 +02:00
Ed Santiago 2b9c0555f4 CI VMs: bump to f39 + f38
...from f38 + f37.

Requires one minor e2e test change, to handle an error logging
change in conmon 2.1.8.

Also, this is important, requires crun-1.9.1 because of a kernel
symlink change; see https://github.com/containers/crun/pull/1309
The VM images here were carefully built to include that. By the
time the next VM images get built, it should be default.

Since we've bumped crun, remove two obsolete skips

And, skip a flaky pasta test, #20170

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-28 11:22:58 -06:00
OpenShift Merge Robot c9730e2329
Merge pull request #20149 from ygalblum/quadlet-container-mount
Quadlet container mount - support non key=val options
2023-09-28 05:38:52 -04:00
OpenShift Merge Robot 46a1e25eb2
Merge pull request #20176 from edsantiago/e2e_check_stderr__more
e2e: ExitCleanly(): the final step
2023-09-28 03:37:26 -04:00
OpenShift Merge Robot 4212b4998d
Merge pull request #19823 from Backfighter/fix-17028
Fix all ports exposed on host by kube play
2023-09-28 03:29:43 -04:00
Ed Santiago ccb7da52c1 e2e: ExitCleanly(): manual special cases
Commit 2 of 2: individual special-case handling of tests
which did not pass under ExitCleanly(), one or more of:

 - add "-q" to commit & push commands
 - add ErrorToString() checks
 - remove unnecessary ErrorToString() checks

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-27 16:04:59 -06:00
Ed Santiago 611db19b31 e2e: ExitCleanly(): the final fron^Wcommit
Final push on RUN-1907. Commit 1 of 2.

This is the final set of test/e2e/*_test.go files to be
converted from Exit(0) to ExitCleanly().

This commit is a mix of automated string-replace with
manual revert-back: tests that did not pass with ExitCleanly()
are reverted back to Exit(0), so they will not show up as
diffs in this commit. When possible, I address those in
my next commit.

My goal was to make this commit a don't-bother-reviewing one
that will also pass tests (so as not to break git-bisect).
The next commit is the important one to review.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-27 16:04:59 -06:00
Wolfgang Pross bfbd0c8960 move IntelRdtClosID to HostConfig
Signed-off-by: Wolfgang Pross <wolfgang.pross@intel.com>
2023-09-27 16:44:13 +00:00
Wolfgang Pross 24b2f829b9 Add test for Intel RDT support
Signed-off-by: Wolfgang Pross <wolfgang.pross@intel.com>
2023-09-27 16:44:13 +00:00
Ygal Blum f0eb456678 Quadlet container mount - support non key=val options
Some keys, e.g. ro do not have values.
The current implementation crashed looking for the = sign

Externalize findMountType in a new package
Parse mount command using FindMountType
Rebuild parameter string using csv

Add test case and adjust the test framework

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-09-27 16:20:00 +03:00
Paul Holzinger 0b5ea1e6ec
test/e2e: default to netavark
When you run e2e tests locally they use CNI unless the NETWORK_BACKEND
env was set to netavark. Because our main focus is on netavark we should
test it by default.

For local tests this should help to prevent CNI/netavark conflicts as I
assume most systems where people run tests on are on netavark by now.

For  CI testing we hardcode NETWORK_BACKEND there to test both netavark
(on current fedora) and CNI (prior fedora). MAke sure to switch the
logic in the CI setup to reflect that.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-09-27 13:30:20 +02:00
OpenShift Merge Robot 35824b647c
Merge pull request #20148 from vrothberg/conmon-env
libpod: pass entire environment to conmon
2023-09-27 05:10:55 -04:00
Valentin Rothberg 7ade972102 libpod: pass entire environment to conmon
Pass the _entire_ environment to conmon instead of selectively enabling
only specific variables.  The main reasoning is to make sure that conmon
and the podman-cleanup callback process operate in the exact same
environment than the initial podman process.  Some configuration files
may be passed via environment variables.  Podman not passing those down
to conmon has led to subtle and hard to debug issues in the past, so
passing all down will avoid such kinds of issues in the future.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-09-26 16:48:52 +02:00
Ed Santiago e4b7455b72 e2e: ExitCleanly(): manual fixes to get tests working
Commit 2 of 2: fixes to get tests passing

Mostly reverting back to Exit(0) on tests that produce stderr,
adding stderr checks when those are missing.

One pretty big exception: "run check dns" test was completely
broken in many respects. It should never have worked under CNI,
but was passing because nslookup in that alpine image was
checking /etc/hosts. This has been fixed in subsequent alpine
images, which we're now using in this test (CITEST_IMAGE).

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-26 08:47:16 -06:00
Ed Santiago dbd946a932 e2e: ExitCleanly(): a few more
Commit 1 of 2: automated string replace Exit(0) -> ExitCleanly()

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-26 08:47:16 -06:00
OpenShift Merge Robot 97a02a0362
Merge pull request #20130 from edsantiago/fedoraminimal_safe
e2e: use safe fedora-minimal image
2023-09-25 12:47:19 -04:00
OpenShift Merge Robot 2fef4c7ab8
Merge pull request #20088 from vrothberg/fix-19938
fix handling of static/volume dir
2023-09-25 12:29:58 -04:00
Ed Santiago ffd67cf75d e2e: use safe fedora-minimal image
PR #20082 bumped fedora-minimal, from f34 to f39. This worked
fine for a few days, then all of a sudden CI started breaking
because the f39 minimal image got rebuilt and repushed without
adduser. #20127 was an emergency fix; this is a stabler fix.

We keep using not-under-our-control container images, and we
keep getting burned when those get updated in nasty ways. Here
we switch to using a tagged & versioned fedora-minimal image
that is under our control.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-25 09:01:53 -06:00
Valentin Rothberg 59e295f2a3 podman build: correct default pull policy
The default pull policy is "missing" not "always".

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-09-25 16:28:53 +02:00
Valentin Rothberg 6293ec2e2d fix handling of static/volume dir
The processing and setting of the static and volume directories was
scattered across the code base (including c/common) leading to subtle
errors that surfaced in #19938.

There were multiple issues that I try to summarize below:

 - c/common loaded the graphroot from c/storage to set the defaults for
   static and volume dir.  That ignored Podman's --root flag and
   surfaced in #19938 and other bugs.  c/common does not set the
   defaults anymore which gives Podman the ability to detect when the
   user/admin configured a custom directory (not empty value).

 - When parsing the CLI, Podman (ab)uses containers.conf structures to
   set the defaults but also to override them in case the user specified
   a flag.  The --root flag overrode the static dir which is wrong and
   broke a couple of use cases.  Now there is a dedicated field for in
   the "PodmanConfig" which also includes a containers.conf struct.

 - The defaults for static and volume dir and now being set correctly
   and adhere to --root.

 - The CONTAINERS_CONF_OVERRIDE env variable has not been passed to the
   cleanup process.  I believe that _all_ env variables should be passed
   to conmon to avoid such subtle bugs.

Overall I find that the code and logic is scattered and hard to
understand and follow.  I refrained from larger refactorings as I really
just want to get #19938 fixed and then go back to other priorities.

https://github.com/containers/common/pull/1659 broke three pkg/machine
tests.  Those have been commented out until getting fixed.

Fixes: #19938
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-09-25 14:14:30 +02:00
OpenShift Merge Robot 919564e1ae
Merge pull request #20127 from vrothberg/fix-20119
unbreak CI: useradd not found
2023-09-25 08:10:24 -04:00
Valentin Rothberg 26b5b1dd3c unbreak CI: useradd not found
The fedora minimal 39 image has been updated on the fedora registry and
removed the `useradd` binary.  Since we were pulling by tag and not by
digest, updates to images outside of our control always entail a certain
risk - and now it bit us.

To fix it, try to move as many users of `useradd` to _our_ CITEST_IMAGE
and migrate the code where necessary to this Alpine-based tooling.
However, the Alpine-based `adduser` binary (not useradd!) doesn't work
well when being executed as a non-root user and will just error out.
Hence, move the fedora minimal image back to version 34 which is still
including the `useradd` binary.

Ultimately, all images on public registries should be pulled via digest
to make sure we pin them down.  I refrain from doing this now to make
sure we can cherry-pick this PR to older branches and get things back
into a working state ASAP.

Fixes: #20119
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-09-25 11:48:35 +02:00
OpenShift Merge Robot f41d536f19
Merge pull request #20089 from edsantiago/e2e_check_stderr__more
e2e: ExitCleanly(): a few more
2023-09-25 04:12:35 -04:00
Peter Werner f52b02f406 Fix all ports exposed by kube play
Container ports defined with containerPort were exposed by default
even though kubernetes interprets them as mostly informative.
Closes #17028

Signed-off-by: Peter Werner <wpw.peter@gmail.com>
2023-09-23 19:53:46 +02:00
Urvashi Mohnani e0b44bcf37 Fix farm update to check for connections
Fix farm update to verify a connection exists before
removing or adding it.
Also verify that the farm we want to update exists.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-09-22 15:16:21 -04:00
Paul Holzinger af2665c28a
pod rm: do not log error if anonymous volume is still used
This is not really an error, if the anonymous volume is still used then
this likely means it was transferred to another container with
--volumes-from. This is what the user wants and it is not like the user
can act on the logged error anyway. Once the last user of the volume is
removed it will be removed correctly.

see https://github.com/containers/podman/pull/19637

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-09-22 14:44:14 +02:00
Ed Santiago 4916f7d771 e2e: ExitCleanly(): manual fixes to get tests passing
Commit 2 of 2: steps to make tests work under ExitCleanly()

Mostly adding "-q" to push/pull, but also:

 - revert ExitCleanly(), and add error-message checks
   if absent;

 - fix a test that was completely nonfunctional from
   Day One: test was getting skipped because registry
   couldn't start, because of missing ":z"s in mount option.
   Fixed, and removed the bypass;

 - use built-in skopeo, not pulled-container skopeo. Skopeo
   is already a requirement for system tests.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-22 06:10:02 -06:00
Ed Santiago 8e743fa1dd e2e: ExitCleanly(): a few more
Commit 1 of 2: automated string replace Exit(0) -> ExitCleanly()

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-22 06:05:27 -06:00
OpenShift Merge Robot da6ebeb511
Merge pull request #20086 from giuseppe/fix-mount-cgroupfs-without-netns
specgen, rootless: fix mount of cgroup without a netns
2023-09-22 05:08:12 -04:00
OpenShift Merge Robot 8576a36f4c
Merge pull request #20083 from giuseppe/fix-shared-propagation-test
test: fix rootless propagation test
2023-09-22 04:10:07 -04:00
Giuseppe Scrivano 83b6975d10
test: fix rootless propagation test
the test works only when the user owns the outer mount namespace,
which is likely not the case when running in rootless mode.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-09-21 21:33:27 +02:00
OpenShift Merge Robot aa152a7796
Merge pull request #20082 from giuseppe/test-update-fedora-minimal
test: update fedoraMinimal version
2023-09-21 13:19:39 -04:00
Giuseppe Scrivano 682ca6b2ea
test: update fedoraMinimal version
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-09-21 15:40:21 +02:00
Giuseppe Scrivano 8d3010d06b
specgen, rootless: fix mount of cgroup without a netns
commit cf364703fc changed the way
/sys/fs/cgroup is mounted when there is not a netns and it now honors
the ro flag.  The mount was created using a bind mount that is a
problem when using a cgroup namespace, fix that by mounting a fresh
cgroup file system.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-09-21 13:20:09 +02:00
Daniel J Walsh 39ba5ff24b
Automatically remove anonymous volumes when removing a container
If you are running a quadlet with anonymous volumes, then the volume
will leak ever time you restart the service.  This change will
cause the volume to be removed.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-09-21 07:08:08 -04:00
OpenShift Merge Robot e209c40ad6
Merge pull request #20071 from edsantiago/e2e_check_stderr__kubegen
e2e: ExitCleanly(): generate_kube_test.go
2023-09-21 05:25:31 -04:00
Ed Santiago c69873d674 e2e: ExitCleanly(): generate_kube_test.go
Commit 3 of 3: make tests pass.

This is the tricky one requiring manual effort. For the most part,
all I did was replace ALPINE/"alpine" with CITEST_IMAGE so we
don't get "Pulling..." messages. Also added warning-message checks
to two truncation tests

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-20 14:41:41 -06:00
Ed Santiago 841cfa8026 e2e: generate kube -> kube generate
Commit 2 of 3:
 - rewrite all but one commands, from "generate kube" to "kube g".
 - remove "podman generate kube" from all It()s.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-20 14:39:08 -06:00
Ed Santiago d1f86d524b e2e: ExitCleanly(): generate_kube_test.go
Commit 1 of 3: automated string replace of Exit(0) -> ExitCleanly()

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-20 14:38:45 -06:00
Ed Santiago 62e13bec70 e2e: ExitCleanly(): Fixes for breaking tests
Commit 3 of 3, and this one's a doozy. Sorry.

The main problem was that "kube play" re-pulled images.
To solve that, I changed PullPolicy to "missing" and,
where possible, replaced alpine/busybox with CITEST_IMAGE
because that one seems to be cached better? I couldn't
figure out why, but even without the PullPolicy change
everything worked better with CITEST_IMAGE. And it's
a better image to use anyway.

Other lesser changes (like adding "-q") as needed.

Also:
 - in four tests that use "replica", we can't use ExitCleanly()
   because of a run-time warning. Add a check for that warning.
 - remove a workaround for a long-closed issue (c/storage 1232)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-20 11:42:04 -06:00
Ed Santiago 09c3ac48fc play kube -> kube play
Commit 2 of 3:
 - rewrite all commands but one, from "play kube" to "kube play".
   Considered renaming the file but no, maybe later.
 - remove "podman play kube" from all It()s. "Podman kube play" is
   already in the Description; unnecessary redundancy is unnecessary.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-20 11:34:56 -06:00
Ed Santiago e83ced8a03 e2e: ExitCleanly(): play_kube_test.go
Commit 1 of 3: automated string replace of Exit(0) -> ExitCleanly()

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-20 11:34:25 -06:00
OpenShift Merge Robot 639eb52c89
Merge pull request #20062 from vrothberg/syslog-fix
pass --syslog to the cleanup process
2023-09-20 11:57:33 -04:00
Valentin Rothberg 4652a2623f pass --syslog to the cleanup process
The --syslog flag has not been passed to the cleanup process (i.e.,
conmon's exit args) complicating debugging quite a bit.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-09-20 15:37:07 +02:00
OpenShift Merge Robot 370937d6c1
Merge pull request #20057 from vrothberg/fix-auto-update-test
fix --authfile auto-update test
2023-09-20 15:05:51 +02:00
OpenShift Merge Robot 8f17ac5c17
Merge pull request #19997 from cgiradkar/Issue_15588
Change priority for cli flags for remotely operating Podman
2023-09-20 14:53:35 +02:00
Valentin Rothberg 1cbe692ded fix --authfile auto-update test
The test started to fail in gating and on workstations.  It turned out
that pushing the test image to the registry recompresses it which in
turn may change the digest.  The digest now started to change; computing
it depends on the toolchain so the test passed before by pure luck it
seems.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-09-20 13:46:15 +02:00
OpenShift Merge Robot e80d9b7f85
Merge pull request #20036 from edsantiago/bats_check_stderr
systests: tighter checks for unwanted warnings
2023-09-20 12:25:20 +02:00
Chetan Giradkar 8c95aa4021 Change priority for cli-flags for remotely operating Podman
cli flags couldn't override the active-destination when env variables were set. As a remedy, the precedence of cli flags has been changed.

Signed-off-by: Chetan Giradkar <cgiradka@redhat.com>
2023-09-20 10:49:33 +01:00
OpenShift Merge Robot 07f8d4451a
Merge pull request #20048 from edsantiago/e2e_check_stderr__more
e2e: ExitCleanly(): more low-hanging fruit
2023-09-20 10:25:11 +02:00
Ed Santiago 0ac98176be e2e: ExitCleanly(): more low-hanging fruit
Commit 2 of 2: minor tweaks to get tests passing

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-19 18:09:08 -06:00
Ed Santiago a50fb7e061 e2e: ExitCleanly(): more low-hanging fruit
Commit 1 of 2.

More easy ones: test files that either work with ExitCleanly()
or require very, very simple tweaks.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-19 18:09:08 -06:00
renovate[bot] 1908663f1e
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.12.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-19 23:00:33 +00:00
Ed Santiago ff07abea47 systests: tighter checks for unwanted warnings
Part of RUN-1906.

Followup to #19878 (check stderr in system tests): allow_warnings()
and require_warning() functions to make sure no unexpected messages
fall through the cracks.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-19 15:22:58 -06:00
Ed Santiago 4fca726f7b e2e: ExitCleanly(): low-hanging fruit, part 2
Commit 2 of 2: manual tweaks to get tests passing. Very trivial,
the vast majority of these test files worked with no changes.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-19 10:26:06 -06:00
Ed Santiago 64c46c4297 e2e: ExitCleanly(): low-hanging fruit, part 1
Continuing work on RUN-1907: huge set of files, but not
as intimidating as it looks.

Commit 1 of 2: mindless replace of Exit(0) with ExitCleanly()

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-19 10:26:06 -06:00
Ed Santiago aec58f515e systests: clean up after tests; fix missing path in logs
Followup to #20016:
- remove obsolete (misleading) comment
- prune dangling <none>:<none> image

Also, in kube test, rmi pause_image to avoid nasty red warnings

Also, ouch, fix a stupid that I introduced in #19878: the PODMAN
command path got dropped from log messages.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-19 08:40:13 -06:00
OpenShift Merge Robot 63219d617e
Merge pull request #20016 from flouthoc/test-rmi-wo-layer
test: rmi should work with images w/o layers
2023-09-19 14:15:15 +02:00
OpenShift Merge Robot 5f3a5408e4
Merge pull request #20026 from ygalblum/quadlet-image-test-fixes
Quadlet Image test - rearrange test function
2023-09-19 13:51:40 +02:00
Aditya R e68e37136a
fix, test: rmi should work with images w/o layers
Signed-off-by: Aditya R <arajan@redhat.com>
2023-09-19 14:48:26 +05:30
Ygal Blum 50a685bd1e Quadlet Image test - rearrange test function
Move all variable definitions to the top of the function
Remove unneeded prints

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-09-19 10:40:46 +03:00
Ed Santiago e6cf09b68f e2e: continuing ExitCleanly() work: manual tweaks
Commit 2 of 2: the changes needed to get tests to pass

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-18 16:51:05 -06:00
Ed Santiago d78221545c e2e: continuing ExitCleanly() work
Commit 1 of 2: simple replace of Exit(0) with ExitCleanly()

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-18 13:09:43 -06:00
OpenShift Merge Robot c5851976bb
Merge pull request #20014 from vrothberg/containers.conf-env-host
--env-host: use default from containers.conf
2023-09-18 20:55:45 +02:00
OpenShift Merge Robot 1d7efcbe20
Merge pull request #19912 from ygalblum/quadlet-unit-image
Quadlet - add support for .image units
2023-09-18 17:50:17 +02:00
OpenShift Merge Robot 81ddf48869
Merge pull request #20012 from vrothberg/module-parsing
error when --module is specified on the command level
2023-09-18 16:40:49 +02:00
OpenShift Merge Robot 5be2357a50
Merge pull request #19917 from afbjorklund/unix-url
Use url with scheme and path for the unix address
2023-09-18 16:38:01 +02:00
Ygal Blum 55ca571e55 Quadlet - add support for .image units
main
----
Use order number to order the units processing
Process .image file
Usage of .image file should not log Ambiguous Name warning
Use AmbiguousName for .volume and .image units

Quadlet
-------
Convert .image files
Add driver and Image keys to .volume files
Handle usage of .image as Image

Man Page
--------
Add comments for new keys in .volume file
Add comment about using .image files as images
Add section about .image units

Tests
-----
Add integration tests
Add system test

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
Co-authored-by: Tom Sweeney <tsweeney@redhat.com>
2023-09-18 16:26:18 +03:00
Valentin Rothberg 41beb53744 --env-host: use default from containers.conf
As found while working on #20000, the `--env-host` flag should use the
default from containers.conf.  Add a new "supported fields" test to the
system tests to make sure we have a goto test for catching such
regressions.  I suspect more flags to not use the defaults from
containers.conf.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-09-18 14:47:43 +02:00
Valentin Rothberg 0b7142f4a4 error when --module is specified on the command level
The --module can only be parsed on the root level.  It cannot work on
the command level, because it must be "manually" parsed on init() to
make sure the specified configuration files/modules are loaded prior to
parsing the flags via Cobra.

Hence move --module from the "persistent" to the "local" flags which
will yield an error instead of doing nothing when being specified on the
command level:

```
$ ./bin/podman run --module=foo.conf --rm alpine
Error: unknown flag: --module
See 'podman run --help'
```

Reported in #20000.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-09-18 13:52:38 +02:00
OpenShift Merge Robot 5dc4370d91
Merge pull request #19911 from xtexChooser/xtex/impl-container-label-not
Add label! filter to container filters
2023-09-17 13:47:23 +02:00
xtex 98e6dda697
Add label! filter and tests to containers and pods
Thanks to Ed Santiago <santiago@redhat.com> for tests.

Signed-off-by: xtex <xtexchooser@duck.com>
2023-09-16 18:46:33 +08:00
Ed Santiago 075cf22547 e2e: ExitCleanly(): manual test fixes
Commit 2 of 2: manual fixes to get tests to pass

Mostly adding "-q" to pull & push. In a few places that's
not possible, so revert to Exit(0) with stderr checks.

We do a *LOT* of image pulling! In a desperate attempt
to fix that, change some instances of ALPINE to CITEST_IMAGE.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-14 10:12:44 -06:00
Ed Santiago db5adca734 e2e: continuing ExitCleanly(): just the replacements
Commit 1 of 2: simple replace of Exit(0) with ExitCleanly()

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-14 10:12:44 -06:00
OpenShift Merge Robot 61b9a38bd0
Merge pull request #19956 from rhatdan/ulimit
Add support for Ulimit in quadlet
2023-09-14 15:24:42 +02:00
OpenShift Merge Robot 1e43fae5ad
Merge pull request #19873 from rst0git/update-checkpointctl
vendor: update github.com/checkpoint-restore/checkpointctl to 1.1.0
2023-09-14 15:22:02 +02:00
Daniel J Walsh 522e0f43f4
Add support for Ulimit in quadlet
QM needs to be able to specify the maximum number of open files within the QM
environment to ensure FFI.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-09-14 06:17:43 -04:00
Daniel J Walsh b1e3e8d972
Run codespell on code
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-09-14 06:13:23 -04:00
OpenShift Merge Robot 88b415e341
Merge pull request #19955 from rhatdan/quadlet
Add support for PidsLimit in quadlet
2023-09-14 11:48:03 +02:00
OpenShift Merge Robot 18561f26ad
Merge pull request #19958 from ryanhockstad/main
Add DNS fields to Container and Network unit groups
2023-09-14 00:55:34 +02:00
OpenShift Merge Robot e3ea6bf2f9
Merge pull request #19954 from edsantiago/e2e_check_stderr__diff
e2e: diff_test: use ExitCleanly()
2023-09-13 22:25:58 +02:00
Daniel J Walsh 4ed3273f68
Add support for PidsLimit in quadlet
QM needs to be able to specify the maximum number of PIDs within the QM
environment to ensure FFI.
Picking a total of 10,000 Pids might be a rasonable constraint on the
QM.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-09-13 14:32:35 -04:00
ryanhockstad 883612eff3
Merge branch 'containers:main' into main 2023-09-13 14:23:16 -04:00
OpenShift Merge Robot 7d6722bd69
Merge pull request #19957 from edsantiago/e2e_check_stderr__create
e2e: create_test: use ExitCleanly()
2023-09-13 20:07:29 +02:00
Ryan Hockstad 70560f9168 Add DNS fields to Container and Network unit groups
Signed-off-by: Ryan Hockstad <ryanhockstad@gmail.com>
2023-09-13 13:16:53 -04:00
Ed Santiago df011f4377 e2e: more ExitCleanly(): manual test fixes
Commit 2 of 2: manual fixes to get tests to pass.

Mostly adding "-q", but in some cases reverting back to Exit(0)
with progress-message checks.

Plus, fix a typo in an error message

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-12 21:07:11 -06:00
Ed Santiago cb1cb338c0 e2e: more ExitCleanly(): dumb string replacements
Ongoing steps toward RUN-1907: replace Exit(0) with ExitCleanly()

Commit 1 of 2: simple automated string-replace, plus fixes
to includes.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-12 19:16:18 -06:00
Ed Santiago 62ac96e125 e2e: create_test: use ExitCleanly()
Ongoing steps toward RUN-1907: replace Exit(0) with ExitCleanly()

Several manual fixes for tests that broke:

 1. (the usual case): add "-q" to podman-create or -pull; or

 2. Revert back to Expect(Exit(0)), and add stderr checks for
    progress messages

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-12 15:42:14 -06:00
Ed Santiago b0f77acd12 e2e: diff_test: use ExitCleanly()
Ongoing steps toward RUN-1907: replace Exit(0) with ExitCleanly()

One manual fix: adding -q to podman commit, to avoid progress messages

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-12 13:47:35 -06:00
Ed Santiago eefaa512af e2e: more ExitCleanly(): low-hanging fruit
Ongoing steps toward RUN-1907: replace Exit(0) with ExitCleanly()

A handful of test files with trivial command-line replacement,
and no manual muckery (aside from includes).

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-12 06:21:00 -06:00
Anders F Björklund 6f4f941373 Add test for legacy address without two slashes
It is perfectly valid to have only scheme and path (no "authority"),
but unfortunately it doesn't work with external clients like Docker.

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2023-09-12 10:42:27 +02:00
OpenShift Merge Robot 7da91addc8
Merge pull request #19579 from danishprakash/generate-daemonset-support
kube: add DaemonSet support for generate
2023-09-12 10:16:03 +02:00
OpenShift Merge Robot 91f3f3a523
Merge pull request #19924 from edsantiago/e2e_check_stderr__commit
e2e: commit_test: use ExitCleanly()
2023-09-12 09:55:02 +02:00
Radostin Stoyanov 9b17d6cb06
vendor: update checkpointctl to v1.1.0
Signed-off-by: Radostin Stoyanov <radostin@redhat.com>
2023-09-12 08:41:02 +01:00
danishprakash cdcf18b862
kube: add DaemonSet support for generate
Signed-off-by: danishprakash <danish.prakash@suse.com>
2023-09-12 10:30:57 +05:30
OpenShift Merge Robot 22003cbb8c
Merge pull request #19923 from edsantiago/e2e_check_stderr__cleanup
e2e: use ExitCleanly() in cleanup_test.go
2023-09-11 21:04:53 +02:00
OpenShift Merge Robot cbb955811c
Merge pull request #19245 from mheon/fix_19237
Ensure HC events fire after logs are written
2023-09-11 19:47:37 +02:00
OpenShift Merge Robot 5e8c75e4a9
Merge pull request #19926 from edsantiago/e2e_check_stderr__clone
e2e: container_clone_test.go: use ExitCleanly()
2023-09-11 19:32:08 +02:00
OpenShift Merge Robot 325736fcb7
Merge pull request #19914 from umohnani8/term
Add support for kube TerminationGracePeriodSeconds
2023-09-11 19:24:18 +02:00
Giuseppe Scrivano 19bd9b33dd
libpod: move oom_score_adj clamp to init
commit 8b4a79a744 introduced
oom_score_adj clamping when the container oom_score_adj value is lower
than the current one in a rootless environment.  Move the check to
init() time so it is performed every time the container starts and not
only when it is created.  It is more robust if the oom_score_adj value
is changed for the current user session.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-09-11 17:04:37 +02:00
Ed Santiago 4f017236ef e2e: commit_test: use ExitCleanly()
Ongoing steps toward RUN-1907: replace Exit(0) with ExitCleanly()

Clean command-line replace, but required adding "-q" (quiet)
to all commit commands. Except one, on which I added tests
for the expected progress messages.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-11 08:07:24 -06:00
Ed Santiago 3a4be5e904 e2e: container_clone_test.go: use ExitCleanly()
Ongoing steps toward RUN-1907: replace Exit(0) with ExitCleanly()

Clean command-line replace, with manual tweaks to two tests:

 * clone to a pod: revert to just Exit(0), because podman issues
   a namespace warning

 * --destroy --force : run "top" in container, not default (shell),
   to avoid the 10-second SIGKILL fallback warning

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-11 07:59:32 -06:00
Ed Santiago 8cb14e54a5 e2e: use ExitCleanly() in cleanup_test.go
Ongoing steps toward RUN-1907: replace Exit(0) with ExitCleanly()

Clean command-line replace.

Also, fix up the Containerized and Debian exceptions in matcher.
I was in a huge rush Thursday night when I added the Debian
exception. This, I hope, makes it slightly easier to understand
the cases where we don't check stderr.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-11 06:33:18 -06:00
Matt Heon 925794c6aa Ensure HC events fire after logs are written
HC events were firing as part of the `exec` call, before it had
even been decided whether the HC succeeded or failed. As such,
the status was not going to be correct any time there was a
change (e.g. the first event after a container went healthy to
unhealthy would still read healthy). Move the event into the
actual Healthcheck function and throw it in a defer to make sure
it happens at the very end, after logs are written.

Ignores several conditions that did not log previously (container
in question does not have a healthcheck, or an internal failure
that should not really happen).

Still not a perfect solution. This relies on the HC log being
written, when instead we could just get the status straight from
the function writing the event - so if we fail to write the log,
we can still report a bad status. But if the log wasn't written,
we're in bad shape regardless - `podman ps` would disagree with
the event written, for example.

Fixes #19237

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-09-11 08:02:46 -04:00
Anders F Björklund 336055fe3b Use url with scheme and path for the unix address
Shortcuts like unix:path and unix:/path do not work everywhere,
so make sure to use unix://path when quoting the url (or address)

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2023-09-11 07:55:12 +02:00
Daniel J Walsh 8acd66c115
Merge pull request #19888 from giuseppe/fix-pod-lifecycle
fix pod cgroup lifecycle
2023-09-10 20:36:21 -04:00
Urvashi Mohnani d9a85466a0 Add support for kube TerminationGracePeriodSeconds
Add support to kube play to support the TerminationGracePeriodSeconds
fiels by sending the value of that to podman's stopTimeout.
Add support to kube generate to generate TerminationGracePeriodSeconds
if stopTimeout is set for a container (will ignore podman's default).

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-09-10 16:41:24 -04:00
Daniel J Walsh 92bdd912b2
Merge pull request #19891 from edsantiago/run_rmi_warn
run --rmi: "cannot remove" is a warning, not an error
2023-09-09 10:20:49 -04:00
Giuseppe Scrivano fbbad04398
pod: fix duplicate volumes from containers.conf
If some volumes are specified in containers.conf, they are currently
added twice to the containers spec causing the container to fail:

$ head -n2 ~/.config/containers/containers.conf
[containers]
volumes = ["/tmp:/tmp"]
$ podman pod create --name foo
7ac7f97f9b74a596332483e4a13e58cb9c8d997e9c5baae46804ae0acc26cbc6
$ podman run --pod=foo alpine true
Error: "/tmp": duplicate mount destination

The fix is to ignore the setting from containers.conf when setting the
pod default configuration.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-09-08 16:02:55 +02:00
Giuseppe Scrivano 0c75eac637
tests: add test for pod cgroups
This test checks that the pod cgroups are created and that the limits
set for a pod cgroup are enforced also after a reboot.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-09-08 14:58:48 +02:00
Daniel J Walsh f8e1ec731e
Merge pull request #19897 from edsantiago/e2e_check_stderr_checkpoint
e2e: use ExitCleanly() in checkpoint tests
2023-09-08 06:57:57 -04:00
Daniel J Walsh 6ee8f73d41
Merge pull request #19885 from rhatdan/kube
Add support for kube  securityContext.procMount
2023-09-08 06:56:05 -04:00
Ed Santiago 65bddfcd25 e2e: use ExitCleanly() in checkpoint tests
Ongoing steps toward RUN-1907: replace Exit(0) with ExitCleanly()

Clean command-line replace, with one manual reversion (commented)

And -- duh! -- skip the stderr check on Debian!

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-07 20:20:28 -06:00
Ed Santiago 59bd6a74a0 run --rmi: "cannot remove" is a warning, not an error
When the "rmi" part of "run --rmi" fails due to image being in use
by another container (or for any reason, actually), issue a warning
message, not an error.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-07 14:30:22 -06:00
Ed Santiago 70cf9740f1 StopContainer: display signal num when name unknown
Under some circumstances podman tries to kill a container
using signal 37, for which unix.SignalName() returns "".
Not helpful. So, when that happens, show "(signal number)".

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-07 14:13:14 -06:00
Ed Santiago 6f913f5f37 URGENT: fix broken CI
PR #19878 (checking for warnings in system tests) broke upgrade tests.

Reason: my long-ago "optimization" in which, if a PR touches only
tests in X, do not run tests in Y. Unfortunately, upgrade tests
rely on code in the system-test directory. I don't know if this
is fixable; nor if it's an acceptable tradeoff. Please discuss.

Sorry, everyone.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-07 14:05:30 -06:00
OpenShift Merge Robot e546aebb32
Merge pull request #19889 from vrothberg/restart-kill
podman: don't restart after kill
2023-09-07 21:28:17 +02:00
OpenShift Merge Robot 0c72726f01
Merge pull request #19878 from edsantiago/bats_check_stderr
sys tests: run_podman: check for unwanted warnings/errors
2023-09-07 17:26:59 +02:00
OpenShift Merge Robot 16f2dd36bb
Merge pull request #19887 from rhatdan/kube1
Tmpfs should not be mounted noexec
2023-09-07 16:19:24 +02:00
Daniel J Walsh b83485022d
Add support for kube securityContext\.procMount
Fixes: https://github.com/containers/podman/issues/19881

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-09-07 09:49:11 -04:00
Valentin Rothberg 589867d716 podman: don't restart after kill
Also add a new `StoppedByUser` field to the container-inspect state
which can be useful during debugging and is now also used in the
regression test.  Note that I moved the `false` check one test above
such that we can compare the previous Podman version which should just
be stuck in the `wait $ctr` command since it will continue restarting.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-09-07 15:18:02 +02:00
Daniel J Walsh 2d7d8d1d10
Tmpfs should not be mounted noexec
The logic here makes little sense, basically the /tmp and /var/tmp are
always set noexec, while /run is not.  I don't see a reason to set any
of the three noexec by default.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-09-07 08:06:55 -04:00
Ed Santiago c2575f726d sys tests: run_podman: check for unwanted warnings/errors
With few exceptions, commands that exit 0 should not emit any
messages with level=warning or =error. Let's start enforcing
that in run_podman.

Allow one-off exceptions, typically when we're testing an
actual warning condition (usual case: "podman stop" where it
times out to SIGKILL). Exceptions are specified via:

    run_podman 0+w subcommand...
               ^^^---- or, rarely, 0+e

"0" stands for "expect exit status 0", which is the default
so it's implicit anyway. The +w / +e (or even +we) is the
new part. I have added it to tests where necessary.

And, because life is what it is, add two global exceptions:

  - Debian. Because runc has too many flakes.
  - kube. Ditto. Kube commands emit lots of nasty error
    messages (yes, level=error) that don't seem to affect
    results.

Similar to #18442

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-07 05:35:21 -06:00
OpenShift Merge Robot c17c190f89
Merge pull request #19882 from edsantiago/e2e_exitcleanly
e2e: use ExitCleanly() in attach & build tests
2023-09-07 12:27:05 +02:00
renovate[bot] 1211518e82
chore(deps): update dependency setuptools to ~=68.2.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-07 02:07:32 +00:00
Ed Santiago 465150f10c e2e: use ExitCleanly() in attach & build tests
Small steps toward RUN-1907: replace Exit(0) with ExitCleanly()
in ginkgo tests in two test files. Also, when practical,
replace ALPINE with CITEST_IMAGE.

There are still many thousands of instances left to fix. I will
be submitting in reviewable chunks.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-06 17:11:38 -06:00
OpenShift Merge Robot af17ddaeed
Merge pull request #19871 from giuseppe/accept-empty-capabilities
security: accept empty capabilities list
2023-09-06 17:16:52 +02:00
Giuseppe Scrivano 30abd7f1af
security: accept empty capabilities list
allow the image to specify an empty list of capabilities, currently
podman chokes when the io.containers.capabilities specified in an
image does not contain at least one capability.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-09-06 14:55:28 +02:00
Ed Santiago c32cfb1d01 systests: random_free_port: fix EADDRINUSE flake
Fixes infrequent but annoying flake in which system tests
call random_free_port(), get a nice-looking port, then
fail with "bind: address already in use".

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-06 06:10:40 -06:00
OpenShift Merge Robot 1004f53d04
Merge pull request #19864 from containers/renovate/golang.org-x-tools-0.x
fix(deps): update module golang.org/x/tools to v0.13.0
2023-09-06 10:05:44 +02:00
renovate[bot] f9fd402210
fix(deps): update module golang.org/x/tools to v0.13.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-05 20:48:58 +00:00
Ed Santiago fdf694fcff systests: manifest zstd test: lots of tiny cleanups
Primarily, build test images FROM scratch, not alpine, to
avoid image pulls and network flakes and potential pull-
the-rug-out errors if the base alpine image changes.

This was much more complicated than it should've been,
because creating unique arch-specific FROM-scratch images
triggered a weird manifest bug, filed as #19860.

Also:
- add a teardown() to clean up manifests
- remove test for skopeo (skopeo is required for sys tests)
- remove unnecessary intermediate tmpdir
- deduplicate, by looping over amd+arm
- fix indentation
- and, finally, clean up dangling images (this was the initial
  reason behind my diving in here. Such a simple thing, I thought.)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-09-05 11:36:29 -06:00
Giuseppe Scrivano 8b4a79a744
linux, rootless: clamp oom_score_adj if it is too low
when running rootless, if the specified oom_score_adj for the
container process is lower than the current value, clamp it to the
current value and print a warning.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-09-04 14:44:14 +02:00
OpenShift Merge Robot 99a5347c6d
Merge pull request #19816 from giuseppe/fix-parsing-base
libpod: do not parse --hostuser in base 8
2023-09-01 08:55:28 +02:00
Giuseppe Scrivano 702709a916
libpod: do not parse --hostuser in base 8
fix the parsing of --hostuser to treat the input in base 10.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-08-31 12:34:58 +02:00
OpenShift Merge Robot 77fe460d13
Merge pull request #19805 from vrothberg/fix-19801
kube play: fix pull policy
2023-08-31 11:10:35 +02:00
OpenShift Merge Robot 779bc49967
Merge pull request #19802 from edsantiago/e2e_exit_cleanly_matcher
e2e: new ExitCleanly matcher
2023-08-31 10:49:26 +02:00
OpenShift Merge Robot e5ab4fbc52
Merge pull request #19810 from edsantiago/bats_cleanup
system tests: housekeeping: various small fixes
2023-08-30 22:19:43 +02:00
OpenShift Merge Robot bd7579a62a
Merge pull request #19806 from vrothberg/vendor-common
vendor containers/common@12405381ff
2023-08-30 22:14:35 +02:00
OpenShift Merge Robot 4051a8a23f
Merge pull request #19790 from flouthoc/conf_add_compression
manifest,push: support `add_compression` from `containers.conf`
2023-08-30 22:11:57 +02:00
Ed Santiago a0738e7e68 system tests: housekeeping: various small fixes
Fix unquoted string vars. Something like this:

   is $output "what we expect"

...will fail with a misleading error message if $output is "".

Also fix typos in a diagnostic; this was causing unhelpful message
on failure

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-08-30 10:06:16 -06:00
Ed Santiago 4082b67f6e CI: e2e: first use of new ExitCleanly() matcher
A nearly-trivial first effort to use the new ExitCleanly().
Requires using the new CITEST_IMAGE (see prior commit)
because nginx causes the tests to fail:

   [FAILED] Unexpected warnings seen on stderr: \
            level=warning \
            msg="HEALTHCHECK is not supported for OCI image format ...

Oh, I also took the liberty of rewriting "play kube" -> "kube play".

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-08-30 08:41:25 -06:00
Ed Santiago 6cbd17c0f4 CI: e2e: new ginkgo matcher, ExitCleanly()
Combined test for (exitcode == 0) && (nothing on stderr).
Returns more useful diagnostic messages than the default:

  old: Expected N to equal 0

  new: Command failed with exit status N
  new: Unexpected warnings seen on stderr: "...."

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-08-30 08:41:23 -06:00
Ed Santiago da1246d587 CI: e2e: fetch the standard system-test image
Finally, after so many years, let's start using testimage:YYYYMMDD.
Use it in place of LABELS_IMAGE, which nothing/nowhere was using.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-08-30 08:11:43 -06:00
Valentin Rothberg d20b5869f8 kube play: fix pull policy
Use the `newer` pull policy only for the "latest" tag and default to
using `missing` otherwise.  This speeds up `kube play` as it'll skip
reaching out to the registry and also fixes other side-effects described
in #19801.

Fixes: #19801
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-08-30 13:49:49 +02:00
Valentin Rothberg e66c04c1f7 vendor containers/common@12405381ff
When pulling from an OCI source, make sure to preseve the optional name.
For instance, a podman pull oci:/tmp/foo:quay.io/foo/bar:latest should
pull the image and name it quay.io/foo/bar:latest.

While at it, also fix a bug when pulling an OCI without the optional
name. Previously, we used the path to name the image which will error in
most cases due to invalid characters (e.g., capital ones). Hence, apply
the same trick as for the dir transport and generate a sha.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-08-30 13:20:35 +02:00
OpenShift Merge Robot e73e585f5d
Merge pull request #18713 from zeehio/feat-gidmap-improvements
Mapping improvements to add additional groups
2023-08-30 12:50:10 +02:00
Aditya R b95ae3b4a3
manifest,push: support add_compression from containers.conf
Use `add_compression` field from `containers.conf` if found instead and
`CLI` field `--add-compression` is not set.

Signed-off-by: Aditya R <arajan@redhat.com>
2023-08-29 20:57:50 +05:30
OpenShift Merge Robot 29f4572f9f
Merge pull request #19783 from mtrmac/ManifestListData-no-deps
Update c/common to remove a dependency on libimage
2023-08-29 14:44:59 +02:00
OpenShift Merge Robot 94969a063a
Merge pull request #19768 from chnrxn/patch-1
/_ping handler: return OSType http header
2023-08-29 13:25:18 +02:00
Miloslav Trmač a3c2d6ad2e Remove a dependency on libimage from pkg/bindings
... by updating for a c/common API change.

[NO NEW TESTS NEEDED]: Only moves unchanged code,
should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-08-29 12:45:55 +02:00
Sergio Oller 91b8bc7f13 uid/gid mapping flags
Motivation
===========

This feature aims to make --uidmap and --gidmap easier to use, especially in rootless podman setups.

(I will focus here on the --gidmap option, although the same applies for --uidmap.)

In rootless podman, the user namespace mapping happens in two steps, through an intermediate mapping.

See https://docs.podman.io/en/latest/markdown/podman-run.1.html#uidmap-container-uid-from-uid-amount
for further detail, here is a summary:

First the user GID is mapped to 0 (root), and all subordinate GIDs (defined at /etc/subgid, and
usually >100000) are mapped starting at 1.

One way to customize the mapping is through the `--gidmap` option, that maps that intermediate mapping
to the final mapping that will be seen by the container.

As an example, let's say we have as main GID the group 1000, and we also belong to the additional GID 2000,
that we want to make accessible inside the container.

We first ask the sysadmin to subordinate the group to us, by adding "$user:2000:1" to /etc/subgid.

Then we need to use --gidmap to specify that we want to map GID 2000 into some GID inside the container.

And here is the first trouble:

Since the --gidmap option operates on the intermediate mapping, we first need to figure out where has
podman placed our GID 2000 in that intermediate mapping using:

    podman unshare cat /proc/self/gid_map

Then, we may see that GID 2000 was mapped to intermediate GID 5. So our --gidmap option should include:

    --gidmap 20000:5:1

This intermediate mapping may change in the future if further groups are subordinated to us (or we stop
having its subordination), so we are forced to verify the mapping with
`podman unshare cat /proc/self/gid_map` every time, and parse it if we want to script it.

**The first usability improvement** we agreed on #18333 is to be able to use:

    --gidmap 20000:@2000:1

so podman does this lookup in the parent user namespace for us.

But this is only part of the problem. We must specify a **full** gidmap and not only what we want:

    --gidmap 0:0:5 --gidmap 5:6:15000 --gidmap 20000:5:1

This is becoming complicated. We had to break the gidmap at 5, because the intermediate 5 had to
be mapped to another value (20000), and then we had to keep mapping all other subordinate ids... up to
close to the maximum number of subordinate ids that we have (or some reasonable value). This is hard
to explain to someone who does not understand how the mappings work internally.

To simplify this, **the second usability improvement** is to be able to use:

   --gidmap "+20000:@2000:1"

where the plus flag (`+`) states that the given mapping should extend any previous/default mapping,
overriding any previous conflicting assignment.

Podman will set that mapping and fill the rest of mapped gids with all other subordinated gids, leading
to the same (or an equivalent) full gidmap that we were specifying before.

One final usability improvement related to this is the following:

By default, when podman  gets a --gidmap argument but not a --uidmap argument, it copies the mapping.
This is convenient in many scenarios, since usually subordinated uids and gids are assigned in chunks
simultaneously, and the subordinated IDs in /etc/subuid and /etc/subgid for a given user match.

For scenarios with additional subordinated GIDs, this map copying is annoying, since it forces the user
to provide a --uidmap, to prevent the copy from being made. This means, that when the user wants:

    --gidmap 0:0:5 --gidmap 5:6:15000 --gidmap 20000:5:1

The user has to include a uidmap as well:

    --gidmap 0:0:5 --gidmap 5:6:15000 --gidmap 20000:5:1 --uidmap 0:0:65000

making everything even harder to understand without proper context.

For this reason, besides the "+" flag, we introduce the "u" and "g" flags. Those flags applied to a
mapping tell podman that the mapping should only apply to users or groups, and ignored otherwise.

Therefore we can use:

   --gidmap "+g20000:@2000:1"

So the mapping only applies to groups and is ignored for uidmaps. If no "u" nor "g" flag is assigned
podman assumes the mapping applies to both users and groups as before, so we preserve backwards compatibility.

Co-authored-by: Tom Sweeney <tsweeney@redhat.com>
Signed-off-by: Sergio Oller <sergioller@gmail.com>
2023-08-28 20:21:04 +02:00
OpenShift Merge Robot 8bda49608f
Merge pull request #19696 from Luap99/api-stream-format
api docs: document stream format
2023-08-28 19:43:24 +02:00
OpenShift Merge Robot ef4ca8b2f0
Merge pull request #19762 from ygalblum/kube-support-list
Kube - support List documents
2023-08-28 19:37:57 +02:00
OpenShift Merge Robot 5c1760a2b2
Merge pull request #19775 from edsantiago/another_kube_play_logs_race
e2e: fix race condition (kube play + logs)
2023-08-28 18:27:41 +02:00
OpenShift Merge Robot dd2ec7c613
Merge pull request #19640 from flouthoc/force-compression
push/manifest-push: add support for `--force-compression` to prevent reusing other blobs
2023-08-28 16:49:31 +02:00
chnrxn 1b45fd7239 /_ping handler: return OSType http header
The docker client expects to read the OSType header from the `/_ping` response in order to determine the OS type of the server, for example, when running `docker run --device=/dev/fuse ...`

https://github.com/moby/moby/blob/master/client/ping.go#L57

Signed-off-by: chnrxn <cohawk@yahoo.com>
2023-08-28 22:28:16 +08:00
Ed Santiago 2dbb0b0966 e2e: fix race condition (kube play + logs)
The usual bug that we always seem to forget about: "kube play"
needs "podman wait" before we can "podman logs". (And, reminder,
"kube play --wait" is worthless because it destroys containers).

Reference: #18074, the original PR that fixed a bunch of these flakes.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-08-28 08:17:35 -06:00
Ygal Blum 7ef97fa49e Kube - support List documents
Flatten List into documents
Add List type to meta/v1
Add unittest
Add e2e test

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-08-28 15:22:59 +03:00
Valentin Rothberg 346e5e52e2 kube down/play --replace: handle absent objects
Make sure that `kube down` and `kube play --replace` do not error out
when an object does not exist (or has already been removed).  Such kind
of teardown should not be treated as an ordinary `rm` but as an
`rm --ignore`.  It's purpose it to make sure that all objects in a YAML
are removed; even if they existed only partially.

Fixes: #19711
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-08-28 13:13:40 +02:00
Aditya R 0938ee1899
push, manifest-push: --force-compression must be true with --compression-format
Value of `--force-compression` should be already `true` is
`--compression-format` is selected otherwise let users decide.

Signed-off-by: Aditya R <arajan@redhat.com>
2023-08-28 16:41:13 +05:30
OpenShift Merge Robot 4ff21cf1ac
Merge pull request #19568 from umohnani8/infra-name
Add infra-name annotations to kube gen/play
2023-08-25 15:23:47 +02:00
OpenShift Merge Robot e916b4e376
Merge pull request #19714 from rhatdan/umask
podman exec should set umask to match container
2023-08-25 14:52:55 +02:00
OpenShift Merge Robot 584c1e70d0
Merge pull request #19704 from rhatdan/timeout
Set StopTimeout for compat API if not set by client
2023-08-25 05:28:26 -04:00
OpenShift Merge Robot c2bb278a11
Merge pull request #19741 from edsantiago/wait_for_file_content
system tests: try to fix sdnotify flakes
2023-08-25 05:18:08 -04:00
OpenShift Merge Robot 15d2ef84c0
Merge pull request #19644 from vrothberg/server-notify
system service: unset NOTIFY_SOCKET
2023-08-25 04:55:00 -04:00
Ed Santiago d898ae7f9c system tests: try to fix sdnotify flakes
Unexplained infrequent flakes in sdnotify system tests,
waiting for READY=1.

Hypothesis: race condition between the container sending
the READY string and that string making it through conmon
and socat into the log file.

Solution: don't just check once; keep trying in a loop.
Write a reusable wait_for_file_content() helper function,
and clean up a bunch more tests as long as we're at it.

Fixes: #19724

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-08-24 14:24:57 -06:00
OpenShift Merge Robot 0322b9df9d
Merge pull request #19733 from edsantiago/registry_282
e2e tests: use registry:2.8.2 (was 2.8)
2023-08-24 14:04:11 -04:00
Daniel J Walsh f32e954b8a
Set StopTimeout for service-container started under podman kube play
Fixes: https://github.com/containers/podman/issues/19139

Service containers are defaulting to 0 seconds for Timeout rather then
the settings in containers.conf.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-24 13:24:41 -04:00
Daniel J Walsh d2ec127c13
Set StopTimeout for compat API if not set by client
Currently containers created via DOCKER API without specifying
StopTimeout are defaulting to 0 seconds. This change should
default them to setting in containers.conf normally 10 seconds.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-24 13:24:41 -04:00
Daniel J Walsh 6f284dbd46
podman exec should set umask to match container
Fixes: https://github.com/containers/podman/issues/19713

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-24 13:20:06 -04:00
OpenShift Merge Robot 32f7bb131a
Merge pull request #19727 from vrothberg/fix-19715
kube: notifyproxy: close once
2023-08-24 12:25:22 -04:00
Urvashi Mohnani 52ed7fce2a Add infra-name annotations to kube gen/play
Add io.podman.annotations.infra.name annotation to kube play so
users can set the name of the infra container created.
When a pod is created with --infra-name set, the generated
kube yaml will have an infraName annotation set that will
be used when playing the generated yaml with podman.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-08-24 11:29:56 -04:00
Valentin Rothberg a5f6a4a3bf kube: notifyproxy: close once
Do not close a notifyproxy more than once.  Also polish the backend a
bit to reflect ealier changes from commit 4fa307f.

Fixes: #19715
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-08-24 16:24:28 +02:00
Valentin Rothberg 7a94f8c123 system service: unset NOTIFY_SOCKET
Unset the NOTIFY_SOCKET environment variable after sending the MAIN_PID
and READY message.  This avoids any unintentional side-effects of other
code paths using the socket assuming they'd run in a non-server
short-lived Podman process.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-08-24 16:23:01 +02:00
Paul Holzinger 7c9c969815
API attach: return vnd.docker.multiplexed-stream header
The attach API used to always return the Content-Type
`vnd.docker.raw-stream`, however docker api v1.42 added the
`vnd.docker.multiplexed-stream` type when no tty was used.

Follow suit and return the same header for docker api v1.42 and libpod
v4.7.0. This technically allows clients to make a small optimization as
they no longer need to inspect the container to see if they get a raw or
multiplexed stream.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-08-24 16:22:28 +02:00
Valentin Rothberg 60e58f0594 test/apiv2/60-auth.at: use `doesnotexists.podman.io`
`exist.io` actually does exist and is not under our control.  To prevent
flakes, change it to something on `podman.io`.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-08-24 16:22:02 +02:00
Ed Santiago 61dd7f80c2 e2e tests: use registry:2.8.2 (was 2.8)
...in hopes of addressing flake #18355

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-08-24 08:21:29 -06:00
Aditya R 82bd56be74
manifest-push: add support for --force-compression
Adds support for --force-compression which allows end-users to force
push blobs with the selected compresison in --compression option, in
order to make sure that blobs of other compression on registry are not
reused.

Signed-off-by: Aditya R <arajan@redhat.com>
2023-08-24 13:36:04 +05:30
Aditya R 469ace0910
push: add support for --force-compression
Adds support for --force-compression which allows end-users to force
push blobs with the selected compresison in --compression option, in
order to make sure that blobs of other compression on registry are not
reused.

Is equivalent to: force-compression here: https://docs.docker.com/build/exporters/#compression

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

Signed-off-by: Aditya R <arajan@redhat.com>
2023-08-24 13:35:58 +05:30
renovate[bot] 202cc433af
Update module github.com/onsi/ginkgo/v2 to v2.12.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-23 23:41:24 +00:00
Daniel J Walsh 148d95d8df
Expand env variables for cmds/entrypoint with format $(ENV)
Kubernetes supports expanding $(FOOBAR) as environment variables within
the kube.YAML. When using podman kube play, we need to do the same, for
supporting these YAML files.

Fixes: #15983

Signed-off-by: Chee Hau Lim <ch33hau@gmail.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-23 07:56:17 -04:00
OpenShift Merge Robot f38668e322
Merge pull request #19622 from jakecorrenti/umask-on-play
Set default Umask for `podman kube play`
2023-08-22 06:39:58 -02:30
OpenShift Merge Robot f727428b52
Merge pull request #19663 from rhatdan/ramfs
Add support for ramfs as well as tmpfs in volume mounts
2023-08-21 16:51:06 -02:30
Jake Correnti 5eee8825e8 Set default Umask for `podman kube play`
Fixes a bug where `podman kube play` fails to set a container's Umask
to the default 0022, and sets it to 0000 instead.

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2023-08-21 10:56:53 -04:00
Daniel J Walsh 45ce4834af
Add support for ramfs as well as tmpfs in volume mounts
Users want to mount a tmpfs file system with secrets, and make
sure the secret is never saved into swap. They can do this either
by using a ramfs tmpfs mount or by passing `noswap` option to
a tmpfs mount.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-21 07:14:57 -04:00
Daniel J Walsh 67756ac604
use container restart policy if user specifies one
Fixes: https://github.com/containers/podman/issues/19671

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-18 06:19:49 -04:00
Paul Holzinger 8f85aaf07f
fixup "podman logs with non ASCII log tag" tests
We need to actually check the output not just exit codes. While doing
this it was clear that the first test was not checking what it should
be so I had to remove the quotes from the arg.

Also this check did not work with remote testing at all, we must set the
env then restart the server as the env for conmon must be set on the
server obviously.
Also we can only match the conmon error messages on the local client.

Lastly this test requires the journald driver but we cannot use the in
container tests so skip it there.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-08-17 15:30:59 +02:00
Peter Hunt ff66f31ddd
libpod: correctly pass env so alternative locales work
in addition to b6167cedb2
we also need to pass LANG. Do so, and add a test to verify

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2023-08-17 12:15:08 +02:00
OpenShift Merge Robot 53b2b0222d
Merge pull request #19648 from edsantiago/scrap_icmp_test
CI: systests: remove pasta ICMP tests
2023-08-16 17:08:03 -02:30
Ed Santiago e38cf33a66 CI: systests: remove pasta ICMP tests
IPv6 test has been hard-skipped for six months.

IPv4 test is flaking in Cirrus and hard-failing in Gating.

Absent a reliable way to test in CI and gating, and absent
a strong reason to test ICMP in pasta anyway, the solution
is simple.

Closes: #19612

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-08-16 09:02:48 -06:00
Valentin Rothberg d5841ed528 add --module flag
Support a new concept in containers.conf called "modules".  A "module"
is a containers.conf file located at a specific directory.  More than
one module can be loaded in the specified order, following existing
override semantics.

There are three directories to load modules from:
 - $CONFIG_HOME/containers/containers.conf.modules
 - /etc/containers/containers.conf.modules
 - /usr/share/containers/containers.conf.modules

With CONFIG_HOME pointing to $HOME/.config or, if set, $XDG_CONFIG_HOME.
Absolute paths will be loaded as is, relative paths will be resolved
relative to the three directories above allowing for admin configs
(/etc/) to override system configs (/usr/share/) and user configs
($CONFIG_HOME) to override admin configs.

Pulls in containers/common/pull/1599.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-08-16 14:32:35 +02:00
renovate[bot] 6a3f09e8a7
Update dependency setuptools to ~=68.1.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-15 20:35:31 +00:00
Ed Santiago 0c52d10040 CI: e2e manifest_test: use image from quay
Flake suppression: going with the one-basket model of egg storage,
switch manifest_test to use an image on quay.io (was: k8s.io).

Closes: #19148

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-08-14 12:45:42 -06:00
OpenShift Merge Robot 824c76616a
Merge pull request #19591 from matejvasek/fix-build-pull-compat
Fix pull parameter parsing for compat `/build` endpoint
2023-08-14 15:36:54 -02:30
Matej Vasek f33b01b731 fix: Docker API compatible bool deserialization
In Docker anything but "", "0", "no", "false", "none" (ignoring case) is considered to be true.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-14 15:09:14 +02:00
Matej Vasek 4cb2d48ca4 Revert "compat,build: pull must accept string"
This reverts commit 5b148a0a68.

Reverting to treating the `pull` query parameter as a boolean.
Because of deceiving Docker API documentation it was assumed that the
parameter is pull-policy, however that is not true. Docker does treat
`pull` as a boolean. What is interesting is that Docker indeed accepts
strings like `always` or `never` however Docekr both of these strings
treat as `true`, not as pull-policy. As matter of the fact it seems
there is no such a thing as pull-policy in Docker.

More context https://github.com/containers/podman/issues/17778#issuecomment-1673931925

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-14 15:01:53 +02:00
Ed Santiago 5908999e6d New partial-line test is flaking
...possibly because we somehow ended up with a two-line
log file for a simple 'echo hi'? Make our timestamp-getting
code safer by adding 'head -1'.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-08-10 17:43:50 -06:00
OpenShift Merge Robot a60bafea48
Merge pull request #19573 from edsantiago/env-tests
systests: tests for --env and --env-file
2023-08-10 09:33:00 -04:00
OpenShift Merge Robot 14e290a306
Merge pull request #19358 from umohnani8/buildfarm-2
Add phase 1 of podman farm subcommands
2023-08-10 09:29:33 -04:00
Ed Santiago df28df1aee systests: tests for --env and --env-file
We've made rather a mess of those options, due to lack of testing.

Here we have a first step toward regression tests. --env is OK,
but there are three special-case exceptions in --env-file for
three incompatibilities introduced by #19096.

To be continued, but probably in future PRs. We need this ASAP
to prevent us from making any more regressions.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-08-09 14:11:00 -06:00
Urvashi Mohnani bcebcad1fd Update system connection add & remove
Add new --farm flag to podman system connection add so that
a user can add a new connection to a farm immediately.
Update system connection remove such that when a connection is
removed, the connection is also removed from any farms that have it.
Add docs and tests for these changes.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-08-09 13:37:37 -04:00
Urvashi Mohnani 310f971fcf Add tests for podman farm
Add tests for podman farm create, remove, and update.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-08-09 13:37:37 -04:00
Ed Santiago 23d5b5008c CI: e2e: add delay before podman logs or journalctl
...to reduce flakes.

Reason: journald makes no guarantees. Just because a systemd job
has finished, or podman has written+flushed log entries, doesn't
mean that journald will actually know about them:

   https://github.com/systemd/systemd/issues/28650

Workaround: wrap some podman-logs tests inside Eventually()
so they will be retried when log == journald

This addresses, but does not close, #18501. That's a firehose,
with many more failures than I can possibly cross-reference.
I will leave it open, then keep monitoring missing-logs flakes
over time, and pick those off as they occur.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-08-09 09:29:11 -06:00
Paul Holzinger a55c2636de
file logger: fix podman logs --tail with partial lines
There is a problem where our tail code does not handles correctly
partial log lines. This makes podman logs --tail output possibly
incorrect lines when k8s-file is used.

This manifests as flake in CI because partial lines are only sometimes
written, basically always when the output is flushed before writing a
newline.

For our code we must not count partial lines which was already done but
the important thing we must keep reading backwards until the next full
(F) line. This is because all partial (P) lines still must be added to
the full line. See the added tests for details on how the log file looks
like.

While fixing this, I rework the tail logic a bit, there is absolutely no
reason to read the lines in a separate goroutine just to pass the lines
back via channel. We can do this in the same routine.
The logic is very simple, read the lines backwards, append lines to
result and then at the end invert the result slice as tail must return
the lines in the correct order. This more efficient then having to
allocate two different slices or to prepend the line as this would
require a new allocation for each line.

Lastly the readFromLogFile() function wrote the lines back to the log
line channel in the same routine as the log lines we read, this was bad
and causes a deadlock when the returned lines are bigger than the
channel size. There is no reason to allocate a big channel size we can
just write the log lines in a different goroutine, in this case the main
routine were read the logs anyway.

A new system test and unit tests have been added to check corner cases.

Fixes #19545

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-08-09 14:48:01 +02:00
OpenShift Merge Robot eb465b40c8
Merge pull request #19549 from rhatdan/quadlet
podman stop --cidfile missing --ignore
2023-08-09 07:50:19 -04:00
renovate[bot] 4c4bc09227
Update docker.io/library/golang Docker tag to v1.21
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-09 01:03:32 +00:00
OpenShift Merge Robot d4f967c19e
Merge pull request #19541 from containers/renovate/major-ci-vm-image
Update dependency containers/automation_images to v20230807
2023-08-08 17:11:22 -04:00
OpenShift Merge Robot 195f1be89a
Merge pull request #19371 from danishprakash/daemonset-support
kube: add DaemonSet support
2023-08-08 17:05:09 -04:00
Daniel J Walsh f55c48ad3a
podman stop --cidfile missing --ignore
Podman should ignore failures to find a cidfile when stoping the
container if the user specified --ignore

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-08 17:03:15 -04:00
Chris Evich 7ef03517f9
Skip podman exec cannot be invoked on Debian
Ref: https://github.com/containers/podman/issues/19552

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-08-08 14:34:25 -04:00
Chris Evich 95ceacefbf
Re-enable checkpoint test on Debian SID
An unhelpful comment doesn't give any clues why this test was originally
skipped on Ubuntu.  In any case, now that CI uses Debian SID, re-enable
the test hoping that it now functions.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-08-08 14:34:25 -04:00
Chris Evich c193dbd942
Require a non-generic reason for non-Fedora skip
Signed-off-by: Chris Evich <cevich@redhat.com>
2023-08-08 14:34:24 -04:00
OpenShift Merge Robot cc31ac4b0e
Merge pull request #19530 from mheon/fix_19529
Ensure volumes-from mounts override image volumes
2023-08-08 04:55:11 -04:00
OpenShift Merge Robot 2f50d8e579
Merge pull request #19425 from rhatdan/service
Add support for passing container stop timeout as -1 (infinite)
2023-08-08 04:52:33 -04:00
Matthew Heon 2de22ebf0d Ensure volumes-from mounts override image volumes
We do not allow volumes and mounts to be placed at the same
location in the container, with create-time checks to ensure this
does not happen. User-added conflicts cannot be resolved (if the
user adds two separate mounts to, say, /myapp, we can't resolve
that contradiction and error), but for many other volume sources,
we can solve the contradiction ourselves via a priority
hierarchy. Image volumes come first, and are overridden by the
`--volumes-from` flag, which are overridden by user-added mounts,
etc, etc. The problem here is that we were not properly handling
volumes-from overriding image volumes. An inherited volume from
--volumes-from would supercede an image volume, but an inherited
mount would not. Solution is fortunately simple - just clear out
the map entry for the other type when adding volumes-from
volumes.

Makes me wish for Rust sum types - conflict resolution would be a
lot simpler if we could use a sum type for volumes and bind
mounts and thus have a single map instead of two maps, one for
each type.

Fixes #19529

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2023-08-07 15:04:33 -04:00
OpenShift Merge Robot eceae9da57
Merge pull request #19478 from dcermak/show-socket-exists
Always show RemoteSocket.Exists in json
2023-08-05 12:37:52 +02:00
OpenShift Merge Robot 9e18e9fafd
Merge pull request #19414 from rhatdan/systemd
Deprecate podman generate systemd
2023-08-04 20:06:41 +02:00
Dan Čermák dd4f47dd98
Always show RemoteSocket.Exists in json
The `Exists` field of the `RemoteSocket` struct is marshaled to json with the
`omitempty` setting. This has the disadvantage that by default `podman info`
shows a `remotePath` entry (the remote path is set in
`pkg/domain/infra/abi/systems.go`: `(*ContainerEngine).Info`) but not that this
path does not exist:
```
❯ podman info --format json | jq .host.remoteSocket
{
  "path": "/run/user/1000/podman/podman.sock"
}
```

By removing the `omitempty`, we ensure that the existence is always shown:
```
❯ bin/podman info --format json | jq .host.remoteSocket
{
  "path": "/run/user/1000/podman/podman.sock",
  "exists": false
}
```

Signed-off-by: Dan Čermák <dcermak@suse.com>
2023-08-04 16:24:58 +02:00
Daniel J Walsh 1e54539432
Add support for passing container stop timeout as -1 (infinite)
Compat api for containers/stop should take -1 value

Add support for `podman stop --time -1`
Add support for `podman restart --time -1`
Add support for `podman rm --time -1`
Add support for `podman pod stop --time -1`
Add support for `podman pod rm --time -1`
Add support for `podman volume rm --time -1`
Add support for `podman network rm --time -1`

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-04 08:36:45 -04:00
OpenShift Merge Robot 84dec22349
Merge pull request #19494 from rhatdan/codespell
Run codespell on code
2023-08-03 19:32:27 +02:00
OpenShift Merge Robot 92090d6acc
Merge pull request #19310 from cgiradkar/fix_dash_t_flag
Check tty flag to set default terminal in Env
2023-08-03 18:49:51 +02:00
Ed Santiago a8974d4a3e CI: e2e: remove useless test
Remove "HTTP if one registry" test. It is a NOP, has been skipped
for two months, and nobody knows what its original purpose was.

Closes: #18768

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-08-03 06:16:25 -06:00