10353 Commits

Author SHA1 Message Date
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
2d30eff068 enable short-name aliasing
Short-name aliasing was introduced with Podman 2.2 as an opt-in preview
by enabling an environment variable.  Now, as we're preparing for the
3.0 release, we can enable short-name aliasing by default.  Opting out
can be done by configuring the `registries.conf` config file.

Please refer to the following blog post for more details:
https://www.redhat.com/sysadmin/container-image-short-names

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-12-05 12:42:32 +01: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
8dab410181 e2e: bump pull timeout to 240 seconds
I am constantly hitting the 90 seconds limit with my very slow
connection.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-12-04 11:43:17 +01:00
701cc6ab40 add @Luap99 to OWNERS file
@Luap99 is a long-term contributor, does a lot of reviews, contributed
many non-trivial patches, and is very active in the community.

Being in the OWNERS file gives privileges to approve (/approve) and
merge (/lgtm) pull requests.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-12-04 09:21:04 +01:00
e58fb21ced Support Unix timestamps for podman logs --since
To match what podman-logs(1) describes --since

Signed-off-by: Chih-Hsuan Yen <yan12125@gmail.com>
2020-12-04 15:14:31 +08:00
95b4478fb4 Fix some nit
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
2020-12-04 09:20:42 +08:00
468947d5c8 Jira RUN-1106 Image handlers updates
* Audit and add tests for required fields.
* Added issue for /images/load implementation

Audit:
- GET /images/json GetImages
- POST /build BuildImage
- POST /build/prune 404 not found
- POST /images/create CreateImageFromImage/CreateImageFromSrc
- GET /images/{name}/json GetImage
- GET /images/{name}/history HistoryImage
- POST /images/{name}/push PushImage
- POST /images/{name}/tag TagImage
- DELETE /images/{name} RemoveImage
- POST /images/prune PruneImages
- POST /commit CommitContainer
- GET /images/{name}/get ExportImage
- GET /images/get ExportImages
- POST /images/load LoadImages See https://github.com/containers/podman/issues/8586

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-12-03 16:11:17 -07:00
767afe01db Jira RUN-1106 Container handlers updates
Mostly audit and minor changes to nil from ""

Audit:
- GET /containers/json ListContainers
- POST /containers/create CreateContainer
- GET /containers/{id}/json GetContainer
- GET /containers/{id}/top TopContainer
- GET /containers/{id}/logs LogsFromContainer
- GET /containers/{id}/changes Changes
- GET /containers/{id}/export ExportContainer
- GET /containers/{id}/stats StatsContainer
- POST /containers/{id}/resize ResizeTTY
- POST /containers/{id}/start StartContainer
- POST /containers/{id}/stop StopContainer
- POST /containers/{id}/restart RestartContainer
- POST /containers/{id}/kill KillContainer
- POST /containers/{id}/update 404 not supported
- POST /containers/{id}/rename 404 not supported
- POST /containers/{id}/pause PauseContainer
- POST /containers/{id}/unpause UnpauseContainer
- POST /containers/{id}/attach AttachContainer
- GET /containers/{id}/attach/ws 404 not supported
- POST /containers/{id}/wait WaitContainer
- DELETE /containers/{id} RemoveContainer
- HEAD /containers/{id}/archive Archive
- GET /containers/{id}/archive Archive
- PUT /containers/{id}/archive Archive
- POST /containers/prune PruneContainers

Images etc PR's will follow.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-12-03 13:49:22 -07:00
d9154e97eb Add containerenv information to /run/.containerenv
We have been asked to leak some information into the container
to indicate:
* The name and id of the container
* The version of podman used to launch the container
* The image name and ID the container is based on.
* Whether the container engine is running in rootless mode.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-03 13:32:15 -05:00