740 Commits

Author SHA1 Message Date
375c3a7b3c docs: fix indentation for userns modes
Closes: https://github.com/containers/podman/issues/11364

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-08-31 13:18:33 +02:00
d28e85741f InfraContainer Rework
InfraContainer should go through the same creation process as regular containers. This change was from the cmd level
down, involving new container CLI opts and specgen creating functions. What now happens is that both container and pod
cli options are populated in cmd and used to create a podSpecgen and a containerSpecgen. The process then goes as follows

FillOutSpecGen (infra) -> MapSpec (podOpts -> infraOpts) -> PodCreate -> MakePod -> createPodOptions -> NewPod -> CompleteSpec (infra) -> MakeContainer -> NewContainer -> newContainer -> AddInfra (to pod state)

Signed-off-by: cdoern <cdoern@redhat.com>
2021-08-26 16:05:16 -04:00
94c37d7d47 Merge pull request #11298 from baude/kubeupdown
teardown play kube
2021-08-26 13:58:44 -04:00
70caa63e7c Merge pull request #11318 from jmguzik/volume-ls-prune-docs
[CI:DOCS] Add filter params description to volume list/prune docs
2021-08-26 13:01:44 -04:00
1e6d1e5c6b Add filter params description to volume list/prune docs
Description adjusted to the standard seen in other man pages.
[CI:DOCS]

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-08-26 17:09:06 +02:00
18da5b0bf6 Merge pull request #11208 from ashley-cui/streams
[NO TESTS NEEDED] Allow setting of machine stream and image path from containers.conf
2021-08-26 10:13:08 -04:00
d5507704e9 volumes: Add volume import to allow importing contents on tar into volume
Following feature makes sure that users can load contents of external
tarball into the podman volumes.

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2021-08-26 14:14:14 +05:30
1e176923b1 teardown play kube
add the ability for play kube to tear down based on the yaml used to
play it.  it is indicated by --down in the play kube command.  volumes
are NOT deleted during the teardown.  pods and their containers are
stopped and removed.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-08-24 14:26:14 -05:00
3f22e52964 Allow setting of machine stream and image path from containers.conf
Default is "testing"

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-08-24 14:18:55 -04:00
90cf78b199 Merge pull request #11290 from flouthoc/volume-export
volumes: Add support for `volume export` which allows exporting content to  external path.
2021-08-23 14:01:20 -04:00
6a3741598c Merge pull request #11205 from Shivkumar13/shivkumar-tls-fix
Support for --tls-verify flag in podman-run & podman-create
2021-08-23 13:44:19 -04:00
edddfe8c4f volumes: Add support for exporting volumes to external tar
Adds support for transferring data between systems and backing up systems.
Use cases: recover from disasters or move data between machines.

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2021-08-23 20:42:41 +05:30
319c85e89e Support for --tls-verify flag in podman run & podman create
Signed-off-by: Shivkumar13 <sople@redhat.com>
2021-08-21 00:54:13 +05:30
cd40c875ac Add ability to build images in play kube
When playing a kube YAML file, it can be desirable to be able to build
an image on the fly.  This is good for development of an image and YAML
files and somewhat mocks what compose does.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-08-18 09:55:24 -05:00
bef26f2582 rename oneshot initcontainers to once
after the init containers pr merged, it was suggested to use `once`
instead of `oneshot` containers as it is more aligned with other
terminiology used similarily.

[NO TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-08-12 12:57:15 -05:00
404488a087 Run codespell to fix spelling
[NO TESTS NEEDED] Just fixing spelling.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-08-11 16:41:45 -04:00
1968fdc874 Merge pull request #11173 from jmguzik/pod-ps-until-filter
Add until filter to podman pod ps
2021-08-11 08:38:20 +00:00
ed30ae4a8a Add until filter to podman pod ps
This commit adds additional until filter to podman pod ps (ls/list).
Additionally, it also adds descriptions for podman pod ps filters available
via http api.

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-08-10 22:10:40 +02:00
904e0f20e1 Merge pull request #11177 from Luap99/source-ip
[CI:DOCS] Document source ip for the rootlesskit port handler
2021-08-10 14:34:30 +00:00
af46a64a8a Document source ip for the rootlesskit port handler
Also add some missing options to podman pod create.

Fixes #10884

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-08-10 15:38:37 +02:00
e136ad485c Merge pull request #10589 from umohnani8/pod-userns
Add support for pod inside of user namespace.
2021-08-10 12:55:52 +00:00
221b1add74 Add support for pod inside of user namespace.
Add the --userns flag to podman pod create and keep
track of the userns setting that pod was created with
so that all containers created within the pod will inherit
that userns setting.

Specifically we need to be able to launch a pod with
--userns=keep-id

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2021-08-09 15:17:22 -04:00
170fb25729 Alias build to buildx, so it won't fail
Add hidden --load and --progress flag as well.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-08-09 13:05:49 -04:00
8409817733 Merge pull request #11074 from vrothberg/auto-update-rollback
auto-update: simple rollback
2021-08-06 12:26:31 +00:00
541e83ffe2 personality: Add support for setting execution domain.
Execution domains tell Linux how to map signal numbers into signal actions.
The execution domain system allows Linux to provide limited support for binaries
compiled under other UNIX-like operating systems.

Reference: https://man7.org/linux/man-pages/man2/personality.2.html

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2021-08-06 15:04:47 +05:30
1f0a24437d Merge pull request #11011 from baude/initcontainers
implement init containers in podman
2021-08-05 13:52:15 +00:00
30df551bde auto-update: simple rollback
Add support for simple rollbacks during `podman auto-update`.  Rollbacks
are enabled by default.  If a systemd unit cannot be restarted after an
update, the previous image will be retagged and the unit will be
restarted a second time.

Add system tests for rollbacks.  Also fix a bug in the restart sequence;
we have to use the channel to actually know whether the restart was
successful or not.

NOTE: To make rollbacks really useful, users must run their containers
with `--sdnotify=container` such that the containers send the ready
message over the (mounted) socket.  This way, restarting the systemd
units during auto update will block until the message has been received
(or a timeout kicked in).

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-08-05 15:20:38 +02:00
3c3fa6fac4 implement init containers in podman
this is the first pass at implementing init containers for podman pods.
init containersare made popular by k8s as a way to run setup for pods
before the pods standard containers run.

unlike k8s, we support two styles of init containers: always and
oneshot.  always means the container stays in the pod and starts
whenever a pod is started.  this does not apply to pods restarting.
oneshot means the container runs onetime when the pod starts and then is
removed.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-08-04 14:14:36 -05:00
8aa869e628 Merge pull request #10973 from rhatdan/quota
Support size options on builtin volumes
2021-08-04 11:59:58 +00:00
3a922cbc99 Merge pull request #11003 from pascomnet/f_stats
stats: add a interval parameter to cli and api stats streaming
2021-08-04 09:56:57 +00:00
cbad561696 Merge pull request #11091 from Luap99/connect-disconnect
fix rootless port forwarding with network dis-/connect
2021-08-03 18:59:01 +00:00
cc43b51334 image scp: fix typo in output
s/Loaded images(s)/Loaded image(s)/

[NO TESTS NEEDED] (I think we should test the output at some point)

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-08-03 17:17:51 +02:00
e88d8dbeae fix rootless port forwarding with network dis-/connect
The rootlessport forwarder requires a child IP to be set. This must be a
valid ip in the container network namespace. The problem is that after a
network disconnect and connect the eth0 ip changed. Therefore the
packages are dropped since the source ip does no longer exists in the
netns.
One solution is to set the child IP to 127.0.0.1, however this is a
security problem. [1]

To fix this we have to recreate the ports after network connect and
disconnect. To make this work the rootlessport process exposes a socket
where podman network connect/disconnect connect to and send to new child
IP to rootlessport. The rootlessport process will remove all ports and
recreate them with the new correct child IP.

Also bump rootlesskit to v0.14.3 to fix a race with RemovePort().

Fixes #10052

[1] https://nvd.nist.gov/vuln/detail/CVE-2021-20199

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-08-03 16:29:09 +02:00
bdbc21095a Merge pull request #10828 from cdoern/scp
Created image scp feature
2021-08-02 17:15:54 +00:00
c0952c7334 Support size and inode options on builtin volumes
[NO TESTS NEEDED] Since it is difficult to setup xfs quota

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1982164

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-08-02 10:32:45 -04:00
1d10ca739f Created scp.go image_scp_test.go and podman-image-scp.1.md
added functionality for image secure copying from local to remote.
Also moved system connection add code around a bit so functions within that file
can be used by scp.

Signed-off-by: cdoern <cdoern@redhat.com>
2021-07-30 17:19:24 -04:00
1bf7a9ed9c Merge pull request #11066 from infiniteregrets/cp-md
[CI:DOCS] Update podman-cp manpage
2021-07-28 15:50:45 +02:00
6c5966cf3c Merge pull request #10910 from adrianreber/2021-07-12-checkpoint-restore-into-pod
Add support for checkpoint/restore into and out of pods
2021-07-28 14:48:28 +02:00
e3b0ba9283 [CI:DOCS] Update podman-cp manpage
Signed-off-by: Mehul Arora <aroram18@mcmaster.ca>
2021-07-28 17:05:06 +05:30
eb94467780 Support checkpoint/restore with pods
This adds support to checkpoint containers out of pods and restore
container into pods.

It is only possible to restore a container into a pod if it has been
checkpointed out of pod. It is also not possible to restore a non pod
container into a pod.

The main reason this does not work is the PID namespace. If a non pod
container is being restored in a pod with a shared PID namespace, at
least one process in the restored container uses PID 1 which is already
in use by the infrastructure container. If someone tries to restore
container from a pod with a shared PID namespace without a shared PID
namespace it will also fail because the resulting PID namespace will not
have a PID 1.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-07-27 16:10:44 +02:00
6fe03b25ab support container to container copy
Implement container to container copy.  Previously data could only be
copied from/to the host.

Fixes: #7370
Co-authored-by: Mehul Arora <aroram18@mcmaster.ca>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-27 15:32:23 +02:00
508dc031c6 Merge pull request #10861 from jmguzik/until-prune-volume-cmd
Add prune until filter test for podman volume cli
2021-07-27 14:50:24 +02:00
cdbbd79155 stats: add a interval parameter to cli and api stream mode
podman stats polled by default in a 1 sec period.
This can put quite some load on a machine if you run many containers.

The default value is now 5 seconds.
You can change this interval with a new, optional, --interval, -i cli flag.
The api request got also a interval query parameter for the same purpose.

Additionally a unused const was removed.
Api and cli will fail the request if a 0 or negative value is passed in.

Signed-off-by: Thomas Weber <towe75@googlemail.com>
2021-07-27 07:20:47 +02:00
7fa4d2cb18 Add prune until filter test for podman volume cli
This commit follows work started in #10756. Changes made in #11015
enabled cli support for volume prune --filter until. Adding e2e test
closes #10579.

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-07-26 22:37:45 +02:00
1b6423e9f1 refine dangling checks
By proxy by vendoring containers/common. Previously, a "dangling" image
was an untagged image; just a described in the Docker docs. The
definition of dangling has now been refined to an untagged image without
children to be compatible with Docker.

Further update a redundant image-prune test.

Fixes: #10998
Fixes: #10832
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-26 09:28:17 +02:00
d956500743 Merge pull request #10996 from cdoern/untilLog
Implemented --until flag for Libpod's Container Logs
2021-07-24 05:56:18 -04:00
e6fb92f478 Merge pull request #11013 from hshiina/cgroupsv2
[CI:DOCS] Add notes to flags not supported on cgroups V2
2021-07-22 14:36:26 -04:00
365775489f Merge pull request #11015 from jmguzik/until-list-volume
Add until filter to volume ls filters list
2021-07-22 14:11:24 -04:00
0f708efd8b Implemented --until flag for libpod's container logs
compat containers/logs was missing actual usage of until query param.
This led me to implement the until param for libpod's container logs as well. Added e2e tests.

Signed-off-by: cdoern <cdoern@redhat.com>
2021-07-22 10:56:56 -04:00
2d8e837a9b Add until filter to volume ls filters list
As a conclusion of a discussion in #10861, until filter is added
by this commit to volume ls filters.

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-07-22 00:01:07 +02:00