17984 Commits

Author SHA1 Message Date
8f2a40d814 [DOCS:CI] podman-events: document verbose create events
issues.redhat.com/browse/RHELBU-1918 is mentioning the podman-events man
page which are lacking notes on the verbose create events added by
commit 71f92d263c7f.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-01-30 09:37:03 +01:00
323b5158d9 Merge pull request #17265 from rhatdan/devices
Match VT device paths to be blocked from mounting exactly
2023-01-30 02:22:42 -05:00
df2e83b2eb Merge pull request #16807 from arixmkii/gvproxy
Add gvproxy to windows packages
2023-01-30 02:19:48 -05:00
1f9d2f4023 Merge pull request #17264 from nabbisen/17244-timedatectl_doesnt_exist_on_systemd_free_linux
fix #17244: use /etc/timezone where `timedatectl` is missing on Linux
2023-01-30 02:00:26 -05:00
7e80edd3aa e2e: Avoid hard-coding included in quadlet test
Use .*/podman_test.*... instead of /tmp/podman_test.*...

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2023-01-30 11:45:34 +09:00
2682d3ad9d e2e: Avoid hard-coding ImageCacheDir
- ImageCacheDir is hard-coded as "/tmp/podman/imagecachedir".
To avoid this hard-coding, I changed it to "os.TempDir()/imagecachedir".

- Change ImageCacheDir permissions from 0777 to 0700.
This directory should be used by per-user.

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2023-01-30 10:14:08 +09:00
387f0ea2f6 Making gvproxy.exe optional for building Windows installer
Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
2023-01-29 22:04:53 +02:00
74c0909736 Add gvproxy to Windows packages
Updated build scripts and installer build scripts to include gvproxy.exe.
Includes tutorial on setting up a Podman VM with QEMU and gvproxy on Windows.

Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
2023-01-29 22:01:00 +02:00
ab8e49d74b Add comment to clarify error handling intention
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2023-01-29 13:43:03 -06:00
b7987ca2ba Merge pull request #17266 from n1hility/fix-image-path
Fix usage of absolute windows paths with --image-path
2023-01-29 11:08:36 -05:00
12d70446f4 fix #17244: use /etc/timezone where timedatectl is missing on Linux
Signed-off-by: nabbisen <nabbisen@scqr.net>
2023-01-30 00:36:37 +09:00
95e3b1f071 Merge pull request #17262 from n1hility/fix-pids-default
Fix default handling of pids-limit
2023-01-29 09:50:57 -05:00
063e273e94 Fix usage of absolute windows paths with --image-path
Only assume that http(s) scheme URLs (only ones supported by http.Client anyway) are URLs.
Treat everything else as a file path. (Windows paths can look like a URL scheme)

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2023-01-28 18:37:03 -06:00
b0b166b5bb Match VT device paths to be blocked from mounting exactly
As @mheon pointed out in PR #17055[^1], isVirtualConsoleDevice() does
not only matches VT device paths but also devices named like
/dev/tty0abcd.
This causes that non VT device paths named /dev/tty[0-9]+[A-Za-z]+ are
not mounted into privileged container and systemd containers accidentally.

This is an unlikely issue because the Linux kernel does not use device
paths like that.
To make it failproof and prevent issues in unlikely scenarios, change
isVirtualConsoleDevice() to exactly match ^/dev/tty[0-9]+$ paths.

Because it is not possible to match this path exactly with Glob syntax,
the path is now checked with strings.TrimPrefix() and
strconv.ParseUint().
ParseUint uses a bitsize of 16, this is sufficient because the max
number of TTY devices is 512 in Linux 6.1.5.
(Checked via 'git grep -e '#define' --and -e 'TTY_MINORS').

The commit also adds a unit-test for isVirtualConsoleDevice().

Fixes: f4c81b0aa5fd ("Only prevent VTs to be mounted inside...")

[^1]: https://github.com/containers/podman/pull/17055#issuecomment-1378904068

Signed-off-by: Fabian Holler <mail@fholler.de>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-01-28 05:18:40 -05:00
553e53d441 Fix default handling of pids-limit
Add test to verify that updates without a pids-limit specified no longer
overwrite the previous value.

Also fixes erroneous warning generated by remote clients:

"Resource limits are not supported and ignored on cgroups V1 rootless
systems"

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2023-01-27 23:19:44 -06:00
986a3a61a8 Merge pull request #17182 from TomSweeneyRedHat/dev/tsweeney/fixlang3
Clean up more language for inclusiveness
2023-01-27 15:50:35 -05:00
14012491cf Merge pull request #17088 from mtrmac/sign-by-sigstore
Add … push --sign-by-sigstore
2023-01-27 14:02:52 -05:00
09b97e3c83 Merge pull request #17253 from Luap99/journal-event-user
journald: podman events only show events for current user
2023-01-27 13:57:47 -05:00
a3a826a8d9 Merge pull request #17245 from sstosh/e2e-rootless-rm
e2e: Remove the cache with "podman unshare rm" when a rootless user
2023-01-27 13:18:06 -05:00
069edc3adf Add (podman {image,manifest} push --sign-by-sigstore=param-file.yaml)
(podman push) and (podman manifest push) now support --sign-by-sigstore=param-file,
using the containers-sigstore-signing-params.yaml(5) file format.

That notably adds support for Fulcio and Rekor signing.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-01-27 16:47:32 +01:00
356f7b6c9d Merge pull request #15436 from lsm5/cirrus-update
Bump cirrus image with easier dependency management
2023-01-27 10:41:28 -05:00
e519910305 journald: podman logs only show logs for current user
In the super rare case that there are two containers with the same ID
for two different users, podman logs with the journald driver would show
logs from both containers.

[NO NEW TESTS NEEDED] Impossible to reproduce.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-01-27 16:20:37 +01:00
2ab90f2ed6 journald: podman events only show events for current user
I noticed this while running some things in parallel, podman events
would show events from other users. Because all events are written to
the journal everybody can see them. So when we read the journal we must
filter events for only the current UID.

To reproduce run `podman events` as user then in another window create a
container as root for example. After this patch it will correctly ignore
these events from other users.

[NO NEW TESTS NEEDED] I don't think we can test with two users at the same
time.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-01-27 16:20:32 +01:00
21b82bb687 e2e: Remove the cache with "podman unshare rm" when a rootless user
If rootless, os.RemoveAll() is failed due to permission denied.
Therefore, we use "podman unshare rm" instead of os.RemoveAll().

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2023-01-27 23:44:04 +09:00
9db657f40c Clean up more language for inclusiveness
We had a number of references, mostly in docs, to the word master that
can now be changed to main.  This PR does that and makes the project a
bit more inclusive.

[NO NEW TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2023-01-27 09:40:27 -05:00
8be5cea126 Merge pull request #17238 from TomSweeneyRedHat/dev/tsweeney/buildahv1.29
Bump Bulidah to v1.29.0
2023-01-27 09:33:04 -05:00
b4d169ada2 Merge pull request #17228 from shblue21/shblue21/wsl-check
fix: running check error when podman is default in wsl
2023-01-27 09:27:53 -05:00
a096e32ecc Merge pull request #17251 from quite/status-up-not-ago
fix: don't output "ago" when container is currently up and running
2023-01-27 09:22:24 -05:00
a825813870 Merge pull request #17246 from sstosh/e2e-remove-dir
e2e: Remove some directories at SynchronizedAfterSuite
2023-01-27 09:19:22 -05:00
814f7c5695 e2e: Remove some directories at SynchronizedAfterSuite
"tempdir" in SynchronizedAftersuite and "LockTmpDir" can be removed.

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2023-01-27 21:25:44 +09:00
497be102ad fix: don't output "ago" when container is currently up and running
Closes #17250

Signed-off-by: Daniel Lublin <daniel@lublin.se>
2023-01-27 12:32:15 +01:00
b28519fd96 fix: running check error when podman is default in wsl
If podman is the default wsl distribution, the (default) string is appended and result is assigned false.

[NO NEW TESTS NEEDED]

Fixes #17227

Signed-off-by: shblue21 <jihunkimkw@gmail.com>
2023-01-27 19:43:51 +09:00
8fce9dcde6 Merge pull request #17247 from vrothberg/fix-ci
fix CI: test fail due to merge
2023-01-27 05:34:43 -05:00
a745d99a88 fix CI: test fail due to merge
containers/podman/pull/17186 and containers/podman/pull/17201 have been
merged at roughly the same time.  Both work fine in isolation but the
new kube test breaks in combination.

Fix the IPC kube test to make CI healthy.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-01-27 10:00:56 +01:00
49b809a0cc Merge pull request #17186 from danishprakash/add-host-ipc
kube-play: add support for HostIPC in pod.Spec
2023-01-26 14:41:48 -05:00
45bb8dbdf7 Merge pull request #17114 from rhatdan/devices
Allow --device-cgroup-rule to be passed in by docker API
2023-01-26 14:32:19 -05:00
f3d8f6c49d Bump Bulidah to v1.29.0
As the title says.

[NO NEW TESTS NEEDED]
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2023-01-26 11:49:55 -05:00
574c92b8ea Merge pull request #17210 from vrothberg/ps-sync
ps: do not sync container
2023-01-26 10:47:18 -05:00
532957eeff Merge pull request #17217 from ygalblum/ygal-quadlet-blockdev-support
quadlet: Add device support for .volume files
2023-01-26 10:20:52 -05:00
4692b29145 Merge pull request #17208 from sstosh/e2e-tempfile
e2e: reduce dependency on /tmp for e2e tests
2023-01-26 10:00:08 -05:00
18a25e7cbc Merge pull request #17192 from baude/wslfcosreorg
WSL refactoring
2023-01-26 08:30:56 -05:00
38d5319f16 e2e: reduce dependency on /tmp for e2e tests
- Use filepath.Join(podmanTest.TempDir, "any") instead of "/tmp/any"

- Add generatePolicyFile() to avoid the hardcording of "keyPath": "tmp/key.gpg"

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2023-01-26 22:20:15 +09:00
0ffce81810 Bump cirrus image with easier dependency management
- for cni tests remove netavark and aardvark only if installed
- install ginkgo in envs wherever needed

Related:
https://github.com/containers/automation_images/pull/177
https://github.com/containers/automation_images/issues/159
https://github.com/containers/automation_images/issues/161

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>

Update .cirrus.yml

Co-authored-by: Chris Evich <1183438+cevich@users.noreply.github.com>
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-01-26 18:40:14 +05:30
e62e42bfa9 quadlet: Add device support for .volume files
The Device, Type, Copy and Options keys are now supported in
quadlet  .volume files. This allows users to create filesystem
based volumes with quadlets .volume files.

Signed-off-by: Ingo Becker <ingo@orgizm.net>
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-01-26 14:46:57 +02:00
0184ba5d09 Merge pull request #17213 from umohnani8/nonroot
Set runAsNonRoot=true in gen kube
2023-01-26 05:03:07 -05:00
c74bdae351 DB: make loading container states optional
Loading container states speed things up when listing all containers but
it comes with a price tag for many other call paths.  Hence, make
loading the state conditional to allow for keeping `podman ps` fast
without other commands regressing in performance.

[NO NEW TESTS NEEDED]

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-01-26 10:20:38 +01:00
6132c4d548 ps: do not sync container
Do not sync containers with the runtime and the database when listing
containers.  It turns out to be extremely expensive and unnecessary.

The sync was needed since listing all containers from the database did
not populate their state.  Doing that, however, is much faster since we
already have a connection to the database.

This change makes listing 200 containers 2 times faster than before.

[NO NEW TESTS NEEDED]

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-01-26 10:04:16 +01:00
4cd7f6354b Merge pull request #17211 from vrothberg/ps-health
ps: query health check in batch mode
2023-01-25 09:16:21 -05:00
64ea21364e Merge pull request #17215 from Luap99/attach-flake
fix APIv2 python attach test flake
2023-01-25 09:12:53 -05:00
9904fbed33 fix APIv2 python attach test flake
The test was added in commit 1424f0958f6f, it can flake because the
attach test needs the message in the log. On slow CI systems this can
take longer. Add a retry logic which checks the container log every
second for up to 5 seconds. That should be plenty of time.

Fixes #17204

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-01-25 14:15:20 +01:00