Commit Graph

8429 Commits

Author SHA1 Message Date
dependabot-preview[bot] bea4264ed3
Bump github.com/coreos/go-systemd/v22 from 22.0.0 to 22.1.0
Bumps [github.com/coreos/go-systemd/v22](https://github.com/coreos/go-systemd) from 22.0.0 to 22.1.0.
- [Release notes](https://github.com/coreos/go-systemd/releases)
- [Commits](https://github.com/coreos/go-systemd/compare/v22.0.0...v22.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-06-02 05:52:35 -04:00
Charles Shih 9f08881c20 Combine the code of dealing with 'readonly' and 'ro'.
https://github.com/containers/libpod/pull/6380#discussion_r432391376

Signed-off-by: Charles Shih <schrht@gmail.com>
2020-06-02 09:41:11 +08:00
Matthew Heon 45a7e7266e Add bindings for exec and enable attached remote
This adds bindings for starting exec sessions, and then uses them
to wire up detached exec. Code is heavily based on Attach code
for containers, slightly modified to handle exec sessions.

Bindings are presently attached-only, detached is pending on a
Conmon update landing in CI. I'll probably get to that next.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-06-01 17:24:00 -04:00
OpenShift Merge Robot d6bf6b92c8
Merge pull request #6456 from edsantiago/bats
system tests : more tests
2020-06-01 21:11:41 +02:00
OpenShift Merge Robot 85d3641fe1
Merge pull request #6350 from rhatdan/build
Don't build code on remoteclient
2020-06-01 20:57:58 +02:00
OpenShift Merge Robot e92a65f38c
Merge pull request #6453 from jwhonce/wip/errors
Add invalid value to error message
2020-06-01 20:44:48 +02:00
OpenShift Merge Robot 7c41cb7802
Merge pull request #6454 from rhatdan/remote
Remove skipifremote checks in images_test.go
2020-06-01 20:41:41 +02:00
Daniel J Walsh 8b7c7e8125
Add information on detach-keys
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-06-01 14:38:05 -04:00
Ed Santiago 03d32d05ac system tests : more tests
- exec: add test for #5046, in which conmon swallowed chars
  on a large byte transfer

- pod: add 'pod exists' tests, both positive and negative;
  consolidate tests; add '--label', and check in 'pod inspect'
  add 'pod ps' tests

- networking: add test for #5466, in which detached run
  with --userns=keep-id would not forward a port

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-06-01 12:00:47 -06:00
OpenShift Merge Robot 5f1c23dba9
Merge pull request #6449 from baude/v2podlabels
Add support for format {{.Label}}
2020-06-01 19:41:30 +02:00
Brent Baude 990514ea92 Add support for format {{.Label}}
the pod ps man page says .Label is valid go template format. i dont think the function was actually ever implemented.

Fixes #6448

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-06-01 11:54:15 -05:00
Daniel J Walsh d8b0a58fd8
turn on remote testing for images. podman-remote build now works.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-06-01 12:44:04 -04:00
Jhon Honce 670f7c271f Add invalid value to error message
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-06-01 09:23:10 -07:00
OpenShift Merge Robot f559cec6c0
Merge pull request #6447 from baude/v2apitarleak
Fix leak of empty tarball
2020-06-01 18:00:56 +02:00
Brent Baude 8c1883721c Fix leak of empty tarball
In cases of trying to export an image, if the image was not found, we leaked an empty tarball or directory depending on the format.

Fixes: #6409

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-06-01 10:07:58 -05:00
OpenShift Merge Robot 2c6016f330
Merge pull request #6438 from rhatdan/man
[CI:DOCS] Update man pages for --ip with CNI networks
2020-06-01 15:37:19 +02:00
OpenShift Merge Robot 22713d62e2
Merge pull request #6353 from lsm5/build-without-varlink
enable building without `varlink` tag
2020-06-01 14:48:35 +02:00
Matthew Heon eb9788db23
Update man pages for --ip with CNI networks
Originally, we did not allow this, and the manpage reflects that.
We added support with 1.7.0, but did not update the manpage. Fix
the manpages so they are once again accurate.

Signed-off-by: Matthew Heon <mheon@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-31 06:02:34 -04:00
OpenShift Merge Robot bb05337f0a
Merge pull request #6441 from TomSweeneyRedHat/dev/tsweeney/fixtuthttpd
[CI:DOCS] update httpd location in tutorial
2020-05-31 05:57:57 -04:00
TomSweeneyRedHat bc1f5ef36e [CI:DOCS] update httpd location in tutorial
Update the reference to the httpd in the Podman tutorial.
This just bumps it to F29 for now to get things working,
I'd prefer to get something set up in quay.io to make it
more resistant to Fedora version changes.

Fixes: #6439

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-05-30 13:51:44 -04:00
OpenShift Merge Robot 9037908b78
Merge pull request #5594 from edsantiago/bats
system tests: enable skopeo REGISTRY_AUTH_FILE
2020-05-30 05:17:18 -04:00
OpenShift Merge Robot 6d6a629db5
Merge pull request #6165 from containers/dependabot/go_modules/github.com/rootless-containers/rootlesskit-0.9.5
Bump github.com/rootless-containers/rootlesskit from 0.9.4 to 0.9.5
2020-05-30 05:09:30 -04:00
OpenShift Merge Robot c479d63dd6
Merge pull request #6356 from baude/v2copyendpoints
v2 copy endpoints
2020-05-30 05:06:48 -04:00
Lokesh Mandvekar 8a914e8a0b default build without `varlink` tag
Issue gh#6286 was already fixed in a prior commit but the Makefile still
ran some varlink steps by default.

This commit makes any varlink build steps dependent on the varlink
build tag and also makes the contrib rpm spec file independent of
varlink.

Endpoint tests will be run only if BUILDTAGS contains varlink.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2020-05-29 14:38:33 -04:00
OpenShift Merge Robot 0eea051b92
Merge pull request #6432 from mheon/bump-2.0.0-rc3
Bump to v2.0.0-RC3
2020-05-29 11:27:34 -04:00
OpenShift Merge Robot 0c750a9672
Merge pull request #6207 from vrothberg/auth-header
add X-Registry-Auth header support
2020-05-29 10:37:59 -04:00
Matthew Heon cbd4841f35 Bump to v2.0.0-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-05-29 10:32:25 -04:00
Matthew Heon d4a3c05c0f Bump to v2.0.0-rc3
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-05-29 10:32:22 -04:00
Valentin Rothberg dc80267b59 compat handlers: add X-Registry-Auth header support
* Support the `X-Registry-Auth` http-request header.

 * The content of the header is a base64 encoded JSON payload which can
   either be a single auth config or a map of auth configs (user+pw or
   token) with the corresponding registries being the keys.  Vanilla
   Docker, projectatomic Docker and the bindings are transparantly
   supported.

 * Add a hidden `--registries-conf` flag.  Buildah exposes the same
   flag, mostly for testing purposes.

 * Do all credential parsing in the client (i.e., `cmd/podman`) pass
   the username and password in the backend instead of unparsed
   credentials.

 * Add a `pkg/auth` which handles most of the heavy lifting.

 * Go through the authentication-handling code of most commands, bindings
   and endpoints.  Migrate them to the new code and fix issues as seen.
   A final evaluation and more tests is still required *after* this
   change.

 * The manifest-push endpoint is missing certain parameters and should
   use the ABI function instead.  Adding auth-support isn't really
   possible without these parts working.

 * The container commands and endpoints (i.e., create and run) have not
   been changed yet.  The APIs don't yet account for the authfile.

 * Add authentication tests to `pkg/bindings`.

Fixes: #6384
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-05-29 15:39:37 +02:00
OpenShift Merge Robot 78c38460eb
Merge pull request #6380 from mheon/fix_mount_readonly
Add support for `readonly` option to --mount
2020-05-29 08:26:05 -04:00
OpenShift Merge Robot 8e048b23fe
Merge pull request #6429 from containers/dependabot/go_modules/github.com/stretchr/testify-1.6.0
Bump github.com/stretchr/testify from 1.5.1 to 1.6.0
2020-05-29 08:23:17 -04:00
Daniel J Walsh 6d7f8260fa
Don't build code on remoteclient
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-29 06:28:44 -04:00
OpenShift Merge Robot 6e3aec3c6d
Merge pull request #6419 from mheon/signal_parse_windows
Ensure that signal names can be parsed on Windows
2020-05-29 06:00:48 -04:00
OpenShift Merge Robot f921793948
Merge pull request #6423 from rhatdan/VENDOR
Vendor in containers/common v0.12.0
2020-05-29 05:55:14 -04:00
dependabot-preview[bot] ef807d0ac7
Bump github.com/stretchr/testify from 1.5.1 to 1.6.0
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.5.1 to 1.6.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.5.1...v1.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-29 05:49:55 -04:00
OpenShift Merge Robot cd1e25f5d5
Merge pull request #6420 from jwhonce/wip/json
V2 verify JSON output is consistent and doesn't drift
2020-05-28 20:12:08 -04:00
Jhon Honce 5626c2163b V2 verify JSON output is consistent and doesn't drift
$ cd test/apiv2
$ python -m unittest -v test_rest_v1_0_0.TestApi

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-05-28 16:20:29 -07:00
Daniel J Walsh 911b6d8b48
Vendor in containers/common v0.12.0
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-28 16:58:53 -04:00
OpenShift Merge Robot e8818ced80
Merge pull request #6416 from vrothberg/fix-ps-last
fix `ps --last=N`
2020-05-28 14:54:45 -04:00
Matthew Heon e0eb6022b3 Ensure that signal names can be parsed on Windows
To ensure the Windows and OS X remote clients can properly parse
container stop signal (when given as a name e.g. SIGTERM) and
set it in SpecGen, we need access to a list of Linux signal names
and the numbers they map to that is available on non-Linux OSes.
Fortunately, these are ABI constants that are extremely unlikely
to change, so we can just take the existing constant definitions
from the library and use them.

The signal numbers used here are sourced from AMD64, but should
be the same for every architecture that is not Alpha, SPARC,
MIPS, and PA-RISC. So `podman run --stop-signal SIGTTOU` from a
Windows client to a Podman service on a SPARC host will set an
incorrect stop signal, but I don't think this is a large problem.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-05-28 14:26:36 -04:00
OpenShift Merge Robot 4b2c980e0f
Merge pull request #6391 from chuanchang/add_test_for_image_history_and_exporting
test.apiv2: add testing for displaying image history and exporting image
2020-05-28 12:55:25 -04:00
Valentin Rothberg d6469c9c9b fix `ps --last=N`
Fix `ps --last=N` to also include non-running containers. Also add an
e2e test to prevent us from regressing in the future.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-05-28 14:24:01 +02:00
Alex Jia 7e03d277f7 test.apiv2: add testing for image and deal with API returning binary
Add testing for displaying image history and exporting image

Deal with API returning binary (Content-Type =~ 'octet').
When so, set $output to the output of 'file'.

Bug fix: in 't' helper, declare loop var $i as local
to avoid contaminating caller

Signed-off-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: Alex Jia <chuanchang.jia@gmail.com>
2020-05-28 10:00:13 +00:00
OpenShift Merge Robot adca437d03
Merge pull request #6410 from haircommander/fix-segfault
specgen: fix segfault
2020-05-27 16:30:38 -04:00
OpenShift Merge Robot c64abd0b03
Merge pull request #6407 from baude/v2eventsstream
Add streaming ability to endpoint
2020-05-27 15:07:32 -04:00
Peter Hunt 339ffd8ade specgen: fix segfault
we should not access the devices without checking if the resources are there

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2020-05-27 14:52:17 -04:00
Brent Baude 8438fa4fec Add streaming ability to endpoint
Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-05-27 12:16:39 -05:00
OpenShift Merge Robot ab3a620f74
Merge pull request #6398 from rhatdan/32bit
Fix builds on 32 Arches.
2020-05-27 11:18:37 -04:00
OpenShift Merge Robot 2a988a4d82
Merge pull request #6403 from vrothberg/push-swagger
v2 libpod push: correct docs
2020-05-27 11:03:06 -04:00
OpenShift Merge Robot 89b4683cc4
Merge pull request #6372 from boaz0/gh_6283
Add --format to pod inspect
2020-05-27 09:59:25 -04:00