Commit graph

1456 commits

Author SHA1 Message Date
openshift-ci[bot] 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
Valentin Rothberg 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
Paul Holzinger 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
openshift-ci[bot] bdbc21095a
Merge pull request #10828 from cdoern/scp
Created image scp feature
2021-08-02 17:15:54 +00:00
cdoern 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
OpenShift Merge Robot 1bf7a9ed9c
Merge pull request #11066 from infiniteregrets/cp-md
[CI:DOCS] Update podman-cp manpage
2021-07-28 15:50:45 +02:00
OpenShift Merge Robot 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
Mehul Arora e3b0ba9283 [CI:DOCS] Update podman-cp manpage
Signed-off-by: Mehul Arora <aroram18@mcmaster.ca>
2021-07-28 17:05:06 +05:30
Adrian Reber 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
Mehul Arora 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
OpenShift Merge Robot 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
Jakub Guzik 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
Valentin Rothberg 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
OpenShift Merge Robot d956500743
Merge pull request #10996 from cdoern/untilLog
Implemented --until flag for Libpod's Container Logs
2021-07-24 05:56:18 -04:00
OpenShift Merge Robot 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
OpenShift Merge Robot 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
cdoern 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
Jakub Guzik 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
Hironori Shiina 12f4b14a16 Add notes to flags not supported on cgroups V2
Clarify what flags are not supported on cgroups V2 in documentation.

Signed-off-by: Hironori Shiina <shiina.hironori@jp.fujitsu.com>
2021-07-21 17:50:37 -04:00
OpenShift Merge Robot c0cb664581
Merge pull request #11008 from dpward/main
[CI:DOCS] Fix GitHub URL to Podman logo
2021-07-21 14:37:31 -04:00
David Ward ac588c751b [CI:DOCS] Fix GitHub URL to Podman logo
The Podman logo is not rendered on docs.podman.io with the current URL.

Signed-off-by: David Ward <david.ward@ll.mit.edu>
2021-07-21 11:22:01 -04:00
Valentin Rothberg 6430c13160 [CI:DOCS] refine the runlabel man page
* Write a description to outline the scope and mechanism of runlabel.
* Describe the variables/attributes that we want to be used.
* Do not describe the --optN or OPTN flags/variables since they are
  already hidden flags and date back to the Atomic days.
* Update references to other man pages.
* Remove unsupported variables (e.g., SUDO_*) which caused confusion.

Fixes: #10799
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-20 14:26:11 +02:00
Valentin Rothberg 6f1c7a0b6b systemd: require network*-online*.target
Require the network to be online in all (generated) systemd units to
make sure that containers and Podman run only after the network has been
fully configured.

Fixes: #10655
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-16 14:58:08 +02:00
José Guilherme Vanz af40dfc2bf
--infra-name command line argument
Adds the new --infra-name command line argument allowing users to define
the name of the infra container

Issue #10794

Signed-off-by: José Guilherme Vanz <jvanz@jvanz.com>
2021-07-15 21:27:51 -03:00
OpenShift Merge Robot 12b67aaf62
Merge pull request #10894 from cdoern/pidPod
podman pod create --pid flag
2021-07-15 17:30:16 -04:00
OpenShift Merge Robot 9d87dc7408
Merge pull request #10940 from tartina/doctypo
[CI:DOCS] Correct a typo in documentation
2021-07-15 14:57:09 -04:00
Guido Aulisi ec61507514 Correct a typo in documentation
Signed-off-by: Guido Aulisi <guido.aulisi@gmail.com>
2021-07-15 17:01:16 +02:00
cdoern f7321681d0 podman pod create --pid flag
added support for --pid flag. User can specify ns:file, pod, private, or host.
container returns an error since you cannot point the ns of the pods infra container
to a container outside of the pod.

Signed-off-by: cdoern <cdoern@redhat.com>
2021-07-15 10:34:09 -04:00
Valentin Rothberg 59f31d86ac auto-update: add --dry-run
Add a --dry-run flag to `podman auto-update` which will look for new
images but won't perform any pull or restart any service or container.

The "UPDATED" column will now indicate the availability of a newer image
via "pending".

```
$ podman auto-update --dry-run
UNIT                    CONTAINER            IMAGE                   POLICY      UPDATED
container-test.service  08fd34e533fd (test)  localhost:5000/busybox  registry    false
```

Fixes: #9949
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-15 11:39:50 +02:00
OpenShift Merge Robot 1e236845e6
Merge pull request #10909 from rhatdan/docs
[CI:DOCS] Fix up documentation of the userns audit flag
2021-07-14 17:20:01 -04:00
Daniel J Walsh 100c23dc5b
Fix up documentation of the userns audit flag
Add reference to the `containers` user in the /etc/subuid and
/etc/subgid files.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-07-14 15:28:35 -04:00
Valentin Rothberg 01cfb51fe9 auto-update: make output more user friendly
The rather raw and scarce output of `podman auto-update` has been a
thorn in my eyes for a longer while.  So far, Podman would only print
updated systemd units, one per line, without further formatting.

Motivated by issue #9949 which is asking for some more useful
information in combination with a dry-run feature, I sat down and
reflected which information may come in handy.

Running `podman auto-update` will now look as follows:

```
$ podman auto-update
Trying to pull [...]

UNIT                    CONTAINER            IMAGE                   POLICY      UPDATED
container-test.service  08fd34e533fd (test)  localhost:5000/busybox  registry    false
```

Also refactor the spaghetti code in the backend a bit to make it easier
to digest and maintain.

For easier testing and for the sake of consistency with other commands
listing output, add a `--format` flag.

The man page will get an overhaul in a follow up commit.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-14 16:23:51 +02:00
Hironori Shiina 6bdb990c9e Restore headers of optional information in 'podman pod ps'
When optional information such as container IDs and names in pods, the
headers are not displayed. This fix restored the headers.

Documentation of this subcommand is also updated.

Signed-off-by: Hironori Shiina <shiina.hironori@jp.fujitsu.com>
2021-07-09 18:08:23 -04:00
OpenShift Merge Robot 78d7ae4e5d
Merge pull request #10892 from rugk/patch-2
[CI:DOCS] Mention new hostname for loopback IP
2021-07-09 14:19:11 -04:00
rugk a2d15d9816
Mention new hostname for loopback IP
The hostname `host.containers.internal` is way easier to remember and should IMHO be preferred to be used, as it is:
a) easier to remember than some random IP
b) if the IP changes some time in the future the container will continue to work

And explain hostname adding in more detail
As per @mheon's suggestion.

And explain hostname adding *reason*
Also implies an suggestion for using the hostname instead.

And port change from podman-create man page to podman-run, too

Signed-off-by: rugk <rugk+git@posteo.de>
2021-07-09 17:47:11 +02:00
OpenShift Merge Robot 43abe006a3
Merge pull request #10872 from ebb-earl-co/rootless_tutorial_revision
[CI:DOCS] Update docs/tutorials/rootless_tutorial.md:
2021-07-09 10:36:08 -04:00
rugk 00ed696ed9
fix: logo not loading after barnch renaming
You've renamed your branch from master to main and thus this URL here did not work anymore and caused a glitch in displaying the image in the docs.

Signed-off-by: rugk <rugk+git@posteo.de>
2021-07-09 14:22:01 +02:00
Colin Eberl Coe 95c4637851
Update docs/tutorials/rootless_tutorial.md:
* Change references of 'master' to 'main' in URLs e.g. https://github.com/containers/podman/blob/main/install.md
* Wrap names of files or programs by '`' e.g. `dnf`, `containers.conf`, `/etc/subuid`, etc.
* Change sentence with ambiguous subject to 'Root privileges are required to add or update entries within these files'
* Link to kernel.org documentation for the `getpwent` command
* Change sentence: 'Note that the values for each user must be unique ~and without any overlap~'
* Make references to the Podman project upper-case instead of lower-case
* Reorder sentence 'Update the `/etc/subuid` and `/etc/subgid` with fields for each user' to emphasize 'For each user'
* Remove reference to asciiart demos and update README.md link

Signed-off-by: Colin Eberl Coe <ebb-earl-co@pm.me>
2021-07-08 13:38:05 -05:00
Brent Baude 38863e7642 Replace old RESTful tutorial with updated README
Remove outdated information on go bindings.  Moved the tips for
debugging into the REAME and tidied up relevant links.

Fixes: #9334
[CI_DOCS]
[NO TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-07-07 10:03:01 -05:00
OpenShift Merge Robot ba29b30d74
Merge pull request #10788 from infiniteregrets/multi-pull
support pulling multiple images sequentially in a single podman pull
2021-07-06 04:30:54 -04:00
Mehul Arora 59abb77fc2 multiple image pull support
Signed-off-by: Mehul Arora <aroram18@mcmaster.ca>
2021-07-05 16:07:49 +05:30
OpenShift Merge Robot 895b815188
Merge pull request #10836 from Luap99/diff
podman diff accept two images or containers
2021-07-03 06:17:03 -04:00
Paul Holzinger 8f6a0243f4
podman diff accept two images or containers
First, make podman diff accept optionally a second argument. This allows
the user to specify a second image/container to compare the first with.
If it is not set the parent layer will be used as before.

Second, podman container diff should only use containers and podman
image diff should only use images. Previously, podman container diff
would use the image when both an image and container with this name
exists.

To make this work two new parameters have been added to the api. If they
are not used the previous behaviour is used. The same applies to the
bindings.

Fixes #10649

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-07-02 17:11:56 +02:00
Valentin Rothberg 8606ead912 [CI:DOCS] podman search: clarify that results depend on implementation
Clarify in the man page that podman-search is not generally realiable
way of determining the presence/existence of an image.  The results of
the v1 and the v2 endpoints depend on the implementation of each
registry; the semantics are not really specified.  Some registries may
not support search at all as it's not part of the OCI dist spec.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1978556
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-02 11:14:01 +02:00
Matej Vasek 86c6014145 Implement --archive flag for podman cp
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-07-01 12:01:46 +02:00
Jhon Honce 2ce78aace6 Enhance system connection add URL input
* Add support for the tcp and unix schemes in connection URLs.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-06-29 16:24:03 -07:00
OpenShift Merge Robot 0a0ade3cc0
Merge pull request #10736 from trusch/feature-use-secret-config
read secret config from config file if no user data.
2021-06-25 12:45:53 -04:00
OpenShift Merge Robot 21d80faa0b
Merge pull request #10760 from vrothberg/save-docs
[CI:DOCS] podman save: clarify formats and transports
2021-06-24 09:54:14 -04:00
Tino Rusch b56b4b5374
read secret config from config file if no user data.
feat: read secret config from config file if the user hasn't entered
explicit config values

feat: allow to specify `--driver-opts opt1=val1,opt2=val2` in the secret
create command to allow overriding the default values

fix: show driver options in `podman secret inspect`

Signed-off-by: Tino Rusch <tino.rusch@gmail.com>
2021-06-24 12:31:14 +02:00
OpenShift Merge Robot 63626e9b58
Merge pull request #10766 from Procyhon/13062021_manpage
[CI:DOCS] Follow-up to PR 10676
2021-06-24 05:39:06 -04:00