19293 Commits

Author SHA1 Message Date
d06480d99e Fix clashing subuid
When initing a podman machine, we match core's UID to the UID of the user on the host. If the UID is in the subUID range, the machine throws an error. Check if the UID is within the default range for /etc/subuid (10000:1000000), and if it is, we adjust the range to not include it.

Signed-off-by: Ashley Cui <acui@redhat.com>
2023-05-01 10:39:54 -04:00
cda2b6e7ea Merge pull request #18379 from giuseppe/small-fixes
some small fixes
2023-05-01 10:36:34 -04:00
22047c6321 Merge pull request #18377 from containers/dependabot/go_modules/github.com/docker/docker-23.0.5incompatible
build(deps): bump github.com/docker/docker from 23.0.4+incompatible to 23.0.5+incompatible
2023-05-01 10:33:38 -04:00
24be46a517 [CI:DOCS] troubleshooting: fix subuid example
Fix incorrect number of required subuids in subuid example.

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

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2023-05-01 16:03:04 +02:00
4dec42c6d8 Merge pull request #18396 from containers/renovate/github.com-moby-term-digest
Update github.com/moby/term digest to 0564e01
2023-05-01 10:01:06 -04:00
adf9fd445d Merge pull request #18381 from cevich/test_name_generator
Add name-generation test
2023-05-01 08:38:18 -04:00
f11ba8dc8c Merge pull request #17639 from arixmkii/provider-choice
Implement machine provider selection
2023-05-01 08:00:45 -04:00
bab4217cd1 manifest, push: use source as destination if not specified
`manifest push <source>` must work as-is if `source` is actually a valid
path and no destination is provided, `podman` must internally choose
`source` as its `destination` just like `podman push`

See: https://github.com/containers/podman/blob/main/cmd/podman/images/push.go#L161
Closes: https://github.com/containers/podman/issues/18360

Signed-off-by: Aditya R <arajan@redhat.com>
2023-05-01 17:04:11 +05:30
202701e653 Update github.com/moby/term digest to 0564e01
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-05-01 09:44:21 +00:00
0429b6816b Merge pull request #18361 from edsantiago/push_test_cleanup
e2e cleanup: push with auth: add error checks
2023-04-30 07:18:16 -04:00
e8f34e4579 Add name-generation test
Podman's container-name generation depends on the global RNG state being
properly initialized (seeded).  Should this not happen for some reason
(or it's seeded with a static value), podman will generate the exact
same repeating sequence of container names (assuming no clashes with
existing containers).  Add a test to confirm this is always the case.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-04-28 16:30:01 -04:00
b5ef9555ab Implement machine provider selection
GetSystemDefaultProvider reworked to fetch provider value from
the config file.

Additional environment variable CONTAINERS_MACHINE_PROVIDER is
supported to override the config for testing purposes.

Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
2023-04-28 17:47:10 +03:00
70870895b7 libpod: improve errors management in cleanupStorage
fix some issues with the handling of errors, we print an error only
when there is already one set to be returned.  Also the first error is
not printed, since it is reported back to the caller of the function.

Improve some messages with more context that can be helpful when
things go wrong.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-04-28 11:51:06 +02:00
5592dc12f9 libpod: report unmount idmapped rootfs errors
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-04-28 11:46:34 +02:00
2932208c2a test: do not wait 10 seconds before killing myyaml
the "run_podman rm -a -f" cleanup would take a long time since myyaml
doesn't exit immediately.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-04-27 22:07:56 +02:00
891bc117e4 podman: simplify code with a switch
simplify the readerFromArg to avoid the same boilerplate code.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-04-27 22:07:56 +02:00
bac57409fe test: fix typo
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-04-27 22:07:56 +02:00
19152fa349 Merge pull request #18326 from cevich/f38_update
Cirrus: Update CI VM Image to F38
2023-04-27 12:42:56 -04:00
0146183a57 Merge pull request #18343 from edsantiago/stop-it
e2e: remove "-it" from podman run & exec
2023-04-27 11:56:38 -04:00
bff563210b Merge pull request #18374 from edsantiago/delete_nightly_treadmill
Nightly dependency treadmill: remove
2023-04-27 11:01:07 -04:00
5fefb54d2b build(deps): bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 23.0.4+incompatible to 23.0.5+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v23.0.4...v23.0.5)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-27 13:54:52 +00:00
b7b3a19768 Merge pull request #18365 from nalind/copypasta
Fix a copy/paste error in an error message
2023-04-27 09:36:29 -04:00
129c075669 Merge pull request #18363 from leo8a/patch-1
Update short description for disconnect cmd
2023-04-27 09:33:53 -04:00
0a92b399df swagger: fix Info name conflict
go swagger has a flat namespace so it doesn't handle name conflicts at
all. The libpod info response uses the Info struct from some docker dep
instead. Because we cannot change the docker dependency simply rename
the Info struct, but only via swagger comment not the go actual struct.

I verified locally that this works.

Fixes #18228

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-27 14:44:18 +02:00
20c42489e3 Nightly dependency treadmill: remove
...it never worked as intended. Cron job has been deleted.

(Note: this is not the same as the *buildah* treadmill, #13808,
which continues to be active and necessary)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-04-27 05:56:23 -06:00
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
33fa54580e Update short description for disconnect cmd
[NO NEW TESTS NEEDED]

Signed-off-by: Leo Ochoa <lochoa@redhat.com>
2023-04-27 13:33:28 +02: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
aca993632f windows: podman save allow the use of stdout
By default podman save tries to write to /dev/stdout, this file doe snot
exists on windows and cannot be opened. Instead we should just use fd 1
in such case.

[NO NEW TESTS NEEDED]

Fixes #18147

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-27 13:12:05 +02: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
7ff2eaf960 Cirrus: Update CI VM Image to F38/37
Signed-off-by: Chris Evich <cevich@redhat.com>
2023-04-26 14:55:05 -04:00
0e1ddd3dff Cirrus: Run code validation on rawhide
Signed-off-by: Chris Evich <cevich@redhat.com>
2023-04-26 14:55:05 -04:00
221e3023f6 Fix rand.Seed() deprecation in golang 1.20
Ref: https://pkg.go.dev/math/rand@go1.20#Seed

Note: For `runtime_test.go`, this test-case was never actually doing
what appears as it's intent .  Fixing it to work as intended would be
require incredibly libpod-invasive changes.  Do the least-worse thing and
simply confirm that consecutive generated names are different.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-04-26 14:55:03 -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
a0c7bb26a9 Fix a copy/paste error in an error message
When we encounter an error while pushing a manifest list, don't claim
that we encountered an error while adding an item to the list.

[NO NEW TESTS NEEDED]

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2023-04-26 12:45:03 -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
a027bf1021 e2e cleanup: push with auth: add error checks
Add actual tests (for expected errors, not just exit-status) to
the "push to local registry with authorization" test. As it is
now, if the registry is unreachable, the test passes a number
of steps and only fails later, with a misleading diagnostic.

Followup to, but does not fix, #18286

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-04-26 09:25:59 -06:00
eeb210bc56 e2e: remove "-it" from podman run & exec
...at least as many as possible. "run/exec -it" make no sense
in a CI environment; I believe the vast majority of these are
the result of fingers typing on autopilot, then copy/pasting
cascades from those. This PR gets rid of as many -it/-ti as
possible. Some are still needed for testing purposes.

Y'all have no idea how much I hate #10927 (the "no logs from conmon"
flake). This does not fix the underlying problem, nor does it even
eliminate the flake (The "exec terminal doesn't hang" test needs
to keep the -ti flag, and that's one of the most popular flakers).
But this at least reduces the scope of the problem. It also removes
a ton of nasty orange "input device is not a TTY" warnings from logs.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-04-26 09:21:02 -06:00
64959b744f pkg/machine: rework RemoveConnection()
It really does not make sense to call RemoveConnection() twice and then
update the config file a third time in updateDefaultMachineinConfig().
This results in unnecessary reads/writes and more code.

Simplyfy this into one function that is only called once and do all
updates at once.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-26 16:57:22 +02:00
2296e71e39 machine: qemu only remove connection after confirmation
the connection remove call must be done inside the function that is
returned so that we wait until the user confirmed it.

Fixes #18330

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-26 16:44:28 +02:00
c8e423b55e Add file swith for pre-exec
The long term goal was to provide the customer a way to turn on the
preexec_hooks processing of script by having some kind of configuration
that could be read.  I had tried putting it into containers.conf to
start, but that turned out to be unyieldly quickly and time is of
the essence for this fix.  That is mostly due to the fact that this
code is preexecution and in C, the conatiners.conf file is read in
Go much further down the stack.

After first trying this process using an ENVVAR, I have
thought it over and chatted with others and will now look for a
/etc/containers/podman_preexec_hooks.txt file to exist.  If the admin
had put one in there, we will then process the files in the
directories `/usr/libexec/podman/pre-exec-hooks`
and `/etc/containers/pre-exec-hooks`.

Thoughts/suggestions gratefully accepted. This will be a 8.8/9.2 ZeroDay
fix and will need to be backported to the v4.4.1-rhel branch.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2023-04-26 10:20:10 -04:00
6aaf6a2843 system reset: show graphRoot/runRoot before removal
system reset it says it will delete containers, images, networks, etc...
However it will also delete the graphRoot and runRoot directories.
Normally this is not an issue, however in same cases these directories
were set to the users home directory or some other important system
directory.

As first step simply show the directories that are configured and thus
will be deleted by reset. As future step we could implement some
safeguard will will not delete some known important directories however
I tried to keep it simple for now.

[NO NEW TESTS NEEDED]

see #18349 and #18295

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-04-26 16:02:59 +02: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