1915 Commits

Author SHA1 Message Date
b5ce0ab2de Fix language, typos and markdown layout
[NO NEW TESTS NEEDED]

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2023-07-24 11:18:25 +02:00
cb5450af70 [CI:DOCS] Add note about QUADLET_UNIT_DIRS to simplify quadlet debug
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-07-24 10:23:02 +03:00
5dd8906e71 Merge pull request #19288 from IceWreck/quadlet-debugging-docs
[CI:DOCS] Add note on debugging quadlet unit files
2023-07-24 09:02:32 +02:00
0bb73bf554 Add note on debugging quadlet unit files
Signed-off-by: Anchit Bajaj <ab@abifog.com>
2023-07-24 05:06:09 +00:00
d4cfc498d7 Remove unnecessary use of the word "please".
Only use the word "please" in these situations:

- reader is asked to do something inconvenient
- reader is asked for permission
- reader is asked for forgiveness

Remove other uses of the word "please" to
make the language more efficient.

[NO NEW TESTS NEEDED]

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2023-07-23 17:31:29 +02:00
67f0340687 Merge pull request #18830 from harikannan512/new-18032-2
recursive call in user directories for unit files
2023-07-22 15:11:24 +02:00
3e534eff9d Add support for ShmSize to quadlet
I am working on running android auto in a quadlet.

[Container]
AddDevice=/dev/dri/renderD128
AddDevice=/dev/kvm
DropCapability=all
Environment=PULSE_SERVER=$XDG_RUNTIME_DIR/pulse/native
Environment=WAYLAND_DISPLAY=wayland-0
Environment=XDG_RUNTIME_DIR
Image=quay.io/slopezpa/qemu-aaos
ContainerName=Android
PodmanArgs=--shm-size=5g
SecurityLabelDisable=true
Volume=$XDG_RUNTIME_DIR:$XDG_RUNTIME_DIR

And I need to be able to set the --shm-size option.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-07-22 06:41:39 -04:00
413552e10e quadlet recursively scan for unit files
Signed-off-by: Hari Kannan <harikannan512@gmail.com>
2023-07-20 23:10:28 +01:00
ce736413b4 Ensure that we appropriately warn that TCP is insecure
`podman system service` + TCP is not a configuration we should be
recommending. There was already language about this in the
manpages, but it was not sufficient in explaining how bad of an
idea this is. Expand the manpage warnings, add a dedicated
heading so people notice, and add a warning every time the
service starts with a TCP URL that directs people to the manpage
to see that explanation.

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-07-20 14:22:04 -04:00
7974eb181b Merge pull request #19275 from jakecorrenti/since-volume-filter-support
Add `since` as valid filter option for `volume` subcommands
2023-07-19 23:34:05 +02:00
d98978ae15 Merge pull request #19256 from ygalblum/quadlet-working-dir
Quadlet - Allow setting Service WorkingDirectory for Kube units
2023-07-19 13:45:42 +02:00
8d190704a6 Quadlet - Allow setting Service WorkingDirectory for Kube units
Add key for Quadlet to set WorkingDirectory to the directory of the YAML or Unit file
Add Doc
Add E2E tests
Add System test

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-07-19 11:56:38 +03:00
3d6bc2f865 Fix markdown in docs for podman-network-create
Signed-off-by: iczero <iczero4@gmail.com>
2023-07-18 13:49:41 -07:00
e55e128fcd Add since as valid filter option for volume subcommands
Adds support for `since` as a valid filter option for `podman volume ls`
and `podman volume prune`.

Implements: #19228
Initially suggested from: #19119

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2023-07-18 14:52:42 -04:00
7791ffd215 Merge pull request #19140 from lsm5/podmansh-followup
Podmansh: Useful timeout error, increase timeout to 30s
2023-07-18 20:50:56 +02:00
6df17332b5 Podmansh: Better error, increase timeout to 30s
Co-authored-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-07-18 10:15:12 -04:00
96241159a8 Fix multiple filter options logic for podman volume ls
Fixes a bug where `podman volume ls` with multiple `label` filters would
return volumes that matched *any* of the filters, not *all* of them.

Adapts generating volume filter functions to be more in
line with how it is done for containers and pods.

Fixes: #19219

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2023-07-18 09:53:03 -04:00
49a924cf39 Merge pull request #19211 from jakecorrenti/add-reserved-flag-generate
Add `--podman-only` flag to `podman generate kube`
2023-07-16 17:34:35 +02:00
d0602e8f75 Add --podman-only flag to podman generate kube
Adds an `--podman-only` flag to `podman generate kube` to allow for
reserved annotations to be included in the generated YAML file.

Associated with: #19102

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2023-07-14 09:35:59 -04:00
bb72016f58 Merge pull request #19066 from Luap99/ps
top: do not depend on ps(1) in container
2023-07-14 13:17:59 +02:00
c46fd411e0 Merge pull request #19098 from imphil/userns-docs
[CI:DOCS] Better document the default value of --userns
2023-07-14 13:12:42 +02:00
265718596c Merge pull request #19225 from Luap99/network-doc
[CI:DOCS] update --network docs
2023-07-14 01:43:12 +02:00
0997cf012a Fix podman container prune docs for --filter
Fixes an error in the `podman container prune` docs that provides an
example of how to use the `--filter until=` flag/filter in an incorrect
way.

Fixes: #19119

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2023-07-13 12:04:13 -04:00
383d683f85 docs: podman-build --network add slirp and pasta
Support was added in buildah some weeks ago. [1]

[1] https://github.com/containers/buildah/pull/4877

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-07-13 16:31:17 +02:00
5e64cbf358 docs: podman run --network mention comma separted names
This syntax was used prior to 4.0 and is still supported for backwards
compatibility.

Fixes #19089

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-07-13 16:28:01 +02:00
85d9361332 network create: document --internal better
When using --internal for macvlan/ipvlan networks we simply do not add a
default gateway/route. Make this clear in the docs.

Fixes #18914

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-07-13 13:23:21 +02:00
69f112a8bf Merge pull request #19200 from rhatdan/secret1
Add secret support to podman login
2023-07-13 03:06:50 -04:00
cce8501a5b [CI:DOCS] Reformat and reorder table with --userns options
Reorder the table with --userns options to match the description below.
Also, reformat the Markdown to be better readable in source form.

Signed-off-by: Philipp Wagner <phw@ibm.com>
2023-07-12 16:05:06 +02:00
9d9f4aaafe Merge pull request #19006 from deuill/quadlet-volume-network-names
Allow setting volume and network names in Quadlet
2023-07-12 08:53:38 -04:00
d497eb369c Add secret support to podman login
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-07-12 08:45:02 -04:00
0dcfe6e069 Run codespell on code
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-07-11 16:44:22 -04:00
7b54fd84ec Add --no-trunc flag to maintain original annotation length
Adds a `--no-trunc` flag to `podman kube generate` preventing the
annotations from being trimmed at 63 characters. However, due to
the fact the annotations will not be trimmed, any annotation that is
longer than 63 characters means this YAML will no longer be Kubernetes
compatible. However, these YAML files can still be used with `podman
kube play` due to the addition of the new flag below.

Adds a `--no-trunc` flag to `podman kube play` supporting YAML files with
annotations that were not truncated to the Kubernetes maximum length of
63 characters.

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2023-07-10 18:02:53 -04:00
932fae4028 Allow setting volume and network names in Quadlet
This commit extends `Volume` and `Network` unit definitions with two
additional parameters, `VolumeName` and `NetworkName`, which will,
respectively, set a user-defined name for the corresponding volume and
network. This is similar to how the `ContainerName` directive currently
works, and should allow for smoother transitions to Quadlet-managed
resources.

Closes: #19003
Signed-off-by: Alex Palaistras <alex@deuill.org>
2023-07-10 20:33:19 +01:00
eb9d44241e Merge pull request #19004 from rhatdan/secret
Add --replace flag to podman secret create
2023-07-10 14:59:29 -04:00
a69194b02f manifest inspect: support authentication
Previous tests have worked by pure chance since the client and server
ran on the same host; the server picked up the credentials created by
the client login.

Extend the gating tests and add a new integration test which is further
capable of exercising the remote code.

Note that fixing authentication support requires adding a new
`--authfile` CLi flag to `manifest inspect`.  This will at least allow
for passing an authfile to be bindings.  Username and password are not
yet supported.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-07-10 16:26:19 +02:00
597ebeb60f top: do not depend on ps(1) in container
This ended up more complicated then expected. Lets start first with the
problem to show why I am doing this:

Currently we simply execute ps(1) in the container. This has some
drawbacks. First, obviously you need to have ps(1) in the container
image. That is no always the case especially in small images. Second,
even if you do it will often be only busybox's ps which supports far
less options.

Now we also have psgo which is used by default but that only supports a
small subset of ps(1) options. Implementing all options there is way to
much work.

Docker on the other hand executes ps(1) directly on the host and tries
to filter pids with `-q` an option which is not supported by busybox's
ps and conflicts with other ps(1) arguments. That means they fall back
to full ps(1) on the host and then filter based on the pid in the
output. This is kinda ugly and fails short because users can modify the
ps output and it may not even include the pid in the output which causes
an error.

So every solution has a different drawback, but what if we can combine
them somehow?! This commit tries exactly that.

We use ps(1) from the host and execute that in the container's pid
namespace.
There are some security concerns that must be addressed:
- mount the executable paths for ps and podman itself readonly to
  prevent the container from overwriting it via /proc/self/exe.
- set NO_NEW_PRIVS, SET_DUMPABLE and PDEATHSIG
- close all non std fds to prevent leaking files in that the caller had
  open
- unset all environment variables to not leak any into the contianer

Technically this could be a breaking change if somebody does not
have ps on the host and only in the container but I find that very
unlikely, we still have the exec in container fallback.

Because this can be insecure when the contianer has CAP_SYS_PTRACE we
still only use the podman exec version in that case.

This updates the docs accordingly, note that podman pod top never falls
back to executing ps in the container as this makes no sense with
multiple containers so I fixed the docs there as well.

Fixes #19001
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2215572

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-07-10 13:32:55 +02:00
7cd1fb77f9 Merge pull request #19172 from eriksjolund/fix_underscore_in_man_page
[CI:DOCS] uidmap man pages: fix corrupt italics
2023-07-10 05:30:58 -04:00
1b7eb44d3b Fixes typo in the path where quadlet looks for files
This change matches the list above in the same document, in the section
`Podman user unit search path`. I also confirmed that this matches [the
code](https://github.com/containers/podman/blob/60a5a59/cmd/quadlet/main.go#L119).

Signed-off-by: Michael Hrivnak <mhrivnak@hrivnak.org>
2023-07-09 15:53:56 -04:00
efefd8cf5b Add --replace flag to podman secret create
Users may want to replace the secret used within containers, without
destroying the secret and recreating it.

Partial fix for https://github.com/containers/podman/issues/18667

Make sure podman --remote secret inspect and podman secret inspect
return the same error message.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-07-09 07:26:09 -04:00
5d706eb027 Merge pull request #19084 from eriksjolund/add_docs_to_system_service
[CI:DOCS] podman-system-service.1.md: document systemd usage
2023-07-09 07:22:17 -04:00
eec438222a [CI:DOCS] uidmap man pages: fix corrupt italics
The markdown-to-manpage sequence interprets
_from_uid_ and *from_uid* differently.
Use the latter syntax to get the expected result.

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

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2023-07-09 10:50:48 +02:00
f9077689ea [CI:DOCS] podman-system-service.1.md: document systemd usage
Regarding "The command does not support more than one listening socket for the API service."
See this Podman source code: (a permalink into the main branch as of 2 July 2023)
539be58163/cmd/podman/system/service_abi.go (L48-L50)

Move up the paragraph "The REST API provided ...".

Move up the sentence "Note: The default systemd ...".

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2023-07-08 18:17:02 +02:00
fa654e9857 Use bytes size consistently instead of human size
Previously podman was using "MB" and "GB" (binary) for input but
"MB" and "GB" (decimal) for output, which was causing confusion.

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2023-07-06 14:51:06 +02:00
d874790bc6 auto update: fix usage of --authfile
The --authfile flag has been ignored.  Fix that and add a test to make
sure we won't regress another time.  Requires a new --tls-verify flag
to actually test the code.

Also bump c/common since common/pull/1538 is required to correctly check
for updates.  Note that I had to use the go-mod-edit-replace trick on
c/common as c/buildah would otherwise be moved back to 1.30.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2218315
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-07-05 08:30:39 +02:00
5aabc5088a [CI:DOCS] Better document the default value of --userns
Better document which value `podman run --userns` has if no default
value is specified. Also improve documentation of "host" being an alias
for "".

Fixes #15764

Signed-off-by: Philipp Wagner <phw@ibm.com>
2023-07-03 17:31:39 +02:00
4a5396b467 [CI:DOCS] uidmap man pages: fix corrupt tables
The markdown-to-manpage sequence needs a long row of dashes,
not a single dash. A single dash, as used in this one option,
generates unreadable *roff.

Also, some tool somewhere doesn't like too-long columns. Shrtn thm.

Also, verify that there are no more three-or-fewer-dash columns:

    $ ack '\|\s+-{1,3}\s' docs/source/markdown

Fixes: #19086

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-07-02 17:38:42 -06:00
bf60bb0731 Display secret to user in inpspect
It is pretty complicated to display the secret on the host, but is
not really secured. This patch makes it easier to examine the secret.

Partial fix for https://github.com/containers/podman/issues/18667

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-06-28 13:14:49 -04:00
c928da6d67 Merge pull request #18975 from rhatdan/man
Kube quadlets can support autoupdate as well as containers
2023-06-27 19:52:09 +02:00
cf9ebcddfd Fix up podmansh man page
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-06-27 12:05:24 -04:00
eeb7aeb496 Kube quadlets can support autoupdate as well as containers
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-06-27 11:20:14 -04:00