18398 Commits

Author SHA1 Message Date
21febcb5cf docs: add starting to HealthCheckResults.Status
Signed-off-by: Alexis Couvreur <alexiscouvreur.pro@gmail.com>
2023-04-02 02:02:11 -04:00
8bd1e3f9d6 Merge pull request #17981 from ygalblum/quadlet-doc-fixes-remap
[CI:DOCS] Quadlet: RemapUsers documentation fixes
2023-04-01 16:41:24 -04:00
9144b75090 Merge pull request #17866 from ygalblum/doc-kube-secret
[CI:DOCS] Kube Play Doc: Document the support for K8S Secret
2023-04-01 09:24:06 -04:00
8a92f9d626 Merge pull request #17992 from giuseppe/safe-mount-subpath
libpod: mount safely subpaths
2023-03-31 15:52:53 -04:00
4d56292e7a libpod: mount safely subpaths
add a function to securely mount a subpath inside a volume.  We cannot
trust that the subpath is safe since it is beneath a volume that could
be controlled by a separate container.  To avoid TOCTOU races between
when we check the subpath and when the OCI runtime mounts it, we open
the subpath, validate it, bind mount to a temporary directory and use
it instead of the original path.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-03-31 19:48:03 +02:00
0858fab601 Merge pull request #17995 from umohnani8/secrets
Use secret.items to create volume mounts if present
2023-03-31 13:42:14 -04:00
8b6a7c1826 Use secret.items to create volume mounts if present
If the kube yaml volumes has secret.items set, then use
the values from that to set up the paths inside the container
similar to what we do for configMap.
Add tests for this as well.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-03-31 11:49:47 -04:00
5145852833 Merge pull request #17997 from giuseppe/drop-exec-hook-error-message
rootless: drop preexec hook error message
2023-03-31 10:59:18 -04:00
266cc78829 rootless: drop preexec hook error message
the exec hooks already print the error message, so there is no need to
print another one.

[NO NEW TESTS NEEDED]

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-03-31 09:58:07 +02:00
d79519e708 Quadlet: RemapUsers documentation fixes
Fix the example for RemapGid from keep-id to keep-groups
Reflect the chnages to the support for keep-id in Containers as well

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-03-30 15:53:26 +03:00
3e44a7afed Merge pull request #17974 from vrothberg/fix-17956
fix volume-plugin-test flake
2023-03-30 06:26:03 -04:00
8e79ec8bab Merge pull request #17973 from vrothberg/fix-17828
speed up image listing
2023-03-30 06:01:13 -04:00
7f8d5e5654 speed up image listing
As found in #17828, image listing does not scale well with a growing
number of local images.  Make use of recent improvements in libimage
that allow for computing the dangling and parent data with _one_ layer
tree.  Prior, the layer tree had to be recomputed _twice_ for each
image.

[NO NEW TESTS NEEDED] as it's a non-functional performance change.

Fixes: #17828
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-03-30 09:45:44 +02:00
f0cfbbe2cc vendor containers/common@e27c30ee9b
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-03-30 09:34:32 +02:00
70abb4ae5b fix volume-plugin-test flake
Wait for the socket to be ready befor trying to create a volume with the
driver.

Fixes: #17956
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-03-30 09:15:13 +02:00
411693c769 Merge pull request #17976 from Luap99/e2e-gpg-output
test/e2e: gpg keep stdout/err attached
2023-03-29 16:28:19 -04:00
fb80f6f262 Merge pull request #17845 from arixmkii/win-build-doc
[CI:DOCS] Document building Podman remote on Windows hosts
2023-03-29 14:11:04 -04:00
b3e8791f68 Document building Podman remote on Windows hosts
Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
2023-03-29 19:34:49 +03:00
60d16d9f8e Merge pull request #17961 from ygalblum/quadlet-remap-keepid-map
Quadlet - Support setting UID and GID for --userns=keep-id
2023-03-29 18:01:56 +02:00
395d852183 Merge pull request #17847 from TomSweeneyRedHat/dev/tsweeney/networkup
[CI:DOCS] Add network subnets info to network man page
2023-03-29 17:55:42 +02:00
c40eaa2423 test/e2e: gpg keep stdout/err attached
By default go will not keep the stdout/err attach when executing
commands via exec.Command(). It is required to explicitly pass the
current stdout/err fds down to the child so we can see the error output
in the logs to debug #17966.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-03-29 16:33:28 +02:00
d29a85b80e Merge pull request #17959 from vrothberg/fix-17607
auto-update: stop+start instead of restart sytemd units
2023-03-29 15:22:57 +02:00
f131eaa74a auto-update: stop+start instead of restart sytemd units
It turns out the restart is _not_ a stop+start but keeps certain
resources open and is subject to some timeouts that may differ across
distributions' default settings.

[NO NEW TESTS NEEDED] as I have absolutely no idea how to reliably cause
the failure/flake/race.

Also ignore ENOENTS of the CID file when removing a container which has
been identified of actually fixing #17607.

Fixes: #17607
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-03-29 11:31:35 +02:00
be7827c7e6 Update docs/source/markdown/podman-network.1.md
Co-authored-by: Paul Holzinger <45212748+Luap99@users.noreply.github.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-03-28 17:47:30 -04:00
c8eeab21cf Merge pull request #16315 from flouthoc/remote-ignore-symlink
remote,build: ignore if `.containerignore` or `.dockerignore` is a symlink outside of buildContext
2023-03-28 23:23:07 +02:00
9369a3c336 Merge pull request #17963 from Luap99/slirp-dns-userns
fix slirp4netns resolv.conf ip with a userns
2023-03-28 21:57:03 +02:00
723e879077 Merge pull request #17964 from umohnani8/detach
Add debug to --wait test
2023-03-28 20:55:16 +02:00
62321a2fce Merge pull request #17953 from vrothberg/fix-17859
sqlite: do not `Ping()` after connecting
2023-03-28 20:44:21 +02:00
ac2efdb862 Merge pull request #17949 from baude/hypervset
implement podman machine set for hyperv
2023-03-28 17:41:40 +02:00
c335ff241a Add debug to --wait test
Add a debug line to the wait to test to see which container
is being left behind after the cleaup where the race is happening.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-03-28 10:01:02 -05:00
365131e0b7 Merge pull request #17930 from ygalblum/quadlet-systemd-specifiers
Quadlet - treat paths starting with systemd specifiers as absolute
2023-03-28 16:18:54 +02:00
81e5bffc32 fix slirp4netns resolv.conf ip with a userns
When a userns is set we setup the network after the bind mounts, at the
point where resolv.conf is generated we do not yet know the subnet.
Just like the other dns servers for bridge networks we need to add the
ip later in completeNetworkSetup()

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2182052

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-03-28 15:52:33 +02:00
71c5c6efa0 Merge pull request #17915 from containers/dependabot/go_modules/github.com/onsi/gomega-1.27.5
build(deps): bump github.com/onsi/gomega from 1.27.4 to 1.27.5
2023-03-28 15:24:58 +02:00
11e5c2d0fd Quadlet: add support for keep-id with mapping values
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-03-28 16:07:12 +03:00
b5df38c234 Quadlet E2E test - run quadlet as user generator
Some key are available only for user scope while there are no keys that
are supported only for system. So, better to run in user scope

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-03-28 15:57:55 +03:00
cdb5b3e990 sqlite: do not Ping() after connecting
`Ping()` requires the DB lock, so we had to move it into a transaction
to fix #17859. Since we try to access the DB directly afterwards, I
prefer to let that fail instead of paying the cost of a transaction
which would lock the DB for _all_ processes.

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

Fixes: #17859
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-03-28 11:27:43 +02:00
2cfb6e1c0e Merge pull request #17951 from edsantiago/containers_conf_override
system tests: use CONTAINERS_CONF_OVERRIDE
2023-03-28 04:47:17 -04:00
be9fb7bc8c Merge pull request #17945 from edsantiago/retry_golangcilint
CI: retry the golangci install
2023-03-28 04:43:56 -04:00
da96ff6cc7 Quadlet - treat paths starting with systemd specifiers as absolute
If a path (Yaml, ConfigMap, EnvFile) starts with a systemd path
specifier, treat the path as absolute
Add tests - unit, e2e and bats

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-03-28 10:30:33 +03:00
dd8ee49f67 Update docs/source/markdown/podman-kube-play.1.md.in
Grammar fixes

Co-authored-by: Valentin Rothberg <vrothberg@redhat.com>
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-03-28 10:20:16 +03:00
d85c8d7e84 system tests: use CONTAINERS_CONF_OVERRIDE
...not CONTAINERS_CONF. At least for most tests.

Nearly every system test currently using CONTAINERS_CONF=tmpfile
should be using CONTAINERS_CONF_OVERRIDE.

Simple reason: runtime (crun/runc), database_backend (bolt/sqlite),
logger, and other important settings from /etc/c.conf are not
usually written into the tmpfile. Those tests, therefore, are
not running podman as configured on the system.

Much more discussion: #15413

This PR is a prerequisite for enabling sqlite system tests. For
the sake of simplicity and sanity, I choose to submit the sqlite
switch as a separate PR once this passes and merges.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-03-27 15:18:09 -06:00
51d068ecc7 implement podman machine set for hyperv
add the ability to set cpu and processor counts on an existing vm.

Signed-off-by: Brent Baude <bbaude@redhat.com>

[NO NEW TESTS NEEDED]
2023-03-27 16:11:24 -05:00
905dc6de48 Merge pull request #17895 from vrothberg/containers_conf_extra
add CONTAINERS_CONF_OVERRIDE
2023-03-27 16:48:44 -04:00
6222d3bd19 Merge pull request #17894 from baude/hypervloadfromfilesystemfirst
hyperv: lookup machine on local filesystem first
2023-03-27 16:45:20 -04:00
a5621311e3 Merge pull request #17814 from containers/dependabot/go_modules/google.golang.org/protobuf-1.30.0
build(deps): bump google.golang.org/protobuf from 1.29.0 to 1.30.0
2023-03-27 16:41:58 -04:00
ec56f8df84 Merge pull request #17944 from edsantiago/sdnotify_race
system tests: fix racey sdnotify test
2023-03-27 16:38:18 -04:00
46b826a909 [CI:DOCS] Add network subnets info to network man page
Adds information to the network command to explain how
to change the default options for the bridge or IP.

This steals very liberally from @Luap99 's blog post:
https://blog.podman.io/2023/02/default-podman-network-subnets/

This addresses: https://issues.redhat.com/browse/OCPBUGS-9296

[NO NEW TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2023-03-27 16:33:59 -04:00
c09bd20d27 Merge pull request #17941 from Luap99/fix-IsNotExist-check
fix os.IsNotExist() CI check
2023-03-27 15:26:43 -04:00
dd8574022d CI: retry the golangci install
It flakes once or twice a day:

   VERSION=1.51.1 ./hack/install_golangci.sh
   Installing golangci-lint v1.51.1 into ./bin/golangci-lint
   golangci/golangci-lint info checking GitHub for tag 'v1.51.1'
   golangci/golangci-lint crit unable to find 'v1.51.1' - use 'latest'
      or see https://github.com/golangci/golangci-lint/releases for details

No visibility into why, and no special reason to believe that
retrying five seconds later will work, but it seems worth a try.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-03-27 10:53:17 -06:00
92e0efc5d0 system tests: fix racey sdnotify test
Race introduced in #16709, which changed 'top' to 'true', so
there was only a narrow window in which '.State.ConmonPod'
would be valid. Remove the race.

Fixes: #17882

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-03-27 10:47:49 -06:00