Commit Graph

8429 Commits

Author SHA1 Message Date
Ed Santiago a4bfcd75aa system tests: more podman-pod tests
* rename pod-top.bats to pod.bats
* add test for TCP port communication between pods
* add test for various podman-pod-create options

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-05-20 11:04:54 -06:00
OpenShift Merge Robot 09f8f14b4f
Merge pull request #6273 from vrothberg/registry_helper
Registry helper : go bindings
2020-05-20 18:39:37 +02:00
OpenShift Merge Robot 70d89bfc62
Merge pull request #6293 from baude/v2docstree
[CI:DOCS] Image tree endpoint should return 404
2020-05-20 17:31:14 +02:00
Peter Hunt d2d338b7ec don't skip log tests unless remote
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2020-05-20 11:11:15 -04:00
Brent Baude 8675a09e2e [CI:DOCS] Image tree endpoint should return 404
when trying to get an image tree for a missing image, it should return a 404.  doc fix only.

Fixes: #6289

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-05-20 09:30:20 -05:00
OpenShift Merge Robot a6700147a8
Merge pull request #6277 from rhatdan/readme
[CI:DOCS] Get MAC, Windows and Linux podman-remote from latest version links.
2020-05-20 16:17:17 +02:00
Peter Hunt 92acb3676c oci conmon: tell conmon to log container name
specifying `-n=ctr-name` tells conmon to log CONTAINER_NAME=name if the log driver is journald

add this, and a test!

also, refactor the args slice creation to not append() unnecessarily.

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2020-05-20 10:07:54 -04:00
Valentin Rothberg dfe0579a2f add go-bindings for `hack/podman-registry`
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-05-20 15:12:35 +02:00
Ed Santiago 973d624418 New tool: hack/podman-registry, manages local registry
In response to #6207: this is a helper script intended for
use in starting and stopping a local container registry.
It takes care of port, username, password assignments;
generates a self-signed certificate; and starts the
container in an isolated podman root/runroot to avoid
conflicting with the caller's environment.

Intended usage: invoke from shell script, using 'eval'
to get results into calling process environment. See
help message (-h) for invocation details. This will
work for shell scripts but will be difficult if
called from Go or C - if that is likely to happen,
I'd love to hear suggestions for alternate ways to
get the settings back to the caller.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-05-20 10:22:16 +02:00
Kunal Kushwaha 087fdda199 Testcase added for network commands
New testcase for network ls --filter and inspect --format
added. Also bash completion options updated.

Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
2020-05-20 02:53:47 +00:00
Kunal Kushwaha ade20f3323 format option added to network inspect command.
This helps user to print the inspect output in go template format.

Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
2020-05-20 02:53:47 +00:00
Kunal Kushwaha 1dde2730e8 filter option added to network ls command.
filter option helps to filter output based on name or supported plugins
by CNI networks.

Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
2020-05-20 02:53:47 +00:00
OpenShift Merge Robot 4eee0d840f
Merge pull request #6177 from baude/v2enableremote
v2 enable remote integration tests
2020-05-20 01:45:00 +02:00
Daniel J Walsh 35829854a2
Fix mountpont in SecretMountsWithUIDGID
In FIPS Mode we expect to work off of the Mountpath not the Rundir path.
This is causing FIPS Mode checks to fail.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-19 16:33:24 -04:00
Daniel J Walsh e0a0d2fb07
Update troubleshoot page
Add information about podman with SELinux and using container_init_t.

Add informantion about Centos7 as well as RHEL7 init containers not working
on a cgroups V2 system.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-19 15:34:45 -04:00
Brent Baude 8ec08a426e v2 enable remote integration tests
enable remote integration tests

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-05-19 14:26:19 -05:00
Daniel J Walsh 9f07eff1a4
Get MAC, Windows and Linux podman-remote from latest version links.
The links to latest windows and MAC versions are broken, and snapd version is i
out of date. Users should just go to release and grab packages from there.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-19 08:59:14 -04:00
OpenShift Merge Robot 0f8ad03923
Merge pull request #6266 from mheon/bump-2.0.0-rc1
Bump to v2.0.0-RC1
2020-05-18 22:22:01 +02:00
OpenShift Merge Robot 9fe49335e0
Merge pull request #6249 from jwhonce/wip/resize
V2 Implement terminal handling in bindings attach
2020-05-18 21:58:23 +02:00
OpenShift Merge Robot 1332c8b3ab
Merge pull request #6188 from neVERberleRfellerER/autoupdate-systemd-envvar
Give `auto-update` ability to use per-container authfile specified by label.
2020-05-18 21:39:34 +02:00
OpenShift Merge Robot 50ceb261ef
Merge pull request #6268 from baude/varlinkbuild2
Fix EOM for SendFile
2020-05-18 21:17:00 +02:00
OpenShift Merge Robot d6d45003c9
Merge pull request #6232 from edsantiago/bats_cgroupsv1_fixes
system tests: small fixes for rawhide+cgroups v1
2020-05-18 20:37:20 +02:00
Jhon Honce 6287a55852 V2 Implement terminal handling in bindings attach
* Add support for /exec/{id}/resize
* Add support for ErrSessionNotFound
* Resize container TTY as stdin changes size
* Refactor all resize functions into one handler

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-05-18 11:21:06 -07:00
Brent Baude 6f224d0886 Fix EOM for SendFile
To terminate a connection of varlink, say after sending a file, we need to send a message containing a delimiter of ':' so the client knows to hang up.

Fixes: #6237

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-05-18 12:45:00 -05:00
Matthew Heon 8ce7bd569f Bump to v2.0.0-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-05-18 13:24:12 -04:00
Matthew Heon 74777ec052 Bump to v2.0.0-rc1
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-05-18 13:24:09 -04:00
OpenShift Merge Robot d4587c6074
Merge pull request #6264 from baude/v2rmi
v2endpoint remove image path correction
2020-05-18 17:34:38 +02:00
Brent Baude fe16f8f67a v2endpoint remove image path correction
the endpoint for single image removal (on the libpod side) should be as follows:

versionedPath/libpod/images/IMAGENAME

The DELETE method then signifies the removal of the image.

Fixes: #6261

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-05-18 09:35:51 -05:00
OpenShift Merge Robot bfcec3203e
Merge pull request #6231 from mheon/fix_coverity
Fix two coverity issues (unchecked null return)
2020-05-17 04:03:54 -07:00
Ondřej Kraus 9177c89edd
Give `auto-update` ability to use per-container authfile specified by label.
Signed-off-by: Ondřej Kraus <neverberlerfellerer@gmail.com>
2020-05-17 11:37:12 +02:00
OpenShift Merge Robot 343ab99b39 Merge pull request #5831 from mheon/exec_http_attach
APIv2 ExecStart (Attached Only)
2020-05-15 13:19:43 -07:00
Matthew Heon 6d1e5c713a Drop APIv2 resize endpoint
Jhon is working on an alternative version that will combine
container and exec session resize, so we'll wait for that.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-15 15:02:41 -04:00
Matthew Heon ab25f70dad Drop a debug line which could print very large messages
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-15 14:35:10 -04:00
OpenShift Merge Robot c61a45caf8
Merge pull request #6230 from rhatdan/makefile
Fix REMOTETAGS
2020-05-15 10:47:18 -07:00
OpenShift Merge Robot 59dd3418f6
Merge pull request #6246 from baude/v2remoterun
v2 podman remote attach, start, and run
2020-05-15 09:59:18 -07:00
OpenShift Merge Robot e601101e7d
Merge pull request #6201 from cevich/update_ubuntu20
Cirrus: Update Ubuntu 18 to 20
2020-05-15 09:53:54 -07:00
Brent Baude ce56202b45 v2 podman remote attach, start, and run
for the remote client, add the ability to attach to a container, start a container, and run a container.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-05-15 10:09:45 -05:00
OpenShift Merge Robot d5358e6764
Merge pull request #6215 from maxm123/master
Use the containers.conf cni_config_dir option for inspect and delete
2020-05-15 07:39:35 -07:00
OpenShift Merge Robot a88cd9a22e
Merge pull request #6227 from adrianreber/typo
Fix checkpoint --leave-running
2020-05-15 06:23:32 -07:00
OpenShift Merge Robot 4611ff5ce4
Merge pull request #6236 from jwhonce/wip/boxed
Make convenience boxed true/false easier to use
2020-05-14 15:13:47 -07:00
Matthew Heon 79ad6bb53d Fix lint
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-14 17:34:42 -04:00
Matthew Heon 50ed292aee Remove duplicated exec handling code
During the initial workup of HTTP exec, I duplicated most of the
existing exec handling code so I could work on it without
breaking normal exec (and compare what I was doing to the nroaml
version). Now that it's done and working, we can switch over to
the refactored version and ditch the original, removing a lot of
duplicated code.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-14 17:32:44 -04:00
Matthew Heon a6d9cf9a5e Fix lint
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-14 17:01:49 -04:00
Matthew Heon 1641f4fc0d Update API documentation for Inspect
Most importantly, note the pruning behavior of compat Inspect.

Less importantly, note that the Tty parameter to Start is only
ignored, as opposed to being not supported.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-14 17:00:19 -04:00
Matthew Heon 08d04c2e05 Parameters for ExecStart are body, not query
Oops. Misread the docs when I initially implemented this. Nice
and easy fix, at least.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-14 16:56:02 -04:00
Matthew Heon 0f0abe2909 Prune stale exec sessions on inspect
The usual flow for exec is going to be:
- Create exec session
- Start and attach to exec session
- Exec session exits, attach session terminates
- Client does an exec inspect to pick up exit code

The safest point to remove the exec session, without doing any
database changes to track stale sessions, is to remove during the
last part of this - the single inspect after the exec session
exits.

This is definitely different from Docker (which would retain the
exec session for up to 10 minutes after it exits, where we will
immediately discard) but should be close enough to be not
noticeable in regular usage.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-14 16:56:02 -04:00
Matthew Heon 0c3bed119b Remove exec sessions on container restart
With APIv2, we cannot guarantee that exec sessions will be
removed cleanly on exit (Docker does not include an API for
removing exec sessions, instead using a timer-based reaper which
we cannot easily replicate). This is part 1 of a 2-part approach
to providing a solution to this. This ensures that exec sessions
will be reaped, at the very least, on container restart, which
takes care of any that were not properly removed during the run
of a container.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-14 16:56:02 -04:00
Matthew Heon 2b08359faf Fix start order for APIv2 exec start endpoint
This makes the endpoint (mostly) functional.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-14 16:56:02 -04:00
Matthew Heon c76cf1735c Don't fail when saving exec status fails on removed ctr
We can't save the exec session, but it's because the container
is entirely gone, so no point erroring.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-05-14 16:56:01 -04:00
Matthew Heon cf1f13af98 Add APIv2 handler for resizing exec sessions
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-05-14 16:56:01 -04:00