17658 Commits

Author SHA1 Message Date
4bbe2ee012 Merge pull request #17068 from ygalblum/quadlet-kube-publish-ports
Quadlet Kube - add support for PublishPort key
2023-01-12 07:12:05 -05:00
b10a906b5c Quadlet Kube - add support for PublishPort key
Move the handling of Publish key to a method
use --publish instead of -p
Use the new method for both .container and .kube files
Adjust .container tests
Add .kube tests
Update the man page

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-01-12 10:19:14 +02:00
67305cec97 Merge pull request #17060 from sabre1041/volumesource-error-msg
Updated error message for supported VolumeSource types
2023-01-11 21:02:01 -05:00
a7ba63dede Merge pull request #17055 from mupuf/mount-non-vt-tty
Only prevent VTs to be mounted inside privileged systemd containers
2023-01-11 20:59:26 -05:00
39ffcb8c31 Merge pull request #17064 from Romain-Geissler-1A/docker-compat-networkmode
[docker compat] Don't overwrite the NetworkMode from "default" to "bridge" if containers.conf specifies a non-default configuration.
2023-01-11 18:44:15 -05:00
b0be367a34 Merge pull request #17073 from rhatdan/regexp
Compile regex on demand not in init
2023-01-11 18:15:10 -05:00
758f20e20a Compile regex on demand not in init
Every podman command is paying the price for this compile even when they
don't use the Regex, this will speed up start of podman by a little.

[NO NEW TESTS NEEDED] Existing tests should catch issues.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-01-11 14:38:51 -05:00
1e451031ff Merge pull request #17067 from sstosh/e2e-play-kube
e2e: fix play_kube_test
2023-01-11 14:31:40 -05:00
8a0d25f673 Merge pull request #17083 from ygalblum/kube-port-test-set-deadline
E2E Test: Play Kube set deadline to connection to avoid hangs
2023-01-11 13:50:51 -05:00
f70233aa08 Merge pull request #16951 from ygalblum/system-test-quadlet-network
System tests: quadlet network test
2023-01-11 13:19:01 -05:00
3e2b9a28da [docker compat] Don't overwrite the NetworkMode if containers.conf overrides netns.
Fixes #16915 (only the part about docker client).

Signed-off-by: Romain Geissler <romain.geissler@amadeus.com>
2023-01-11 17:44:09 +00:00
5b1bdf9490 E2E Test: Play Kube set deadline to connection to avoid hangs
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-01-11 18:56:45 +02:00
26e0a8f7d1 Merge pull request #17062 from n1hility/retry-choco
Introduce pkg retry logic in win installer verify task
2023-01-11 10:04:57 -05:00
f4c81b0aa5 Only prevent VTs to be mounted inside privileged systemd containers
While mounting virtual console devices in a systemd container is a
recipe for disaster (I experienced it first hand), mounting serial
console devices, modems, and others should still be done by default
for privileged systemd-based containers.

v2, addressing the review from @fho:
 - use backticks in the regular expression to remove backslashes
 - pre-compile the regex at the package level
 - drop IsVirtualTerminalDevice (not needed for a one-liner)

v3, addressing the review from @fho and @rhatdan:
 - re-introduce a private function for matching the device names
 - use path.Match rather than a regex not to slow down startup time

Closes #16925.

Fixes: 5a2405ae1b3a ("Don't mount /dev/tty* inside privileged...")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
2023-01-11 16:57:58 +02:00
a5ce3b3cd7 e2e: fix play_kube_test
When SELinux is enabled, e2e test could be failed
due to run a ls command in a running container.

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2023-01-11 14:28:24 +09:00
382c55eeaa Merge pull request #17038 from ygalblum/quadlet-kube-configmap
Quadlet: Add support for ConfigMap key in Kube section
2023-01-10 22:20:55 -05:00
31dcb48411 Merge pull request #17029 from arixmkii/qemu_windows_settings
Updated options for QEMU on Windows hosts
2023-01-10 21:40:23 -05:00
81a3f7cb80 Updated error message for supported VolumeSource types
Signed-off-by: Andrew Block <andy.block@gmail.com>
2023-01-10 20:18:59 -06:00
2bf94b764a Introduce pkg retry logic in win installer task
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2023-01-10 16:57:52 -06:00
7c95a5df92 Merge pull request #17053 from edsantiago/ditch_wwwpodmanio
Network tests: ping redhat.com, not podman.io
2023-01-10 15:07:28 -05:00
9f9666ea1d Merge pull request #17056 from edsantiago/logformatter_base_sha
logformatter: include base SHA, with history link
2023-01-10 13:03:57 -05:00
619933a530 Merge pull request #17041 from vrothberg/post-run
cobra: move engine shutdown to Execute
2023-01-10 12:59:17 -05:00
5399d5360f Merge pull request #17046 from n1hility/update-gvproxy-minstaller
Update Mac installer to use gvproxy v0.5.0
2023-01-10 11:58:45 -05:00
6ba308f075 Merge pull request #16880 from ygalblum/kube-publish-ports
Kube Play - allow setting and overriding published host ports
2023-01-10 11:49:36 -05:00
db03236391 logformatter: include base SHA, with history link
This is to help me in my flake analysis.

Scenario: I'm looking at recent flakes, and see Flake X. I know
that Flake X was "fixed" two weeks ago. Did the fix not work?
Or is this just one of those PRs that was created three weeks
ago (or three months ago) and never rebased to pick up the fix?
This adds a one-click way for me to tell.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-01-10 06:41:27 -07:00
37ade6be12 Network tests: ping redhat.com, not podman.io
Much as we'd love to eat our dogfood, podman.io is not hosted
on reliable infrastructure; redhat.com is. Let's see if this
gets rid of CI flakes.

Closes: #17044

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-01-10 05:38:43 -07:00
2d8225cd44 cobra: move engine shutdown to Execute
If the run errors, cobra does not execute post runs.  It is a somehow
known issue (https://github.com/spf13/cobra/issues/914) but problematic
for Podmand as the runtime is shutdown during post run.

Since some commands overwrite the post run and a general lack in cobra
of post runs on errors, move the shutting down the engines directly into
Execute.  Fixing the issue may fix a number of flakes.

Note that the shutdowns are NOPs for the remote client.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-01-10 13:30:41 +01:00
5b9e068950 Merge pull request #17040 from giuseppe/podman-rm-f-no-processes
podman: podman rm -f doesn't leave processes
2023-01-10 05:11:00 -05:00
35d2f61ec1 Updated options for QEMU on Windows hosts
Using "w" suffixed versions of QEMU binaries for correct background process
handling and not bind it to lifecycle of command prompt window. Stub for
arm64 version added to fix compilation issues of this target, when QEMU
machine will be finally enabled.

Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
2023-01-09 23:58:47 +02:00
f451f4fb56 Merge pull request #17034 from giuseppe/bind-mount-sys-fs-cgroup-ro
linux: add /sys/fs/cgroup if /sys is a bind mount
2023-01-09 16:31:03 -05:00
28f13a74bc Update Mac installer to use gvproxy v0.5.0
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2023-01-09 15:07:59 -06:00
4cf06fe7e0 podman: podman rm -f doesn't leave processes
follow-up to 6886e80b45caae27dda81a9b44d8dd179c414580

when "podman -rm -f" is used on a container in "stopping" state, also
make sure it is terminated before removing it from the local storage.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-01-09 21:01:32 +01:00
494db3e166 oci: check for valid PID before kill(pid, 0)
check that the container has a valid pid before attempting to use
kill($PID, 0) on it.  If the PID==0, it means the container is already
stopped.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-01-09 21:01:31 +01:00
cf364703fc linux: add /sys/fs/cgroup if /sys is a bind mount
if /sys is bind mounted from the host then also add an explicit mount
for /sys/fs/cgroup so that 'ro' is honored.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-01-09 19:42:51 +01:00
1da081f289 Merge pull request #17017 from edsantiago/ditch_ubi
e2e tests: stop using UBI images
2023-01-09 10:25:43 -05:00
f7c9f93f27 Merge pull request #17003 from vrothberg/fix-16964
remove service container _after_ pods
2023-01-09 10:09:59 -05:00
31e22aade6 Merge pull request #16997 from n1hility/winstaller-arm-compat
Fixes automated WSL installation on ARM
2023-01-09 09:56:04 -05:00
1bd3d32c5f Quadlet: Add support for ConfigMap key in Kube section
For each instance of ConfigMap pass the path via --configmap
Add tests
Add to doc

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-01-09 14:58:31 +02:00
4a7a45f973 remove service container _after_ pods
Do not allow for removing the service container unless all associated
pods have been removed.  Previously, the service container could be
removed when all pods have exited which can lead to a number of issues.

Now, the service container is treated like an infra container and can
only be removed along with the pods.

Also make sure that a pod is unlinked from the service container once
it's being removed.

Fixes: #16964
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-01-09 13:44:51 +01:00
bc6908e761 Merge pull request #17014 from rhatdan/VENDOR
Vendor in latest containers/common
2023-01-09 03:46:16 -05:00
07cc49efdb Kube Play - allow setting and overriding published host ports
Add a new flag --publish
Remote - Pass PublishPorts as a string array
ABI - translate the string array to Ports and merge with the ports in the spec
Add e2e tests
Add option to man doc

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-01-08 13:49:53 +02:00
74a961a9b8 Merge pull request #17025 from giuseppe/terminate-processes-no-pid-namespace
oci: terminate all container processes on cleanup
2023-01-08 06:45:03 -05:00
c83a2f8a0a Merge pull request #17022 from mheon/fix_defer_locking
Fix a potential defer logic error around locking
2023-01-08 06:42:28 -05:00
5de8cd74f9 Merge pull request #16820 from rhatdan/names
Allow '/' to prefix container names to match Docker
2023-01-07 09:38:19 -05:00
9b27ca1bbf Merge pull request #17023 from n1hility/update-win-sshproxy
Update win-sshproxy to 0.5.0 gvisor tag
2023-01-07 09:34:22 -05:00
9fe86ec7f6 oci: terminate all container processes on cleanup
if the container has no pid namespace, they are not killed when the
container process ends.  In this case, attempt to kill them in the
same way.

The problem was noticed with toolbox where the exec'ed sessions are
not terminated when the container is stopped, blocking the system
shutdown.

[NO NEW TESTS NEEDED]

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-01-07 15:00:51 +01:00
6dd1d48fd8 Update win-sshproxy to 0.5.0 gvisor tag
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2023-01-06 16:52:53 -06:00
e332b6246b Vendor in latest containers/common
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-01-06 14:19:47 -05:00
ea63b27132 Merge pull request #17020 from edsantiago/logformatter_tweaks
logformatter: nicer formatting for bats failures
2023-01-06 13:37:08 -05:00
92cdad0315 Fix a potential defer logic error around locking
in several top-level API functions. These are the first line of
the function that contains them, which makes sense; we want to
capture any error returned by the function. However, making this
the first defer means that it is the last thing to run after the
function returns - meaning that the container's
`defer c.lock.Unlock()` has already fired, leading to a chance we
modify the container without holding its lock.

We could move the function around so it's no longer the first
defer, but then we'd have to call it twice (immediately after
`defer c.lock.Unlock()` if the container is not batched, and a
second time in a new `else` block right after the lock/sync call
to make sure we handle batched containers). Seems simpler to just
leave it like this.

[NO NEW TESTS NEEDED] Can't really test for DB corruption easily.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2023-01-06 13:12:19 -05:00