11045 Commits

Author SHA1 Message Date
a090301bbb podman cp: support copying on tmpfs mounts
Traditionally, the path resolution for containers has been resolved on
the *host*; relative to the container's mount point or relative to
specified bind mounts or volumes.

While this works nicely for non-running containers, it poses a problem
for running ones.  In that case, certain kinds of mounts (e.g., tmpfs)
will not resolve correctly.  A tmpfs is held in memory and hence cannot
be resolved relatively to the container's mount point.  A copy operation
will succeed but the data will not show up inside the container.

To support these kinds of mounts, we need to join the *running*
container's mount namespace (and PID namespace) when copying.

Note that this change implies moving the copy and stat logic into
`libpod` since we need to keep the container locked to avoid race
conditions.  The immediate benefit is that all logic is now inside
`libpod`; the code isn't scattered anymore.

Further note that Docker does not support copying to tmpfs mounts.

Tests have been extended to cover *both* path resolutions for running
and created containers.  New tests have been added to exercise the
tmpfs-mount case.

For the record: Some tests could be improved by using `start -a` instead
of a start-exec sequence.  Unfortunately, `start -a` is flaky in the CI
which forced me to use the more expensive start-exec option.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-03-04 15:43:12 +01:00
833670079c Merge pull request #9605 from lsm5/Makefile-install-docker-docs-nobuild
Makefile: add install.docker-docs-nobuild for packaging use
2021-03-04 05:37:23 -05:00
61e626c859 Makefile: add install.docker-docs-nobuild for packaging use
This will allow installation of the manpages without the need to rebuild
them in the installation stage of distro packaging.

[NO TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2021-03-03 16:21:27 -05:00
87e20560ac Merge pull request #9536 from jmguzik/enable-cgroupsv2-sec-opts
Enable cgroupsv2 rw mount via security-opt unmask
2021-03-03 12:28:54 -05:00
32b2e367b8 Merge pull request #9595 from Luap99/fix-9594
Fix possible panic with podman build --iidfile
2021-03-03 12:05:55 -05:00
8a1955f419 Merge pull request #9581 from baude/issue9529
Add network summary to compat ps
2021-03-03 11:13:22 -05:00
81a3f8a432 Add /sys/fs/cgroup as readonly path in docs
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-03 15:27:45 +01:00
259bb5f723 Merge pull request #9583 from ashley-cui/sec
Add version field to secret compat list/inspect api
2021-03-03 09:17:21 -05:00
8f2192922d Add network summary to compat ps
The compatibility endpoint for listing containers should have the
summarized network configuration with it.

Fixes: #9529

Signed-off-by: baude <bbaude@redhat.com>
2021-03-03 08:16:58 -06:00
5fd8a84949 Merge pull request #9575 from mheon/rewrite_rename
Rewrite Rename backend in a more atomic fashion
2021-03-03 09:16:19 -05:00
4eed89acaa Fix possible panic with podman build --iidfile
Make sure we check for errors before trying to write the iidfile.

[NO TESTS NEEDED]

Ref #9594

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-03-03 14:46:53 +01:00
aed632cb8c Merge pull request #9580 from rhatdan/timestamp
Fix support for podman build --timestamp
2021-03-03 05:08:13 -05:00
2a3460b26d Merge pull request #9521 from adrianreber/2021-02-25-checkpointctl
Reorder checkpoint/restore code for CRI-O
2021-03-03 02:06:19 -08:00
9391bfc520 Add version field to secret compat list/inspect api
Docker api expects secrets endpoint to have a version field. So, the
version field is added into the compat endpoint only. The version field
is always 1, since Docker uses the version to keep track of updates to
the secret, and currently we cannot update a secret.

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-03-02 16:55:21 -05:00
0a40c5a059 Merge pull request #9477 from ashley-cui/journald
Tidy duplicate log tests
2021-03-02 13:39:59 -08:00
b9181cf1ef Merge pull request #9512 from mheon/fix_9511
Fix parsing of Tmpfs field in compat create
2021-03-02 12:58:59 -08:00
f4304c6592 Merge pull request #9560 from TristanCacqueray/libpodPutArchive
[NO TESTS NEEDED] swagger: update the libpodPutArchive verb
2021-03-02 12:24:59 -08:00
0c12478a38 Merge pull request #9557 from liuming50/split-docker-install-docs
[NO TESTS NEEDED] Makefile: split install.docker-docs from install.docker
2021-03-02 11:31:04 -08:00
b19791c0b6 Tidy duplicate log tests
Some log tests were duplicated, and some didn't need to be repeated for
every driver. Also, added some comments

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-03-02 14:28:16 -05:00
5df6251402 Fix support for podman build --timestamp
Currently podman is ignoreing the build --timestamp flag.
This PR fixes this for local and remote clients.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-02 14:25:29 -05:00
43e899c2ec Rewrite Rename backend in a more atomic fashion
Move the core of renaming logic into the DB. This guarantees a
lot more atomicity than we have right now (our current solution,
removing the container from the DB and re-creating it, is *VERY*
not atomic and prone to leaving a corrupted state behind if
things go wrong. Moving things into the DB allows us to remove
most, but not all, of this - there's still a potential scenario
where the c/storage rename fails but the Podman rename succeeds,
and we end up with a mismatched state.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-03-02 13:30:28 -05:00
91b2f07d5b Use functions and defines from checkpointctl
No functional changes.

[NO TESTS NEEDED] - only moving code around

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-03-02 17:00:06 +00:00
bf92e21113 Move checkpoint/restore code to pkg/checkpoint/crutils
To be able to reuse common checkpoint/restore functions this commit
moves code to pkg/checkpoint/crutils.

This commit has not functional changes. It only moves code around.

[NO TESTS NEEDED] - only moving code around

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-03-02 17:00:06 +00:00
bd819ef7dc Vendor in checkpointctl
checkpointctl contains common code to work with checkpoint images in
Podman, CRI-O and Kubernetes.

Use functions and definitions from checkpointctl where possible.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-03-02 17:00:06 +00:00
ac992e4b02 Makefile: install systemd services conditionally
Only install systemd services provided that systemd is in BUILDTAGS.

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
2021-03-02 16:24:15 +01:00
426178a499 Merge pull request #9561 from Luap99/update-ocicni
Bump github.com/cri-o/ocicni to latest master
2021-03-02 07:23:23 -08:00
774aea45ee swagger: update the libpodPutArchive operation verb
This change fixes the libpodPutArchive verb to PUT
(POST results in 405).

Signed-off-by: Tristan Cacqueray <tdecacqu@redhat.com>
2021-03-02 13:09:50 +00:00
c7267329bf Merge pull request #9563 from mlegenovic/master
Compat api containers/json Ports field is null
2021-03-02 05:08:22 -08:00
3908c00799 Makefile: split install.docker-docs from install.docker
This allows end users to be able to choose to not install any docs.

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
2021-03-02 13:20:41 +01:00
7497dcba6c Merge pull request #9565 from AkihiroSuda/bump-rootlesskit-20210302
Bump RootlessKit v0.14.0-beta.0
2021-03-02 04:13:16 -08:00
2f0fc2911c Bump RootlessKit v0.14.0-beta.0
https://github.com/rootless-containers/rootlesskit/releases/tag/v0.14.0-beta.0

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-03-02 17:01:25 +09:00
8b7caa6d04 Compat api containers/json Ports field is null
Fixes #9553

Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
2021-03-02 02:50:41 +01:00
14d5bd1645 Bump github.com/cri-o/ocicni to latest master
Fixes #9472

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-03-01 23:28:14 +01:00
8af66806c8 Merge pull request #9556 from jwhonce/wip/docker
Refactor python tests to run against python3.9
2021-03-01 14:20:49 -08:00
7927fe01f1 Refactor python tests to run against python3.9
* Introduce sub-package compat to meet packaging and import requirements
* Update documenation for running tests
* Add requirements.txt to improve IDE support

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-03-01 13:15:59 -07:00
73044b2817 Merge pull request #9555 from edsantiago/apiv2_test_readability
APIv2 tests: make more maintainable
2021-03-01 21:08:50 +01:00
8daa014f38 Merge pull request #9142 from cevich/releaseprocess
[CI:DOCS]First pass at release process
2021-03-01 19:27:48 +01:00
bab635d9f6 Merge pull request #9542 from vrothberg/rmi-hardening
podman rmi: handle corrupted storage better
2021-03-01 19:18:49 +01:00
9435e5b79b APIv2 tests: make more maintainable
While I wasn't looking, some completely unreadable cruft
crept in here, and it's totally my fault: I never knew
you could pass JSON to a GET query. Everyone who DID
know that, did so, but had to URL-escape it into a
completely gobbledygook mess to make curl happy.

Solution: trivial, do the URL-escaping in 't' itself. I
just never realized that was needed.

I'm so sorry. I hope this helps.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-03-01 10:47:48 -07:00
e9d94dc90d [CI:DOCS] Improve release process docs
Signed-off-by: Chris Evich <cevich@redhat.com>
2021-03-01 11:45:08 -05:00
b5827d80d3 Merge pull request #9531 from Luap99/fix-9526
compat api network ls accept both format options
2021-03-01 16:28:51 +01:00
3752016338 podman rmi: handle corrupted storage better
The storage can easily be corrupted when a build or pull process (or any
process *writing* to the storage) has been killed.  The corruption
surfaces in Podman reporting that a given layer could not be found in
the layer tree.  Those errors must not be fatal but only logged, such
that the image removal may continue.  Otherwise, a user may be unable to
remove an image.

[NO TESTS NEEDED] as I do not yet have a reliable way to cause such a
storage corruption.

Reported-in: https://github.com/containers/podman/issues/8148#issuecomment-787598940
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-03-01 09:52:03 +01:00
b154c519ac Merge pull request #9509 from mlegenovic/master
Correct compat images/create?fromImage response
2021-03-01 08:27:47 +01:00
3417703a06 Merge pull request #9527 from rhatdan/hosts
Enable no_hosts from containers.conf
2021-03-01 08:12:48 +01:00
d9cb135b64 Enable cgroupsv2 rw mount via security-opt unmask
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-02-28 15:59:43 +01:00
9600ea6bef Merge pull request #9533 from elimisteve/patch-3
[CI:DOCS] podman-image-sign.1.md: typo fix
2021-02-27 20:51:03 +01:00
cc679d952a podman-image-sign.1.md: typo fix
identify -> identity

Signed-off-by: Steve Phillips <steve@tryingtobeawesome.com>
2021-02-27 09:05:25 -08:00
f54ed7269a compat api network ls accept both format options
Docker allows both the old `map[string]map[string]bool`
and the newer `map[string][]string` for the filter param
so we should too.

Fixes #9526

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-02-26 19:42:34 +01:00
397aae32b9 Merge pull request #8749 from edsantiago/upgrade_test
podman upgrade tests
2021-02-26 13:19:25 +01:00
680dacaea2 Enable no_hosts from containers.conf
Since we have no good way to enable this on the server side, we will
just allow it to be set on the client side. This should solve almost all
cases.

Partially fixes: https://github.com/containers/podman/issues/9500

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-26 06:37:48 -05:00