18096 Commits

Author SHA1 Message Date
9272cabd38 e2e: fix run_staticip_test about no_proxy
http.Get() could not recognize no_proxy with "ginkgo -nodes <any>".
Therefore, we set http.Client not to use a proxy instead of os.Setenv().

Fixes #17135

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2023-01-31 16:55:11 +09:00
2e397120db docs: specify order preference for FROM
When multiple files are specified buildah considers `FROM` instruction
from the last file specified and so does `buildkit` and `docker` so lets
specify that in docs.

[NO NEW TESTS NEEDED]
[NO TESTS NEEDED]

Similar to: https://github.com/containers/buildah/pull/4546

Signed-off-by: Aditya R <arajan@redhat.com>
2023-01-31 09:49:52 +05:30
56b9476304 Merge pull request #17290 from edsantiago/username_not_gecos
e2e tests: fix incorrect os.User.Name
2023-01-30 21:48:04 -05:00
15594e92e5 Fixes port collision issue on use of --publish-all
The function which generates and assigns a random
port number for the --publish-all functionality
was not properly marking some ports as "used".
In very rare occasions this can cause a randomly
"generated" port to be used twice creating an
impossible container configuration.

Signed-off-by: telday <ellis.wright@cyberark.com>
2023-01-30 14:52:57 -07:00
0e3524b8b2 e2e tests: fix incorrect os.User.Name
Ha ha. This was supposed to be a trivial little followup to #17174:

   https://github.com/containers/podman/pull/17174#discussion_r1085963780
      (safer username check when --userns=keep-id)

It got complicated. TL;DR we need to use User.Username, not User.Name.
The latter is GECOS! Tests were working because, on Fedora, GECOS
for root is "root". Found and fixed all 'u.Name' instances, but
if there are any references with a variable other than 'u', they
still need looking into.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-01-30 13:54:10 -07:00
7c60a784c1 Log data that we failed to unmarshal
This should never happen with a consistent client/server,
and we are seeing this show up with some hard-to-diagnose flakes.

So, log details about failures. After we find the cause, we might remove
this extra logging again.

[NO NEW TESTS NEEDED]

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-01-30 18:13:31 +01:00
61db1d5aa1 [CI:DOCS] hack/perf: add script for BZ 216111
Add a script with reproducers for bugzilla.redhat.com/show_bug.cgi?id=2162111.
The results are not much different compared to the already existing
scripts.  Podman is faster despite for container removal.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-01-30 16:43:14 +01:00
29b346deab container rm: save once for exec removal and state change
Do not save the container each for changing the state and for removing
running exec sessions.  Saving the container is expensive and avoiding
the redundant save makes `container rm` 1.2 times faster on my
workstation.

[NO NEW TESTS NEEDED]

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-01-30 15:43:03 +01:00
929d03a5ea Merge pull request #17243 from sstosh/e2e-imagecachedir
e2e: Avoid hard-coding ImageCacheDir
2023-01-30 07:04:00 -05:00
5061589495 Merge pull request #17273 from vrothberg/RHELBU-1918-docs
[DOCS:CI] podman-events: document verbose create events
2023-01-30 06:58:51 -05:00
f8f606bb07 Merge pull request #17269 from n1hility/add-comment
[CI:DOCS] Add comment to clarify error handling intention
2023-01-30 06:35:28 -05:00
793c93cede Merge pull request #17271 from sstosh/e2e-quadlet-tmpdir
e2e: Avoid hard-coding included in quadlet test
2023-01-30 06:32:34 -05:00
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