11348 Commits

Author SHA1 Message Date
252aec1c9a Check for supportsKVM based on basename of the runtime
Fixes: https://github.com/containers/podman/issues/9582

This PR also adds tests to make sure SELinux labels match the runtime,
or if init is specified works with the correct label.

Add tests for selinux kvm/init labels

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-03 16:49:51 -05:00
53d22c779c Compat API: create volume source dirs on the host
It took a lot to figure out exactly how this should work, but I
think I finally have it. My initial versions of this created the
directory with the same owner as the user the container was run
with, which was rather complicated - but after review against
Docker, I have determined that is incorrect, and it's always made
as root:root 0755 (Ubuntu's Docker, which I was using to try and
test, is a snap - and as such it was sandboxed, and not actually
placing directories it made in a place I could find?). This makes
things much easier, since I just need to parse out source
directories for binds and ensure they exist.

Fixes #9510

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-03-03 16:22:31 -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
2c8c5393a4 Support label type dict on compat build
The compatibility endpoint for build labels should be of type dict (not
list).  For backwards compatibility, we support both.

Fixes: #9517

Signed-off-by: baude <bbaude@redhat.com>
2021-03-02 10:56:28 -06: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
63a3b8a093 podman-system-service.1.md: fix timeout example
The rest of this document claims that the argument is called '--time',
not '--timeout', and that the value is expressed in seconds. As
currently written, the example (which ostensibly runs the API service
for 5 seconds) uses the '--timeout' spelling (which actually does work,
as an undocumented alias) and passes a value of '5000', which is more
than an hour. Fix both.

[NO TESTS NEEDED] as this is a simple documentation change.

Signed-off-by: Will Thompson <wjt@endlessos.org>
2021-03-02 14:31:43 +00: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