10210 Commits

Author SHA1 Message Date
4d6f958202 Fix network ls --filter invalid value flake
The filter is only validated when at least one network exists.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-12-07 21:14:13 +01:00
a5ca03915e Merge pull request #8632 from mheon/fix_8613
Change name of imageVolumes in container config JSON
2020-12-07 14:04:09 -05:00
51166d0898 Merge pull request #7357 from QiWang19/rootless-sign
image sign using per user registries.d
2020-12-07 14:02:22 -05:00
3569e24df8 Merge pull request #8375 from vrothberg/cgroup-path
container cgroup path
2020-12-07 12:30:06 -05:00
c050fad958 Change name of imageVolumes in container config JSON
Podman pre-1.8 also included a field with this name, which was a
String. Podman 2.2.0 added a new field reusing the name but as a
Struct. This completely broke JSON decode for pre-1.8 containers
in Podman 2.2, resulting in completely broken behavior.

Re-name the JSON field and add a note that the old name should
not be re-used to prevent this problem from re-occurring. This
will still result in containers from 2.2.0 being broken
(specifically, containers with image volumes will have them
disappear) but this is the lesser of two evils.

Fixes #8613

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-12-07 11:50:47 -05:00
ef6748dc87 Merge pull request #8629 from mheon/no_error_on_dupe_handler
Do not error on installing duplicate shutdown handler
2020-12-07 11:46:48 -05:00
aac03d4a32 Merge pull request #8561 from mheon/fix_gating
Do not mount sysfs as rootless in more cases
2020-12-07 11:38:18 -05:00
225907536f Merge pull request #8625 from Edward5hen/container-prune-test
Add APIv2 test for containers-prune
2020-12-07 11:21:06 -05:00
e6f80fa61a Merge pull request #8624 from mlegenovic/master
Docker compat API - containers create ignores the name
2020-12-07 10:40:40 -05:00
bd2cfe0a93 Do not error on installing duplicate shutdown handler
Installing a duplicate shutdown handler fails, but if a handler
with the same name is already present, we should be set to go.
There's no reason to print a user-facing error about it.

This comes up almost nowhere because Podman never makes more than
one Libpod runtime, but there is one exception (`system reset`)
and the error messages, while harmless, were making people very
confused (we got several bug reports that `system reset` was
nonfunctional).

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-12-07 10:00:36 -05:00
cf8f2342a1 image sign using per user registries.d
Support per user ~/.config/containers/registries.d to allow rootless image sign configurations.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-12-07 09:58:38 -05:00
dc5da90523 Merge pull request #8622 from containers/dependabot/go_modules/github.com/containers/common-0.31.0
Bump github.com/containers/common from 0.30.0 to 0.31.0
2020-12-07 09:21:40 -05:00
eaaab02e52 Merge pull request #8606 from rhatdan/owners
[CI:DOCS] Add saschagrunert and zhangguanzhang to OWNERS
2020-12-07 09:16:58 -05:00
055248ce98 container cgroup path
Before querying for a container's cgroup path, make sure that the
container is synced.  Also make sure to error out if the container
isn't running.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-12-07 15:16:20 +01:00
68718f9cda Merge pull request #8627 from vrothberg/fix-8558-comments
[CI:DOCS] add comment to #8558 regression test
2020-12-07 09:11:48 -05:00
9cd0efbb5c add comment to #8558 regression test
As suggested by @edsantiago, add a comment to the regression test
of #8558 to better document the context.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-12-07 14:37:27 +01:00
4a2498ff36 Docker compat API - containers create ignores the name
/containers/create compat endpoint does not set the name correctly (#7857)

Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
2020-12-07 14:28:50 +01:00
e117ad3ba2 Merge pull request #8623 from vrothberg/fix-8558
container create: do not clear image name
2020-12-07 08:18:56 -05:00
200168a3b1 Add APIv2 test for containers-prune
Signed-off-by: Edward Shen <weshen@redhat.com>
2020-12-07 07:15:57 -05:00
0c967319f8 Merge pull request #8616 from danielhelfand/install_link
[CI:DOCS] Update Website Link for Install Instructions
2020-12-07 06:01:31 -05:00
f294d89b5c container create: do not clear image name
When creating a container, do not clear the input-image name before
looking up image names.  Also add a regression test.

Fixes: #8558
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-12-07 11:58:10 +01:00
d3b87bb3d8 Add saschagrunert and zhangguanzhang to OWNERS
Adding a couple of more community members to the OWNERS file.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-07 05:55:01 -05:00
0c97252a6f Bump github.com/containers/common from 0.30.0 to 0.31.0
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.30.0 to 0.31.0.
- [Release notes](https://github.com/containers/common/releases)
- [Commits](https://github.com/containers/common/compare/v0.30.0...v0.31.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-07 05:53:35 -05:00
035d2891b7 Merge pull request #8607 from jwhonce/jira/RUN-1106-system
Jira RUN-1106 System handlers updates
2020-12-07 05:28:41 -05:00
7adc260417 update website link for install instructions
Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
2020-12-06 21:38:10 -06:00
98c1b23624 Jira RUN-1106 System handlers updates
* Update tests to reflect system endpoints
* First implementation of compat /system/df, only fields that are
  populated by libpod are set

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-12-05 16:41:57 -07:00
0c2a43b99d Merge pull request #8489 from ashley-cui/commonslirp
Add ability to set system wide options for slirp4netns
2020-12-05 05:41:52 -05:00
0be4085596 Merge pull request #8603 from jwhonce/jira/RUN-1106-volumes
Jira RUN-1106 Volumes handlers updates
2020-12-05 05:35:02 -05:00
9b11fc00f1 Jira RUN-1106 Volumes handlers updates
* Add tests to verify required fields in responses

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-12-04 16:27:42 -07:00
8e83799d58 Merge pull request #8601 from jwhonce/jira/RUN-1106-networks
Jira RUN-1106 Network handlers updates
2020-12-04 17:45:58 -05:00
72651dee50 Merge pull request #8597 from QiWang19/rawsourece
Close image rawSource when each loop ends
2020-12-04 17:35:14 -05:00
b6536d20ed Merge pull request #8494 from mlegenovic/master
More docker compat API fixes
2020-12-04 15:48:20 -05:00
53c8bc5a5e Jira RUN-1106 Network handlers updates
* Add network API tests
* Update network create endpoint to return ID not Name

Audit:
- GET /networks ListNetworks
- GET /networks/{id} InspectNetwork
- DELETE /networks/{id} RemoveNetwork
- POST /networks/create CreateNetwork
- POST /networks/prune 405 not implemented

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-12-04 13:44:33 -07:00
07af857961 Merge pull request #8596 from afbjorklund/password-callback
Use PasswordCallback instead of Password for ssh
2020-12-04 15:38:08 -05:00
c55b83195e Merge pull request #8598 from rzlourenco/master
[CI:DOCS] Clarify uid range requirements
2020-12-04 14:14:50 -05:00
95c45773d7 Do not mount sysfs as rootless in more cases
We can't mount sysfs as rootless unless we manage the network
namespace. Problem: slirp4netns is now creating and managing a
network namespace separate from the OCI runtime, so we can't
mount sysfs in many circumstances. The `crun` OCI runtime will
automatically handle this by falling back to a bind mount, but
`runc` will not, so we didn't notice until RHEL gating tests ran
on the new branch.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-12-04 13:49:56 -05:00
d6d3af9e8e Add ability to set system wide options for slirp4netns
Wire in containers.conf options for slirp

Signed-off-by: Ashley Cui <acui@redhat.com>
2020-12-04 13:37:22 -05:00
90d41104d9 Vendor in containers/common v0.30.0
Signed-off-by: Ashley Cui <acui@redhat.com>
2020-12-04 13:35:00 -05:00
0f496e4b81 Merge pull request #8570 from vrothberg/run-950
rewrite container copy
2020-12-04 13:33:36 -05:00
6724609769 Clarify uid range requirements
Signed-off-by: Rodrigo Lourenço <rzl@rzl.ooo>
2020-12-04 18:27:00 +00:00
d2f6f153ea Close image rawSource when each loop ends
Previously close rawSouce in the middle makes future use of rawSource invalid.
Move the rawSource.Close() to the end of each loop.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-12-04 13:16:16 -05:00
f01630acf3 Merge pull request #8476 from rhatdan/containerenv
Add containerenv information to /run/.containerenv
2020-12-04 11:56:24 -05:00
a2d536e597 Merge pull request #8584 from jwhonce/jira/RUN-1106-containers
Jira RUN-1106 Container handlers updates
2020-12-04 11:15:27 -05:00
aaade40780 Use PasswordCallback instead of Password for ssh
Currently asking for login password, even if not supported by
the ssh server. So wait with prompt until actually requested.

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2020-12-04 17:09:49 +01:00
15d36f120c More docker compat API fixes
Fixes wrong VirtualSize, ParentId, Architecture, Author, Os and OsVersion value

Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
2020-12-04 15:58:46 +01:00
ccbca0b4ab rewrite podman-cp
* Add a new `pkg/copy` to centralize all container-copy related code.

* The new code is based on Buildah's `copier` package.

* The compat `/archive` endpoints use the new `copy` package.

* Update docs and an several new tests.

* Includes many fixes, most notably, the look-up of volumes and mounts.

Breaking changes:

 * Podman is now expecting that container-destination paths exist.
   Before, Podman created the paths if needed.  Docker does not do
   that and I believe Podman should not either as it's a recipe for
   masking errors.  These errors may be user induced (e.g., a path
   typo), or internal typos (e.g., when the destination may be a
   mistakenly unmounted volume).  Let's keep the magic low for such
   a security sensitive feature.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-12-04 14:39:55 +01:00
ec0411aecd Merge pull request #8569 from zhangguanzhang/fix-nit
Fix some nit in code and comment
2020-12-04 06:30:31 -05:00
05df0c50ae Merge pull request #8589 from yan12125/container-logs-unix-timestamps
Support Unix timestamps for `podman logs --since`
2020-12-04 06:28:34 -05:00
d1193b1b8c Merge pull request #8587 from jwhonce/jira/RUN-1106-images
Jira RUN-1106 Image handlers updates
2020-12-04 06:23:16 -05:00
a3cb37a04f Merge pull request #8590 from vrothberg/owners
add @Luap99 to OWNERS file
2020-12-04 06:16:22 -05:00