811 Commits

Author SHA1 Message Date
9a10e2124b systemd: replace multi-user with default.target
Replace `multi-user.target` with `default.target` across the code base.
It seems like the multi-user one is not available for (rootless) users
on F35 anymore is causing issues in all kinds of ways, for instance,
enabling the podman.service or generated systemd units.

Fixes: #12438
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-11-30 14:37:25 +01:00
f330c197bd List /etc/containers/certs.d as default for --cert-path
Helps Document https://github.com/containers/podman/issues/10116

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-11-29 10:42:27 -05:00
dd80635df0 Support env variables based on ConfigMaps sent in payload
Fixes #12363

Signed-off-by: Jakub Dzon <jdzon@redhat.com>
2021-11-23 11:40:28 +01:00
566b78dd02 generate systemd: add --start-timeout flag
Add a new flag to set the start timeout for a generated systemd unit.
To make naming consistent, add a new --stop-timeout flag as well and let
the previous --time map to it.

Fixes: #11618
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-11-23 09:38:51 +01:00
0b7c132d9f Merge pull request #12301 from umohnani8/table
Add note about volume with unprivileged container
2021-11-22 21:52:31 +01:00
2ab28140d6 [CI:DOCS] Update notes on java TZ in man page
Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2021-11-22 12:28:35 -05:00
55dbc4e198 Merge pull request #12373 from TomSweeneyRedHat/dev/tsweeney/jdoc
[CI:DOCS] Add java TZ note to run manpage
2021-11-22 17:54:13 +01:00
a8b3c67b97 Add note about volume with unprivileged container
Add a note to the generated kube yaml if we detect a
volume is being mounted. The note lets the user know
what needs to be done to avoid permission denied error
when trying to access the volume for an unprivileged
container.
Add the same note to the man pages.

NO NEW TESTS NEEDED

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2021-11-21 19:44:26 -05:00
d068997694 [CI:DOCS] Add java TZ note to run manpage
Add a note to show how to workaround the `--tz` option
being ignored in the run command.

Related to: https://bugzilla.redhat.com/show_bug.cgi?id=1984251

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2021-11-19 20:38:55 -05:00
c76caba367 Use same runtime to restore a container as during checkpointing
There are at least two runtimes that support checkpoint and restore:
runc and crun. Although the checkpoints created by these are almost
compatible, it is not (yet) possible to restore a checkpoint created
with one runtime with the other runtime. To make checkpoint/restore
usage more comfortable this adds code to look into the checkpoint
archive during restore and to set the runtime to the one used during
checkpointing.

This also adds a check, if the user explicitly sets a runtime during
restore, that the runtime is also the same as used during checkpointing.

If a different runtime is selected than the one used during
checkpointing the restore will fail early.

If runc and crun will create compatible checkpoints in the future the
check can be changed to treat crun and runc as compatible
checkpoint/restore runtimes.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-11-19 17:46:06 +00:00
319d3fba6d Merge pull request #12354 from Luap99/exit-command
Do not store the exit command in container config
2021-11-18 23:51:12 +01:00
82a050a58f Merge pull request #12298 from giuseppe/idmapped-bind-mounts
volumes: add new option idmap
2021-11-18 22:01:15 +01:00
0dae50f1d3 Do not store the exit command in container config
There is a problem with creating and storing the exit command when the
container was created. It only contains the options the container was
created with but NOT the options the container is started with. One
example would be a CNI network config. If I start a container once, then
change the cni config dir with `--cni-config-dir` ans start it a second
time it will start successfully. However the exit command still contains
the wrong `--cni-config-dir` because it was not updated.

To fix this we do not want to store the exit command at all. Instead we
create it every time the conmon process for the container is startet.
This guarantees us that the container cleanup process is startet with
the correct settings.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-11-18 20:28:03 +01:00
6d23ea60d2 Add --file-locks checkpoint/restore option
CRIU supports checkpoint/restore of file locks. This feature is
required to checkpoint/restore containers running applications
such as MySQL.

Signed-off-by: Radostin Stoyanov <radostin@redhat.com>
2021-11-18 19:23:25 +00:00
e83d366651 volumes: add new option idmap
pass down the "idmap" mount option to the OCI runtime.

Needs: https://github.com/containers/crun/pull/780

Closes: https://github.com/containers/podman/issues/12154

[NO NEW TESTS NEEDED] there is no crun version yet that support the
new feature.

Test case (must run as root):

podman run --rm -v foo:/foo alpine touch /foo/bar

podman run --uidmap 0:1:1000 --rm -v foo:/foo:idmap alpine ls -l /foo
total 0
-rw-r--r--    1 root     root             0 Nov 15 14:01 bar

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-11-18 17:01:06 +01:00
fceecc3a5b remote checkpoint/restore: more fixes
* Support `checkpoint --pre-checkpoint`

* Support `checkpoint --with-previous`

* Disable `restore --import-previous` for the remote client since we had
  to send two files which in turn would require to tar them up and hence
  be a breaking change.  Podman 4.0 would be the chance and I hope we'll
  find time before that to remote-restore prettier.

Note that I did not run over swagger yet to check whether all parameters
are actually documented due to time constraints.

Fixes: #12334
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-11-18 16:52:15 +01:00
44d1618dd7 Add --unsetenv & --unsetenv-all to remove def environment variables
Podman adds a few environment variables by default, and
currently there is no way to get rid of them from your container.
This option will allow  you to specify which defaults you don't
want.

--unsetenv-all will remove all default environment variables.

Default environment variables can come from podman builtin,
containers.conf or from the container image.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-11-15 15:10:12 -05:00
e9d8ca22b8 Merge pull request #11076 from boaz0/closes_10275
Support template unit files in podman generate systemd
2021-11-15 16:30:38 +01:00
914f4c8905 Update man pages for checkpoint/restore --print-stats
This commit updates the man pages for checkpoint and restore to describe
the '--print-stats' parameter.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-11-15 11:50:25 +00:00
8f3fb743ee Merge pull request #12270 from rhatdan/auth
--authfile command line argument for image sign command.
2021-11-13 13:10:48 +01:00
0aecacb865 Merge pull request #12224 from cdoern/scp
Podman Image SCP transfer patch
2021-11-12 18:44:44 +01:00
ac38eca3fd Podman Image SCP transfer patch
Fixed syntax so that podman image scp transfer works with no user specified.
This command can only be executed as root so to obtain the default user, I searched for
the SUDO_USER environmental variable. If that is not found, we error out and inform the user
to set this variable and make sure they are running as root

Signed-off-by: cdoern <cdoern@redhat.com>
Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
2021-11-11 20:14:38 -05:00
6762d5e238 --authfile command line argument for image sign command.
Adds the --authfile command line argument to allow users to use
alternative authfile paths when signing images.

Replaces: https://github.com/containers/podman/pull/10975
Fixes: https://github.com/containers/podman/issues/10866

Signed-off-by: José Guilherme Vanz <jvanz@jvanz.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-11-11 15:11:19 -05:00
d5b411c484 Merge pull request #12193 from yahavi/patch-1
[CI:DOCS] Fix Zsh completion command documentation
2021-11-11 16:17:41 +01:00
9dddc47d28 Merge pull request #12258 from edsantiago/xref_manpages_see_also
[CI:DOCS] Add CI check for SEE ALSO in man pages
2021-11-10 22:53:36 +01:00
4bf0146c29 Merge pull request #12255 from vrothberg/fix-11970
podman load: support downloading files
2021-11-10 18:27:39 +01:00
6236be4ff9 [CI:DOCS] Add CI check for SEE ALSO in man pages
Add new CI check to confirm that links and references
in SEE ALSO sections are properly formatted and that
links are valid (at least in theory: we do no actual
URL fetching to test for 404).

The check is piggybacked into existing xref-helpmsgs-manpages
script. It could conceivably be more elegant to write a
separate tool for this purpose, but I don't wish to duplicate
the logic for finding and reading markdown files.

Script identified various problems, which I fix in this PR:

  . missing '**' (asterisks) around some references, or '**'
    in the wrong place.

  . links pointing to github.com/.../tree/ instead of /blob/
    (github redirects those automatically, but I like
    consistency)

  . a few copy-paste errors, e.g. subgid linking to subuid.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-11-10 09:03:40 -07:00
1ef66d6d7f podman load: support downloading files
Support downloading files, for instance via
`podman load -i server.com/image.tar`.  The specified URL is downloaded
in the frontend and stored as a temp file that gets passed down to the
backend.

Also vendor in c/common@main to use the new `pkg/download`.

Fixes: #11970
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-11-10 15:43:16 +01:00
2720156fa5 Add links to all SEE ALSO sections
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-11-10 09:29:21 -05:00
8a9da76989 Fix Zsh completion command documentation
Signed-off-by: yahavi <yahavi@jfrog.com>
2021-11-09 09:08:30 +02:00
7225ddb5b1 Add links to podman build,run, create see also
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-11-08 21:03:18 -05:00
22ef488d24 Merge pull request #12213 from flouthoc/system-connection-rm-all
system: Adds support for removing all named destination via `--all`
2021-11-08 16:50:59 +01:00
c9ba1fb7d4 Merge pull request #11958 from cdoern/scp
Podman Image SCP rootful to rootless transfer
2021-11-08 16:19:57 +01:00
338eb9d75e system: Adds support for removing all named destination via --all
Adds support of dropping all named destination from system connections via `--all`.

Closes: https://github.com/containers/podman/issues/12018

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-11-08 19:42:45 +05:30
4e8bf8be4b Add some information about disabling SELinux when using system volumes
A comment was made on internal mailing list about confusion on SELinux
labeling of volumes. This PR makes it a little more clear about when
you should or should not relabel.

We need a similar comment in podman pod create, but it does not support
--security-opt processing yet.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-11-06 05:47:52 -04:00
ffa5ed0e0e Podman Image SCP rootful to rootless transfer
Added functionality for users to transfer images from root storage to rootless storage without using sshd. This is
done through rootful podman by running `sudo podman image scp root@localhost::image user@localhost:: the user is needed
in order to find and use their uid/gid to exec a new process.

added necessary tests, and functions for this implementation. Created new image function Transfer so that
the underlying code is majorly removed from CLI

Signed-off-by: cdoern <cdoern@redhat.com>
2021-11-05 12:04:20 -04:00
7f433df7e7 rename rootless cni ns to rootless netns
Since we want to use the rootless cni ns also for netavark we should
pick a more generic name. The name is now "rootless network namespace"
or short "rootless netns".

The rename might cause some issues after the update but when the
all containers are restarted or the host is rebooted it should work
correctly.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-11-05 15:44:37 +01:00
85bad0cc7c Merge pull request #12119 from ashley-cui/updates
[CI:DOCS] Add information on how podman machine is updated
2021-10-30 14:44:43 +00:00
9fc98f265a Fix pause usage example
The page contains a wrong 'stop' command example.

Signed-off-by: Giacomo Sanchietti <giacomo.sanchietti@nethesis.it>
2021-10-29 14:24:10 +02:00
3c79202fb9 Add information on how podman machine is updated
Update documentation on how the default podman machine distribution,
FCOS, is updated.

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-10-28 09:43:00 -04:00
4e9e6f21ff volumes: allow more options for devpts
allow to pass down more options that are supported by the kernel.

Discussion here: https://github.com/containers/toolbox/issues/568

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-10-28 15:30:06 +02:00
75f478c08b pod create: remove need for pause image
So far, the infra containers of pods required pulling down an image
rendering pods not usable in disconnected environments.  Instead, build
an image locally which uses local pause binary.

Fixes: #10354
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-10-26 13:51:45 +02:00
acd8b49000 Add support to play kube for --log-opt
Fixes: https://github.com/containers/podman/issues/11727

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-10-25 11:40:42 -04:00
22270fb845 Replace 'an user' => 'a user'
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-24 22:27:39 +02:00
54c630aa0a Merge pull request #12061 from dancerj/typo
[CI:DOCS] fuse-overlay probably means fuse-overlayfs.
2021-10-22 14:28:45 +00:00
833d92d709 Merge pull request #12021 from rhatdan/kube
Generate Kube should not print default structs
2021-10-22 14:12:44 +00:00
ce4ed7d133 fuse-overlay probably means fuse-overlayfs.
fuse-overlayfs is usually the package name.

Signed-off-by: Junichi Uekawa <dancer@debian.org>
2021-10-22 13:41:58 +09:00
ece0c7e5d3 Support template unit files in podman generate systemd
Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
2021-10-22 04:19:18 +03:00
8e3760c29f Remove --kernel-memory options
Kernel memory option has been depracated in runtime-spec,  It is
believed that it will not work properly on certain kernels.  runc
ignores it.

This PR removes documentation of the flag and also prints a warning if
a user uses it.

[NO NEW TESTS NEEDED]

Helps Fix: https://github.com/containers/podman/issues/12045

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-10-21 13:29:44 -04:00
eba281c3e0 Merge pull request #11851 from cdoern/podRm
Pod Rm Infra Handling Improvements
2021-10-20 13:20:12 +00:00