18703 Commits

Author SHA1 Message Date
0b51f447b8 Merge pull request #18366 from AndroidKitKat/main
[CI:DOCS] Fix simple typo in podman-network-create.md
2023-04-27 07:34:24 -04:00
7430d9d777 Merge pull request #18364 from containers/renovate/requests-2.x
chore(deps): update dependency requests to ~=2.29.0
2023-04-27 07:31:50 -04:00
1a443e65fe Merge pull request #18371 from saschagrunert/c-common-0.53.0
Update c/common and avoid setting umask
2023-04-27 06:27:14 -04:00
c50d223b84 Merge pull request #18327 from rhatdan/docker
Add sha256: to images history id for docker compatibility
2023-04-27 06:14:12 -04:00
512b39475b Update c/common and avoid setting umask
We can now use the new API for creating files and directories without
setting the umask to allow parallel usage of those methods.

This patch also bumps c/common for that.

[NO NEW TESTS NEEDED]

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-04-27 08:59:44 +02:00
af185b2f25 Merge pull request #18362 from rhatdan/quadlet
Support systemd optional prefix '-' for devices.
2023-04-27 02:59:18 -04:00
832b098471 Merge pull request #18303 from n1hility/user-mode
Add user-mode networking feature to Windows/WSL
2023-04-26 16:01:48 -04:00
edaf3b4d5e Add sha256: to images history id for docker compatibility
Fixes: https://github.com/containers/podman/issues/17762

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-04-26 14:38:07 -04:00
0277adf693 Merge pull request #18351 from yanfeng1992/ManifestAnotateHelp
fix: podman manifest annotate help example should use image digest
2023-04-26 14:27:58 -04:00
d51911f7b0 Support systemd optional prefix '-' for devices.
Systemd supports unit files with a prefix '-' which
tells the system to check if the content exists before
using it. This would allow the QM project to specify
AddDevice=-/dev/kvm, which would add the /dev/kvm device
to the container iff it exists on the host.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-04-26 14:22:57 -04:00
ba45863753 chore(deps): update dependency requests to ~=2.29.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-04-26 16:38:23 +00:00
d905e412e8 Fix simple typo in podman-network-create.md
Found a typo today while reading documentation.

Simple enough change :-) 

Signed-off-by: Mike Eisemann <me@michaeleisemann.com>

Signed-off-by: AndroidKitKat <me@michaeleisemann.com>
2023-04-26 12:14:19 -04:00
846e7aa21b Merge pull request #18342 from edsantiago/aardvarks_are_slow
Netavark userns test: give aardvark time to come up
2023-04-26 08:51:47 -04:00
3b85ab354a Merge pull request #18328 from ashley-cui/stop
Recover from failed podman machine start
2023-04-26 05:08:22 -04:00
931447b995 Merge pull request #18344 from Luap99/container-ns
rootless: support joining containers that use host ns
2023-04-26 04:06:57 -04:00
25b026dd31 Merge pull request #18339 from vrothberg/fix-17859
sqlite: move first read into a transaction
2023-04-26 03:29:00 -04:00
e95e9be76b fix manifest annotate help
[NO NEW TESTS NEEDED]
Signed-off-by: huangyanfeng <huangyanfeng1992@gmail.com>
2023-04-26 11:15:29 +08:00
bdf367958e Netavark userns test: give aardvark time to come up
Nasty test flake, "bad address nc-server.dns.podman"

Cause: "There is absolutely no guarantee that aardvark-dns
is ready before the container is started." (source: Paul).

Workaround (not a real solution): wait before doing a host lookup.

Also: remove a 99%-duplicate test.

Closes: #16272   (I hope)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-04-25 10:54:01 -06:00
db0576ec26 Merge pull request #18338 from vrothberg/fix-18321
auto-update: log errors checking for updates
2023-04-25 10:07:16 -04:00
af9f97dec8 Merge pull request #18336 from containers/renovate/dawidd6-action-send-mail-3.x
[skip-ci] Update dawidd6/action-send-mail action to v3.7.2
2023-04-25 10:04:17 -04:00
bbe9d61c49 sqlite: move first read into a transaction
According to an old upstream issue [1]: "If the first statement after
BEGIN DEFERRED is a SELECT, then a read transaction is started.
Subsequent write statements will upgrade the transaction to a write
transaction if possible, or return SQLITE_BUSY."

So let's move the first SELECT under the same transaction as the table
initialization.

[NO NEW TESTS NEEDED] as it's a hard to cause race.

[1] https://github.com/mattn/go-sqlite3/issues/274#issuecomment-1429054597

Fixes: #17859
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-04-25 16:01:49 +02:00
f3c3ef72dc Recover from failed podman machine start
In rare instances, if podman machine start does not exit correctly, the machine can be left in a "Starting" state, when in reality the machine is stopped. This prevents the user from actually starting the machine. This commit makes sure that on `podman machine stop`, we check if this is the case, and correctly set the starting state to false, allowing the user to start their machine again.

Signed-off-by: Ashley Cui <acui@redhat.com>
2023-04-25 09:29:15 -04:00
d222a392cd rootless: support joining contianers that use host ns
The problem right now is that --ns contianer: syntax causes use to add
the namespace path to the spec which means the runtime will try to call
setns on that. This works fine for private namespaces but when the host
namspace is used by the container a rootless user is not allowed to
join that namespace so the setns call will return with permission
denied.

The fix is to effectively switch the container to the `host` mode
instead of `container:` when the mention container used the host ns. I
tried to fix this deep into the libpod call when we assign these
namespaces but the problem is that this does not work correctly because
these namespace require much more setup. Mainly different kind of mount
points to work correctly.

We already have similar work-arounds in place for pods because they also
need this.

For some reason this does not work with the user namespace, I don't know
why and I don't think it is really needed so I left this out just to get
at least the rest working. The original issue only reported this for the
network namespace.

Fixes #18027

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-25 15:21:31 +02:00
0e955bec74 auto-update: return errors when checking for updates
When checking for new images on registries, do not suppress
and debug-log errors but return them.  Other images and units
will still be processed.

That is important to a) stop hiding flaky registries (see #18321)
                     b) mark the updates as `failed` instead of `false`

[NO NEW TESTS NEEDED]

Closes: #18321
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-04-25 12:15:22 +02:00
0cf423f1dd Merge pull request #18313 from c4rlo/patch-1
system/reset.go: help: fix typo
2023-04-25 05:19:15 -04:00
0a8113be7b Merge pull request #18323 from edsantiago/container_exit_signaling
system tests: safer container-stop signaling
2023-04-25 05:07:29 -04:00
fc8bd45215 [skip-ci] Update dawidd6/action-send-mail action to v3.7.2
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-04-25 08:12:08 +00:00
191892419f Merge pull request #18334 from containers/renovate/common-image-and-storage-deps
fix(deps): update github.com/containers/common digest to 46c4463
2023-04-25 04:11:02 -04:00
242d63af80 Merge pull request #18329 from edsantiago/create_2_sameip
e2e create same-IP: try to fix flake
2023-04-25 03:59:09 -04:00
ed6b19fef0 fix(deps): update github.com/containers/common digest to 46c4463
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-04-25 04:25:28 +00:00
230ddbe0ca Add user mode networking feature to Windows
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2023-04-24 17:11:54 -05:00
3216110de7 system/reset.go: help: fix typo
[NO NEW TESTS NEEDED]

Signed-off-by: Carlo Teubner <435950+c4rlo@users.noreply.github.com>
2023-04-24 22:08:11 +01:00
ae5ed6d851 e2e create same-IP: try to fix flake
Our friend #7096 is still not fixed: it continues to flake,
singletons only, and only in the "create" test (not "run").

My guess: maybe there's a race somewhere in IP assignment,
such that container1 can have an IP, but not yet be running,
and a container2 can sneak in and start with that IP, and
container1 is the one that fails?

Solution: tighten the logic so we wait for container1 to
truly be running before we start container2. And, when we
start container2, do so with -a so we get to see stdout.
(Am not expecting it to be helpful, but who knows).

Also very minor cleanup

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-04-24 14:09:52 -06:00
3ecb174eee Merge pull request #18320 from Luap99/ps-state
ps: --format {{.State}} match docker output
2023-04-24 19:56:32 +00:00
5b455463f5 Merge pull request #18322 from n8henrie/issue_18111
Revert "Resolve symlink path for qemu directory if possible"
2023-04-24 18:04:25 +00:00
435c9a049e Merge pull request #18317 from vrothberg/fix-18275
[CI:DOCS] Quadlet: clarify overriding user/system services
2023-04-24 18:00:46 +00:00
faeed14f61 system tests: safer container-stop signaling
Having a container spin-wait on a /stop file, then exit, is
unsafe: 'podman exec $ctr touch /stop' can get sucked into
container cleanup before the exec terminates, resulting in
the podman-exec failing and hence the test failing.

Most existing instances of this pattern are unnecessary.
Replace those with just 'podman rm -f'.

When necessary, use a variety of safer alternatives.

Re-Closes: #10825 (already closed; this addresses remaining cases)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-04-24 11:35:49 -06:00
6014f26c47 Revert "Resolve symlink path for qemu directory if possible"
This reverts commit 6b6458916eaa51f0dbbcfeccd740706697697ad3 (Resolve
symlink path for qemu directory if possible).

Fully resolving the symlink to qemu solves some issues for
aarch64-darwin nix with regards to finding `edk2-aarch64-code.fd`, but
unfortunately the fully resolved path includes the version number,
making it so that even patch updates break the path to
homebrew-installed qemu files.

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

[NO NEW TESTS NEEDED]

Signed-off-by: Nathan Henrie <nate@n8henrie.com>
2023-04-24 10:06:43 -06:00
9f4f4297d9 Merge pull request #18319 from vrothberg/fix-10825
test/system/260-sdnotify.bats: fix test flake
2023-04-24 14:04:51 +00:00
c5a928c5b7 ps: --format {{.State}} match docker output
We should return the raw state string without any extra formatting in
this case.
`{{.Status}}` returns the nicely formatted string used in the default ps
output, e.g. `Up 2 seconds ago`, while `{{.State}}` returns the state as
string, e.g. `running`.

This matches the docker output and allows better use in scripts.

Fixes #18244

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-24 14:18:26 +02:00
b4eecd908a test/system/260-sdnotify.bats: fix test flake
The `exec` session somestimes exits with 137 as the exec session races
with the cleanup process of the exiting container.  Fix the flake by
running a detached exec session.

Fixes: #10825
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-04-24 14:09:09 +02:00
3c53621885 Merge pull request #18257 from vrothberg/fix-18250
Makefile: do not prefix /etc
2023-04-24 11:45:48 +00:00
1361c6a334 [CI:DOCS] Quadlet: clarify overriding user/system services
Highlight that existing user and system services may be overridden if
they have same name as the Quadlet file.  Also point the user to
systemctl and how to list existing files.

Closes: #18275
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-04-24 11:22:07 +02:00
d05a980792 Merge pull request #18288 from cevich/enable_rawhide_testing
Cirrus: Enable testing on Fedora rawhide
2023-04-24 08:20:08 +00:00
fb3b92b969 Eliminate transient container deps from wslkerninst
Resolves Win Installer CI issues where dep processing variance can
pull in gpgme, which doesn't compile on Windows without a
specialized msys2 setup.

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2023-04-23 17:11:55 -05:00
c08859bd74 Merge pull request #18274 from containers/renovate/common-image-and-storage-deps
fix(deps): update github.com/containers/common digest to 5547996
2023-04-21 14:48:48 +00:00
d4d733ed82 Merge pull request #18298 from tklauser/numcpu-call-twice
cmd/podman/pods: omit superfluous runtime.NumCPU call
2023-04-21 14:07:20 +00:00
134912aa3d Merge pull request #18252 from containers/dependabot/go_modules/github.com/docker/docker-23.0.4incompatible
build(deps): bump github.com/docker/docker from 23.0.3+incompatible to 23.0.4+incompatible
2023-04-21 14:04:55 +00:00
d16c880fb1 fix(deps): update github.com/containers/common digest to 5547996
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-04-21 12:37:46 +00:00
70bd096e47 cmd/podman/pods: omit superfluous runtime.NumCPU call
sysinfo.NumCPU already falls back to runtime.NumCPU in case the
platform-specific sysinfo.numCPU returns 0, see
554799639f/pkg/sysinfo/numcpu.go (L8-L13)

Also omit a second call to sysinfo.NumCPU and use the result from the
earlier call.

[NO NEW TESTS NEEDED]

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2023-04-21 14:28:56 +02:00