17733 Commits

Author SHA1 Message Date
479052afa6 Fixed podman update --pids-limit
Added the functionality for a user to update the PIDs limit for a
container.

Fixes: #16543

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2022-12-31 18:42:47 -05:00
553df8748b podman-remote,bindings: trim context path correctly when its emptydir
podman-remote converts and sends absolute path as context when its an
emptydir by adding additional seperator however it should correctly trim
the path and not add additional seperator for such use cases.

Closes: BZ#2145054

Signed-off-by: Aditya R <arajan@redhat.com>
2022-12-30 20:38:54 +05:30
9f5f092f16 Quadlet Doc: Add section for .kube files
In addition, for .container add RemapUidSize and fix Network

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2022-12-29 09:35:32 +02:00
200f86edea e2e: fix containers_conf_test
Prevents overwriting of TMPDIR environment.

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2022-12-27 18:20:42 +09:00
3fbf62e968 Merge pull request #16942 from baude/rmqcow2
Remove references to qcow2
2022-12-26 09:16:44 -05:00
0c94f61852 Allow '/' to prefix container names to match Docker
Fixes: https://github.com/containers/podman/issues/16663

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-12-26 07:37:43 -05:00
0c68058805 Remove references to qcow2
Issue #16928 rightly points out that qcow2 images are not used on all
podman architectures.

Fixes: #16928

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-12-25 10:49:47 -06:00
4a57cfb926 Merge pull request #16545 from rhatdan/read-only
Add containers.conf read-only flag support
2022-12-25 07:56:23 -05:00
438b00d3c7 Merge pull request #16933 from jpace121/fix-transient-mode-typos
[CI:DOCS]  Fix typos in man page regarding transient storage mode.
2022-12-24 12:24:29 -05:00
1635db4741 Fix typos in man page regarding transient storage mode.
Signed-off-by: James Pace <jpace121@gmail.com>
2022-12-23 10:45:57 -05:00
e000f8509f Merge pull request #16907 from vrothberg/refactor
infra/abi: refactor ContainerRm
2022-12-23 05:18:13 -05:00
693aa0c730 Merge pull request #16927 from judaew/patch-2
make: Use PYTHON var for .install.pre-commit
2022-12-23 05:17:58 -05:00
85ceb7fb5c make: Use PYTHON var for .install.pre-commit
Signed-off-by: Vadym-Valdis Yudaiev <judaew@outlook.de>
2022-12-22 23:45:26 +02:00
9fbf91801d Merge pull request #16904 from rhatdan/system
Output Size and Reclaimable in human form for json output
2022-12-22 13:49:17 -05:00
d20dbcd155 Merge pull request #16922 from rhatdan/docs
[CI:DOCS] Explain that relabeling/chowning of volumes can take along time
2022-12-22 12:03:54 -05:00
338b283935 Add containers.conf read-only flag support
If you are running temporary containers within podman play kube
we should really be running these in read-only mode. For automotive
they plan on running all of their containers in read-only temporal
mode. Adding this option guarantees that the container image is not
being modified during the running of the container.

The containers can only write to tmpfs mounted directories.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-12-22 11:57:28 -05:00
d27ebf2eeb Explain that relabeling/chowning of volumes can take along time
Users are surprised when chowning large volumes how long it can take
to relabel of chown the entire directory tree. This PR updates the
documentation to explain this fact to the user.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-12-22 08:54:00 -05:00
2a46b5e117 Merge pull request #16912 from vrothberg/fix-16875
events: support "die" filter
2022-12-22 07:59:54 -05:00
45b180c1f8 events: support "die" filter
Map "die" to the "died" status for Docker compat.

Fixes: #16857
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-12-22 10:59:40 +01:00
5211446516 Merge pull request #16901 from Luap99/service-close-fd
podman service: close duplicated /dev/null fd
2022-12-22 03:51:03 -05:00
0a34a4f645 Merge pull request #16794 from karta0807913/main
podman play kube support container startup probe
2022-12-21 15:52:50 -05:00
7400887744 Merge pull request #16911 from rhatdan/test
New system tests for conflicting options
2022-12-21 13:19:15 -05:00
0e14dcd567 Merge pull request #16910 from rhatdan/VENDOR
Vendor in latest containers/(buildah, image, common)
2022-12-21 11:18:55 -05:00
ac9a357406 Merge pull request #16908 from alexlarsson/transient-bundle-path
When in transient store mode, use rundir for bundlepath
2022-12-21 11:16:18 -05:00
af805b3efe Merge pull request #16565 from anjannath/docker-sock
pkginstaller: install podman-mac-helper by default
2022-12-21 11:08:07 -05:00
9bf882797d Merge pull request #16898 from alexlarsson/quadlet-oneshot
quadlet: Support Type=oneshot container files
2022-12-21 09:40:38 -05:00
1e84e1a8db infra/abi: refactor ContainerRm
The function grew into a big hairy ball over time and I personally
refrained from touching it as it seemed fragile.  Hence, refactor
the function into something more comprehensible and maintainable.
There is still potential for improvement but I want to tackle one
thing at a time.

[NO NEW TESTS NEEDED] as it shouldn't change behavior.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-12-21 13:05:25 +01:00
3808067ff8 When in transient store mode, use rundir for bundlepath
This means we store things like config.json and the secret files
also on tmpfs, lowering wear on disk and leaving less stuff on disk
on an unclean shutdown.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-12-21 12:50:23 +01:00
0179aa2451 quadlet: Support Type=oneshot container files
These just run once and are considered successful at exist. Not much is
needed to support it, but we have to avoid overwriting the type
with Type=notify.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-12-21 12:49:50 +01:00
236f0cc504 hacks/bats: keep QUADLET env var in test env
This is needed for the bats test to work

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-12-21 12:48:40 +01:00
97f9d625a9 New system tests for conflicting options
...make sure podman rejects being called with incompatible options

Replaces: https://github.com/containers/podman/pull/16813

Which is stuck in CI and Ed is on break.

Signed-off-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-12-21 06:23:29 -05:00
90ba443472 Merge pull request #16893 from alexlarsson/quadlet-better-default-handling
quadlet: Handle booleans that have defaults better
2022-12-21 06:23:12 -05:00
bfec23c363 Vendor in latest containers/(buildah, image, common)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-12-21 06:12:45 -05:00
24b1e81c5d Output Size and Reclaimable in human form for json output
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-12-20 17:11:21 -05:00
aecb5d3853 Merge pull request #16900 from Luap99/gingkolinter
ginkgo tests: apply ginkgolinter fixes
2022-12-20 13:30:05 -05:00
4724fa3075 podman service: close duplicated /dev/null fd
Since we open /dev/null to set it as STDIN we can close it after the
dup2() call. Using defer is not good enough since this function will
never exit since the http server will block. This is not a problem but
it reduces the open fds from the service by one.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-12-20 17:17:37 +01:00
c2d48c5935 Merge pull request #16892 from alexlarsson/transient-clean-unit
Add podman-clean-transient.service service
2022-12-20 10:49:51 -05:00
5f4d7b575d Merge pull request #16888 from Luap99/export-fd
export: use io.Writer instead of file
2022-12-20 10:47:19 -05:00
8e05caef6c ginkgo tests: apply ginkgolinter fixes
New fixes since my last commit 2ddf1c5cbd11.

https://github.com/nunnatsa/ginkgolinter

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-12-20 16:47:17 +01:00
62abb6bb20 Merge pull request #16886 from vrothberg/refactor
Refactor looking up containers in pkg/domain/infra abi
2022-12-20 10:44:45 -05:00
3e48d74c83 Add support for hostPath and configMap subpath usage
podman play kube now supports and has tests for the subpath field when using a hostPath volume type and a configMap volume type.
The hostpath works similarly to the named volume, allowing a user to specify a whole directory but also a specific file or subdir within that mount. Config Maps operate the same way but specifically allow users to mount specific data in a subpath alongside the existing data

resolves #16828

Signed-off-by: Charlie Doern <cbddoern@gmail.com>
2022-12-20 10:41:08 -05:00
ca40371ff5 Merge pull request #16894 from flouthoc/bump-buildah-ca578b290144
vendor: bump to buildah `ca578b290144` and use new distributed cache API
2022-12-20 09:56:58 -05:00
db648dc005 Merge pull request #16895 from giuseppe/always-create-userns-with-euid-not-0
rootless: always create userns with euid != 0
2022-12-20 09:51:52 -05:00
3ac5d10098 export: use io.Writer instead of file
This allows use to use STDOUT directly without having to call open
again, also this makes the export API endpoint much more performant
since it no longer needs to copy to a temp file.
I noticed that there was no export API test so I added one.

And lastly opening /dev/stdout will not work on windows.

Fixes #16870

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-12-20 14:38:41 +01:00
56982a9236 Merge pull request #16889 from rhatdan/kube
Stop recording annotations set to false
2022-12-20 08:23:52 -05:00
1bac160960 rootless: always create userns with euid != 0
always create a user namespace when running with euid != 0 since the
user is not owning the current mount namespace.

This issue happened on a Kubernetes cluster, where the pod was running
privileged but the UID was not 0, as it was configured in the image
itself.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-12-20 13:33:23 +01:00
90719d38f7 rootless: inhibit copy mapping for euid != 0
when running with euid != 0, inhibit the copy of the current mappings,
even if the kernel allows that.  This seems to be the expectation when
running in a Kubernetes cluster with a non-root user.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-12-20 13:32:58 +01:00
02555d1665 pkg/domain/infra/abi: introduce type containerWrapper
Add a wrapper to reduce boilerplate code.  This also paves the way for
adding an ignore option to `getContainersOptions`.

[NO NEW TESTS NEEDED] as it shouldn't change behavior.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-12-20 13:29:43 +01:00
987c8e3a78 vendor: bump to buildah ca578b290144 and use new cache API
Bump to buildah ca578b290144 and use new `cacheTo` and `cacheFrom` API.

[NO NEW TESTS NEEDED]
[NO TESTS NEEDED]

Signed-off-by: Aditya R <arajan@redhat.com>
2022-12-20 17:13:59 +05:30
0cf36684c6 quadlet: Handle booleans that have defaults better
The ReadOnly and the RunInit keys affect options that have a variable
default (configurable in containers.conf). This means we need to
handle them a bit differently in quadlet to allow overriding the
default. For example, we can't assume ReadOnly=false doesn't need to
add any argument because no argument may mean readonly=true if the default
is changed.

We now don't add any argument (leaving the default) if the key is not specified,
or we always add an argument (--foo or --foo=false) if the key is specified (overriding whatever the default is).

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-12-20 11:00:48 +01:00