1245 Commits

Author SHA1 Message Date
c38e7e5f61 build: disable --output for podman-remote clients
Disable `build --output` for remote clients and update docs.

[NO NEW TESTS NEEDED]
[NO TESTS NEEDED]

Signed-off-by: Aditya R <arajan@redhat.com>
2022-05-05 16:16:41 +05:30
ed159f864d Vendor in containers/buildah@v1.26.1
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-05-05 04:41:06 -04:00
ad93318370 Merge pull request #14066 from ashley-cui/sysres
podman system reset removed machines incorrectly
2022-05-04 13:20:09 -04:00
80744c6441 podman system reset removed machines incorrectly
podman system reset did not clean up machines fully, leaving some config
files, and breaking machines. Now it removes all machines files fully.

Signed-off-by: Ashley Cui <acui@redhat.com>
2022-05-04 10:31:42 -04:00
0bb4849377 Additional stats for podman info
In support of podman machine and its counterpart desktop, we have added
new stats to podman info.

For storage, we have added GraphRootAllocated and GraphRootUsed in
bytes.

For CPUs, we have added user, system, and idle percents based on
/proc/stat.

Fixes: #13876

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-05-03 07:11:07 -05:00
4eff0c8cf2 pod: add exit policies
Add the notion of an "exit policy" to a pod.  This policy controls the
behaviour when the last container of pod exits.  Initially, there are
two policies:

 - "continue" : the pod continues running. This is the default policy
                when creating a pod.

 - "stop" : stop the pod when the last container exits. This is the
            default behaviour for `play kube`.

In order to implement the deferred stop of a pod, add a worker queue to
the libpod runtime.  The queue will pick up work items and in this case
helps resolve dead locks that would otherwise occur if we attempted to
stop a pod during container cleanup.

Note that the default restart policy of `play kube` is "Always".  Hence,
in order to really solve #13464, the YAML files must set a custom
restart policy; the tests use "OnFailure".

Fixes: #13464
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-05-02 13:29:59 +02:00
d0b96a541d Merge pull request #14051 from giuseppe/volume-create-noquota-option
volume: add new option -o o=noquota
2022-04-28 10:23:58 -04:00
91ead15283 volume: add new option -o o=noquota
add a new option to completely disable xfs quota usage for a volume.

xfs quota set on a volume, even just for tracking disk usage, can
cause weird errors if the volume is later re-used by a container with
a different quota projid.  More specifically, link(2) and rename(2)
might fail with EXDEV if the source file has a projid that is
different from the parent directory.

To prevent such kind of issues, the volume should be created
beforehand with `podman volume create -o o=noquota $ID`

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-04-28 13:29:01 +02:00
ea1fcd7bc7 podman search: truncate by default
Truncate by default to avoid long descriptions from rendering the output
unreadable.

[NO NEW TESTS NEEDED]

Fixes: #14044
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-04-28 09:40:46 +02:00
7321f5e462 Merge pull request #14034 from rhatdan/history
Add CreatedSince & CreatedAt format fields to podman image history
2022-04-27 17:08:44 -04:00
22b421dd7e Add CreatedSince & CreatedAt format fields to podman image history
Fixes: https://github.com/containers/podman/issues/14012

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-04-27 15:15:03 -04:00
e7390f30b9 Allow changing of CPUs, Memory, and Disk Size
Allow podman machine set to change CPUs, Memory and Disk size of a QEMU machine after its been created.
Disk size can only be increased.

If one setting fails to be changed, the other settings will still be applied.

Signed-off-by: Ashley Cui <acui@redhat.com>
2022-04-27 13:56:14 -04:00
a775e77cba Merge pull request #13995 from ashley-cui/revrootful
Rootfull -> Rootful
2022-04-25 13:37:59 -04:00
a615cb2fe2 Docs rootfull -> rootful
Some docs say roofull. Change to rootful.

[NO NEW TESTS NEEDED]

Signed-off-by: Ashley Cui <acui@redhat.com>
2022-04-25 11:53:57 -04:00
1260bf631f Revert "Switch all rootful to rootfull"
This reverts commit cc3790f332d989440eb1720e24e3619fc97c74ee.

We can't change rootful to rootfull because `rootful` is written into the machine config. Changing this will break json unmarshalling, which will break existing machines.

[NO NEW TESTS NEEDED]

Signed-off-by: Ashley Cui <acui@redhat.com>
2022-04-25 09:14:04 -04:00
13079abe3f Add support for passing --volumepath
Fixes: https://github.com/containers/podman/issues/13860

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-04-23 08:03:36 -04:00
ad3da638ce Merge pull request #13918 from Luap99/hosts
use etchosts package from c/common
2022-04-22 08:50:32 -04:00
1bafde2d22 Merge pull request #13881 from rhatdan/userns
Add support for --userns=nomap
2022-04-22 08:40:34 -04:00
e912f1b689 Improve /etc/hosts documentation
Update the documentation for /etc/hosts options --add-host and
--no-hosts. Also make sure that all references use the same text for
consistency.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-04-22 13:06:01 +02:00
0d6af14387 Merge pull request #13964 from rhatdan/rootfull
Switch all rootful to rootfull
2022-04-22 06:56:33 -04:00
1fcefc94f9 Merge pull request #13971 from rhatdan/codespell
[CI:DOCS] Run codespell on code
2022-04-22 06:34:32 -04:00
26a51b2900 Merge pull request #13943 from cdoern/clone
podman container clone -f
2022-04-22 06:24:52 -04:00
e39f4495e7 Run codespell on code
[NO NEW TESTS NEEDED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-04-22 06:18:20 -04:00
cc3790f332 Switch all rootful to rootfull
We are inconsistent on the name, we should stick with rootfull.

[NO NEW TESTS NEEDED] Existing tests should handle this and no tests for
machines exists yet.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-04-21 17:05:16 -04:00
80c0fceb24 Add support for --userns=nomap
From a security point of view, it would be nice to be able to map a
rootless usernamespace that does not use your own UID within the
container.

This would add protection against a hostile process escapping the
container and reading content in your homedir.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-04-21 15:29:04 -04:00
5375401960 podman container clone -f
add the option -f to force remove the parent container if --destory is specified

resolves #13917

Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
2022-04-21 15:00:32 -04:00
cb09c26c65 Merge pull request #13505 from rst0git/checkpoint-image-1
Add support for checkpoint image
2022-04-21 11:58:56 -04:00
df156ab787 [CI:DOCS] podman build --pull=*missing*
Document the *missing* pull policy in `podman build`.

Fixes: #13864
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-04-21 14:37:02 +02:00
756ecd5400 Add support for checkpoint image
This is an enhancement proposal for the checkpoint / restore feature of
Podman that enables container migration across multiple systems with
standard image distribution infrastructure.

A new option `--create-image <image>` has been added to the
`podman container checkpoint` command. This option tells Podman to
create a container image.  This is a standard image with a single layer,
tar archive, that that contains all checkpoint files. This is similar to
the current approach with checkpoint `--export`/`--import`.

This image can be pushed to a container registry and pulled on a
different system.  It can also be exported locally with `podman image
save` and inspected with `podman inspect`. Inspecting the image would
display additional information about the host and the versions of
Podman, criu, crun/runc, kernel, etc.

`podman container restore` has also been extended to support image
name or ID as input.

Suggested-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Radostin Stoyanov <radostin@redhat.com>
2022-04-20 18:55:39 +01:00
80d1752791 slirp4netns: actually make ipv6 default
We already have ipv6 enabled as default via the containers.conf setting.
However the documentation did not reflect this. Also if no options were
set in contianers.conf it would have ipv6 disabled.

We can now remove the extra option from containers.conf.

Also fix another outdated option description for host.containers.internal
and add that the options can also be set in contianers.conf.

[NO NEW TESTS NEEDED]

Fixes #13914

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-04-20 13:59:01 +02:00
bc8d8737b7 Merge pull request #13921 from rhatdan/rename
Add missing events to podman-events man page
2022-04-19 19:46:18 -04:00
9d2ad5b839 Merge pull request #13890 from fulminemizzega/main
[CI:DOCS] Fix selinux docs for kubernetes yaml
2022-04-19 16:37:00 -04:00
a2077e5eae Add missing events to podman-events man page
[NO NEW TESTS NEEDED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-04-19 16:30:26 -04:00
cc4bc25bd0 Merge pull request #13898 from baude/machinelistquiet
Add --quiet to machine ls
2022-04-18 10:27:16 -04:00
8d3075e332 Merge pull request #13583 from rhatdan/ipc
Add support for ipc namespace modes "none, private, sharable"
2022-04-16 12:30:01 -04:00
99bcd65959 Add --quiet to machine ls
The podman machine ls command would benefit from a --quiet flag which
would only print the machine names without the extra information.  It
also implies --noheader as well.  This can be helpful for scripting with
the podman cli.

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

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-04-16 08:54:56 -05:00
e716790af9 Fix typo in generate kube docs for selinux labeling
Signed-off-by: Federico Rizzo <fulminemizzega@users.noreply.github.com>
2022-04-15 21:51:30 +00:00
08d08f995e Correct play kube docs for selinux labeling
Signed-off-by: Federico Rizzo <fulminemizzega@users.noreply.github.com>
2022-04-15 21:51:30 +00:00
25eeaec219 Merge pull request #13849 from baude/defaultvolumess
Mount $HOME:$HOME by default in podman machine init
2022-04-15 06:10:17 -04:00
f2ab79cc02 Merge pull request #13868 from cdoern/cloneSwap
Fix Memory Swappiness passing in Container Clone
2022-04-15 05:54:05 -04:00
6076e1a9a5 Merge pull request #13616 from giuseppe/passwd-entry
run, create: add --passwd-entry
2022-04-14 15:35:20 -04:00
900739d134 Add container.conf default volume to init
containers.conf now has a default volumes field for podman machine.
this pr inserts those values as the default volumes in init.

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

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-04-14 13:06:05 -05:00
f38b03d375 Fix Memory Swappiness passing in Container Clone
`DefineCreateFlags` was excluding clone from using the memory-swappiness flag leading the value to be zero
when our deafult is -1. Rearrange the if/else to give clone these memory related options

resolves #13856

Signed-off-by: cdoern <cdoern@redhat.com>
2022-04-14 10:40:29 -04:00
001f619eab Merge pull request #13872 from vrothberg/revert-size
Revert "images --size"
2022-04-14 07:18:52 -04:00
3f2939c2ef run, create: add --passwd-entry
It allows to customize the entry that is written to the `/etc/passwd`
file when --passwd is used.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-04-14 11:22:13 +02:00
97f93dc78e Revert "images --size"
This reverts commit e133a06d2f4a3e94bfbd60b647046f2f515c9c24.

@nalind found a proper fix in c/storage [1] to address the performance
issue.  So we really don't need the flag anymore.  Note the flag has
never made it into any release.

[1] d76b3606fc

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-04-14 10:58:36 +02:00
b962fb9f29 Merge pull request #13853 from chuanchang/fix_typo_in_podman_container_clone_docs
[CI:DOCS] fix typo in podman-container-clone.1.md
2022-04-13 12:22:52 -04:00
78b6dcd31c Merge pull request #13829 from baude/machineinspect
Introduce machine inspect
2022-04-13 11:05:22 -04:00
6c878b7a53 docs: fix typo in podman-container-clone.1.md
Signed-off-by: Alex Jia <chuanchang.jia@gmail.com>
2022-04-13 19:16:09 +08:00
8710197e85 Introduce machine inspect
Allow users to inspect their podman virtual machines. This will be
helpful for debug and development alike, because more details about the
machine can be collected.

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

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-04-12 15:51:39 -05:00