2111 Commits

Author SHA1 Message Date
d85ac938e6 Merge pull request #24442 from Honny1/change-healthcheck-config-via-podman-update
Configure HealthCheck with `podman update`
2024-11-22 15:57:30 +00:00
a1249425bd Configure HealthCheck with podman update
New flags in a `podman update` can change the configuration of HealthCheck when the container is started, without having to restart or recreate the container.

This can help determine why a given container suddenly started failing HealthCheck without interfering with the services it provides. For example, reconfigure HealthCheck to keep logs longer than the usual last X results, store logs to other destinations, etc.

Fixes: https://issues.redhat.com/browse/RHEL-60561

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2024-11-19 19:44:14 +01:00
fa5e3b6e94 Merge pull request #24535 from M1cha/network-driver-options
add support for driver-specific options during container creation
2024-11-14 09:29:44 +00:00
315e7412e8 add support for driver-specific options during container creation
This way has a huge disadvantage: The user will not see an error when he
uses a non-existent option. Another disadvantage is, that if we add more
options within podman, they might collide with the names chosen by
plugins. Such issues might be hard to debug.
The advantage is that the usage is very nice:
--network bridge:opt1=val1,opt2=val2.

Alternatively, we could put this behind `opt=`, which is harder to use,
but would solve all issues above:
--network bridge:opt=opt1=val1,opt=opt2=val2

Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
2024-11-13 18:14:58 +01:00
6809bf1d90 doc: fix words repetitions
Signed-off-by: Maël Azimi <mael.azimi@moul.re>
2024-11-13 15:21:40 +01:00
a358d83ce9 Merge pull request #24437 from lambinoo/feat-split-pod-container-start-24401
Add key to control if a container can get started by its pod
2024-11-05 15:04:16 +00:00
2597eeae70 Add key to control if a container can get started by its pod
By default today, the container is always started if its pod is also
started. This prevents to create custom with systemd where containers in
a pod could be started through their `[Install]` section.

We add a key `StartWithPod=`, enabled by default, that enables one to
disable that behavior.

This prevents the pod service from changing the state of the container
service.

Fixes #24401

Signed-off-by: Farya L. Maerten <me@ltow.me>
2024-11-05 08:39:23 +01:00
9b8b2bf684 Merge pull request #24449 from ygalblum/quadlet-mount-image
Quadlet - support image file based mount in container file
2024-11-04 10:20:33 +00:00
a109f22eec Merge pull request #24431 from ntrrgc/2024-10-31-doc-interactive
doc: explain --interactive in more detail
2024-11-01 22:31:26 +00:00
dbfc8cccda Quadlet - support image file based mount in container file
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2024-11-01 16:20:23 -04:00
37c8e10031 doc: explain --interactive in more detail
Clarifies the behavior of --interactive in both attached and unattached
scenarios.

Adds a caveat and explanation for --interactive being hungry as
described in https://github.com/containers/podman/issues/24370.

Signed-off-by: Alicia Boya García <aboya@igalia.com>
2024-11-01 08:23:08 +01:00
2a0a52469c docs: fix broken example
In coreos /mnt is a symlink to /vat/mnt and systemd does not like do use
the symlink for some reason. Simply fix the example to use /Users which
now works as we always create the directories even on /.

Fixes #24281

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-29 18:19:07 +01:00
eb90154975 doc: Remove whitespace before comma
Signed-off-by: Maximilian Kolb <mail@maximilian-kolb.de>
2024-10-23 19:44:24 +02:00
67e0fa8b89 quadlet: add default network dependencies to all units
There is no good reason for the special case, kube and pod units
definitely need it. Volume and network units maybe not but for
consistency we add it there as well. This makes the docs much easier to
write and understand for users as the behavior will not differ.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-18 14:01:22 +02:00
57b022782b quadlet: ensure user units wait for the network
As documented in the issue there is no way to wait for system units from
the user session[1]. This causes problems for rootless quadlet units as
they might be started before the network is fully up. TWhile this was
always the case and thus was never really noticed the main thing that
trigger a bunch of errors was the switch to pasta.

Pasta requires the network to be fully up in order to correctly select
the right "template" interface based on the routes. If it cannot find a
suitable interface it just fails and we cannot start the container
understandingly leading to a lot of frustration from users.

As there is no sign of any movement on the systemd issue we work around
here by using our own user unit that check if the system session
network-online.target it ready.

Now for testing it is a bit complicated. While we do now correctly test
the root and rootless generator since commit ada75c0bb8 the resulting
Wants/After= lines differ between them and there is no logic in the
testfiles themself to say if root/rootless to match specifics. One idea
was to use `assert-key-is-rootless/root` but that seemed like more
duplication for little reason so use a regex and allow both to make it
pass always. To still have some test coverage add a check in the system
test to ask systemd if we did indeed have the right depdendencies where
we can check for exact root/rootless name match.

[1] https://github.com/systemd/systemd/issues/3312

Fixes #22197

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-18 11:43:48 +02:00
d5be88e0c2 Merge pull request #24228 from giuseppe/do-not-lower-rlimits
podman: do not set rlimits to the default value
2024-10-15 22:02:52 +00:00
3a4c4468f2 Mention containers.conf settings for podman machine commands
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-10-14 08:17:47 -04:00
5ebba75dbd spec: always specify default rlimits
the previous implementation was expecting the rlimits to be set for the
entire process and clamping the values only when running as rootless.

Change the implementation to always specify the expected values in the
OCI spec file and do the clamping only when running as rootless and
using the default values.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-10-11 23:04:27 +02:00
bac655a6b1 Allow removing implicit quadlet systemd dependencies
Quadlet inserts network-online.target Wants/After dependencies to ensure pulling works.
Those systemd statements cannot be subsequently reset.

In the cases where those dependencies are not wanted, we add a new
configuration item called `DefaultDependencies=` in a new section called
[Quadlet]. This section is shared between different unit types.

fixes #24193

Signed-off-by: Farya L. Maerten <me@ltow.me>
2024-10-09 14:48:05 +02:00
95a55f971c Merge pull request #24177 from eriksjolund/docs-prefer-option-network
docs: prefer --network to --net
2024-10-07 09:18:50 +00:00
d0cb62aacc podman-systemd.unit.5: adjust example options
Use the reserved domain name example.com in the examples.
For details, see RFC 2606
https://datatracker.ietf.org/doc/html/rfc2606#section-3

Modify PublishPort examples to make them reflect more
common scenarios.

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

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2024-10-06 17:31:41 +02:00
374844817d docs: prefer --network to --net
The option --network is the more official option as it is
listed in

podman run --help
podman kube play --help

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2024-10-05 09:10:15 +02:00
17d29a2f6d Merge pull request #24122 from PhrozenByte/docs-hosts-file
Mention `no_hosts` and `base_hosts_file` configs in CLI option docs
2024-10-04 16:58:13 +00:00
d8b26ac1b4 Fix typo in secret inspect examples
Signed-off-by: Eric D. Helms <ericdhelms@gmail.com>
2024-10-03 15:23:07 -04:00
6f9cc3755a Mention no_hosts and base_hosts_file configs in CLI option docs
Follow-up to #24043

Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
2024-10-02 23:15:24 +02:00
bb35ad1da4 Document that zstd:chunked is downgraded to zstd when encrypting
A part of https://github.com/containers/common/issues/2117 .

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-09-30 21:52:35 +02:00
639f3c6336 Merge pull request #24104 from Sativarsainath-26/network-cmd-removal
update docs for network-cmd-path
2024-09-30 15:50:05 +00:00
5cef143030 Merge pull request #24043 from PhrozenByte/docs-add-host-gateway
[CI:DOCS] Update documentation of CLI options affecting `/etc/hosts`
2024-09-30 13:37:22 +00:00
e07c31068f adding docs for network-cmd-path
Signed-off-by: Sainath Sativar <Sativar.sainath@gmail.com>
2024-09-30 10:41:10 +01:00
4e38381d37 Merge pull request #23900 from Honny1/healthcheck-log
HealthCheck log output options
2024-09-26 11:55:55 +00:00
6e4ef2c54d Update documentation of --no-hosts, --hostname, and --name CLI options
Update the docs to properly cross-reference the `--add-host` option.

Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
2024-09-25 21:42:56 +02:00
c67d8baeb6 Update documentation of --add-host CLI option
Document the special *host-gateway* flag introduced with #19152, mention the special `host.containers.internal` and `host.docker.internal` hostnames, and clarify the option's usage in general.

Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
2024-09-25 21:35:53 +02:00
de856dab99 Add --health-max-log-count, --health-max-log-size, --health-log-destination flags
These flags can affect the output of the HealtCheck log. Currently, when a container is configured with HealthCheck, the output from the HealthCheck command is only logged to the container status file, which is accessible via `podman inspect`.
It is also limited to the last five executions and the first 500 characters per execution.

This makes debugging past problems very difficult, since the only information available about the failure of the HealthCheck command is the generic `healthcheck service failed` record.

- The `--health-log-destination` flag sets the destination of the HealthCheck log.
  - `none`: (default behavior) `HealthCheckResults` are stored in overlay containers. (For example: `$runroot/healthcheck.log`)
  - `directory`: creates a log file named `<container-ID>-healthcheck.log` with JSON `HealthCheckResults` in the specified directory.
  - `events_logger`: The log will be written with logging mechanism set by events_loggeri. It also saves the log to a default directory, for performance on a system with a large number of logs.

- The `--health-max-log-count` flag sets the maximum number of attempts in the HealthCheck log file.
  - A value of `0` indicates an infinite number of attempts in the log file.
  - The default value is `5` attempts in the log file.
- The `--health-max-log-size` flag sets the maximum length of the log stored.
  - A value of `0` indicates an infinite log length.
  - The default value is `500` log characters.

Add --health-max-log-count flag

Signed-off-by: Jan Rodák <hony.com@seznam.cz>

Add --health-max-log-size flag

Signed-off-by: Jan Rodák <hony.com@seznam.cz>

Add --health-log-destination flag

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2024-09-25 14:01:35 +02:00
dc4bbe2b65 Merge pull request #24036 from bgilbert/unable
docs: Fix missing negation
2024-09-23 09:06:46 +00:00
7aedb541d5 Merge pull request #24018 from ygalblum/allow-symlinks
Quadlet - add full support for Symlinks
2024-09-23 06:49:12 +00:00
62e5eb4734 docs: Fix missing negation
Fixes: 32c2cea0f9a7 ("Remove future tense from man pages")
Signed-off-by: Benjamin Gilbert <bgilbert@backtick.net>
2024-09-22 22:19:38 -07:00
133ea31ffb Quadlet - add full support for Symlinks
Use os.ReadDir recursively instead of filepath.WalkDir
Use map instead of list to easily find looped Symlinks
Update existing tests and add a more elaborate one
Update the man page

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2024-09-20 11:11:03 -04:00
7dccf8faee docs: remove usage of deprecated --storage
in the doc of podman-build

Signed-off-by: Misaki Kasumi <misakikasumi@outlook.com>
2024-09-20 12:17:41 +08:00
00c13afcb9 podman-manifest-remove: update docs and help output
* podman manifest remove doesn't accept references as descriptions of
  what to remove from a list or index; only use digests in the man page
* podman manifest remove only removes one thing at a time; correct the
  man page examples

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2024-09-17 11:36:12 -04:00
3f0483f880 Merge pull request #23802 from jerome59/main
Podman CLI --add-host with multiple host for a single IP
2024-09-17 12:54:46 +00:00
f4d0e124d6 Podman CLI --add-host with multiple host for a single IP
Signed-off-by: Jerome degroote <jeromedu59230@gmx.fr>
2024-09-17 09:35:38 +02:00
fdb2edf46a Fxi typo in cache-ttl.md
Signed-off-by: Eike Waldt <waldt@b1-systems.de>
2024-09-16 14:58:38 +02:00
01a1761fd9 Minor typo noticed when reading podman man page
It reads "ashort-name" when it should read "a short-name" when viewing
via man. It's missing a space. Also removed some duplicate spaces.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2024-09-13 13:04:57 +01:00
7764bea981 Merge pull request #23819 from l0rd/kube-play-image-type-volumes
Add `kube play` support for volumes of type image
2024-09-11 18:32:24 +00:00
db12343e27 Add kube play support for image volume source
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2024-09-10 12:37:06 +00:00
0abbcfa50a podman images: sort repository with tags
When you sort by repository a user most likely also want the tags to be
sorted as well. At the very least to get a stable output as the order
could be changed pull podman tag/pull even if they keep using the same
tag name.

Fixes #23803

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-09-06 14:17:17 +02:00
dde031076b Merge pull request #23722 from umohnani8/jobs
Add support for Job to kube generate & play
2024-09-06 09:02:55 +00:00
b645f708f8 Merge pull request #23875 from rhatdan/rootless
Add podman-rootless.7 man page
2024-09-06 08:51:55 +00:00
ae14dff812 Merge pull request #23398 from yarikoptic/enh-codespell
Add codespell support (config, workflow to detect/not fix) and make it fix few typos
2024-09-05 18:53:25 +00:00
094fed7dbe Merge pull request #23846 from flouthoc/prune-cleancachemount
prune: add `--build-cache` to support clearing build cache using `CleanCacheMount`
2024-09-05 18:47:56 +00:00