8088 Commits

Author SHA1 Message Date
ceef4f6819 Merge pull request #6491 from vrothberg/fix-6490
/images/.../json: fix port parsing
2020-06-04 15:23:16 +02:00
650ed437a8 Merge pull request #6489 from edsantiago/bats
BATS and APIv2: more tests and tweaks
2020-06-04 15:03:40 +02:00
c133e55afc Merge pull request #6485 from QiWang19/remote-ignore
fix remote test --ignore & turn on more tests
2020-06-04 14:52:25 +02:00
6682ea8f0d Merge pull request #6481 from QiWang19/rm-test-stop
turn on remote stop_test
2020-06-04 14:49:35 +02:00
8cf74a79e3 Merge pull request #6470 from mheon/fix_stats_nonet
Properly follow linked namespace container for stats
2020-06-04 14:46:49 +02:00
9d138724ab Merge pull request #6486 from baude/v2infoaddsocket
add socket information to podman info
2020-06-04 14:43:52 +02:00
08ce2c1b2f Merge pull request #6404 from containers/dependabot/go_modules/github.com/containers/conmon-2.0.17incompatible
Bump github.com/containers/conmon from 2.0.16+incompatible to 2.0.17+incompatible
2020-06-04 14:16:53 +02:00
ff99c3ecb3 Merge pull request #6484 from rhatdan/namespace
Namespace fields were set with bogus values
2020-06-04 13:41:44 +02:00
06d8c3dda3 Merge pull request #6476 from eriksjolund/add_some_CVE_entries_to_changelog.txt
Add a few CVE entries to changelog.txt
2020-06-04 13:38:55 +02:00
a3f2a8d73c Merge pull request #6482 from mheon/split_inspect
Ensure that image/container inspect are specialized
2020-06-04 13:36:10 +02:00
d6e70c6df9 Merge pull request #6487 from rhatdan/VENDOR
Vendor in container/storage v1.20.2
2020-06-04 10:48:41 +02:00
6229d9d07d /images/.../json: fix port parsing
Fix a bug when parsing the `ExposedPorts` of the image that lead to
panics when the field was set.  The OCI image spec allows three valid
formats: `tcp/port`, `udp/port` and `port`

Fixes: #6490
Reported-by: @jgallucci32
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-06-04 09:37:27 +02:00
2d5a2a7640 BATS and APIv2: more tests and tweaks
- (minor): apiv2 tests: check for full ID

   Observation made while reviewing #6461: tests were checking
   only for a 12-character container/image ID in return value.
   It's actually 64, and we should test for that. This should
   also minimize confusion in a future maintainer.

 - podman pause/unpause: new test

   Runs a 'date/sleep' loop, pauses container, sleeps 3s,
   restarts, then confirms that there's a 3- to 6-second
   gap in the logs for the container.

 - podman healthcheck: new test

   run a container with healthcheck, test both healthy
   and unhealthy conditions

 - podman pod: check '{{.Pod}}' field in podman ps

   Hey, as long as we have a pod with two running
   containers, might as well confirm that 'podman ps'
   returns the expected pod ID.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-06-03 16:13:33 -06:00
545aef7d9b Vendor in container/storage v1.20.2
Also modify gate Dockerfile to take advantage of skipping
mounting of the storage directory.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-06-03 17:22:49 -04:00
d023909c0b add socket information to podman info
this is step 1 to self-discovery of remote ssh connections.  we add a remotesocket struct to info to detect what the socket path might be.

Co-authored-by: Jhon Honce <jhonce@redhat.com>
Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-06-03 15:20:37 -05:00
1f8c509faf Merge pull request #6478 from rhatdan/abisupport
Remove use of ABISupport buildtag
2020-06-03 22:12:33 +02:00
986a277a96 Merge pull request #6483 from mheon/cleanup_on_stop
When stopping containers locally, ensure cleanup runs
2020-06-03 22:04:18 +02:00
bdfec451dc Namespace fields were set with bogus values
Namespace fields were being set with their option names
unless overriden by the user.  This was causing issues
with podman-remote on userns.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-06-03 15:56:17 -04:00
61ea85bddb When stopping containers locally, ensure cleanup runs
The cleanup process was already running and ensuring that mounts
and networking configuration was cleaned up on container stop,
but this was async from the actual `podman stop` command which
breaks some expectations - the container is still mounted at the
end of `podman stop` and will be cleaned up soon, but not
immediately. Fortunately, it's a trivial change to resolve this.

Fixes #5747

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-06-03 15:16:24 -04:00
377554d681 Merge pull request #6461 from chuanchang/add_contaner_cases_for_apiv2
test.apiv2: add test cases for committing an image from a container
2020-06-03 21:15:05 +02:00
9263ed2ab1 Remove use of ABISupport buildtag
We need to default to building podman. If you specify no build
tags you will not build podman, not podman-remote.

Just using remote flag to indicate podman-remote and !remote for
podman.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-06-03 15:11:34 -04:00
f313a88441 fix remote test --ignore & turn on more tests
fix remote test --ignore & turn on more tests

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-06-03 15:04:58 -04:00
d505989b0e Ensure that image/container inspect are specialized
We are currently able to inspect images with
`podman container inspect` and containers with
`podman image inspect` and neither of those seem correct. This
ensures that the appropriate flags, and only the appropriate
flags, are available for each specialized exec, and they can only
inspect the specific type they were intended to.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-06-03 14:25:45 -04:00
bba0a8be1a Merge pull request #6465 from rhatdan/remote
Add more Remote tests
2020-06-03 20:12:05 +02:00
cbfb4980ce Merge pull request #6469 from jwhonce/wip/auth
V2 Add support for ssh authentication methods
2020-06-03 19:43:56 +02:00
df0141dc20 Merge pull request #6473 from mheon/fix_inspect_segfault
Fix a segfault in `podman inspect -l` w/ no containers
2020-06-03 19:27:54 +02:00
e77db144ab turn on remote stop_test
turn on stop_test  --cidfile

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-06-03 12:55:58 -04:00
cbca625328 V2 Add support for ssh authentication methods
* podman --remote ssh://<user>:<password>@<host>:<port><path>
* podman --remote ssh://<user>:<password>@<host>:<port><path> \
  --identity <path> --passphrase <phrase>
* ssh-add <key>
  podman --remote ssh://<user>@<host><path>
* Fix `podman help` to run even if podman missing components
* Prompt for passphrase on stdin IFF key is protected and passphrase
  not given via any other configuration

* cobra flags do not support optional value flags therefore refactored
  --remote to be a boolean and --url will now contain the URI to Podman
  service

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-06-03 09:54:39 -07:00
9bd48a64bb Merge pull request #6477 from rhatdan/spec
RHEL8 and Centos8 don't have oci-runtime yet
2020-06-03 16:20:51 +02:00
a88450f68a Add a few CVE entries to changelog.txt
Add the following CVE entries

CVE-2020-1726
CVE-2020-10696
CVE-2019-18466

to changelog.txt

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2020-06-03 15:07:21 +02:00
428303c789 Merge pull request #6474 from QiWang19/remote-cidfile-test
Turn on remote rm_test
2020-06-03 12:36:39 +02:00
8153f299ad Add more Remote tests
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-06-03 06:35:45 -04:00
48d2bea1a3 RHEL8 and Centos8 don't have oci-runtime yet
For the time being we need to just require runc
this should fix rdoproject.org/github-check

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-06-03 06:32:58 -04:00
382342a0b0 test.apiv2: add test cases for committing an image from a container
Testing query parameters: container, repo, tag, comment, author, changes
and pause.

Signed-off-by: Alex Jia <chuanchang.jia@gmail.com>
2020-06-03 05:33:56 +00:00
5473ba95d7 Turn on remote rm_test --cidfile
Turn on remote rm_test --cidfile

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-06-02 19:12:31 -04:00
95ea39edf3 Merge pull request #6471 from mheon/troubleshooting_77
Remove reference to "upcoming" RHEL 7.7
2020-06-03 00:05:08 +02:00
26bb48951f Merge pull request #6468 from mheon/remote_detached_exec
Enable detached exec for remote
2020-06-03 00:02:20 +02:00
42505f64d2 Properly follow linked namespace container for stats
Podman containers can specify that they get their network
namespace from another container. This is automatic in pods, but
any container can do it.

The problem is that these containers are not guaranteed to have a
network namespace of their own; it is perfectly valid to join the
network namespace of a --net=host container, and both containers
will end up in the host namespace. The code for obtaining network
stats did not account for this, and could cause segfaults as a
result. Fortunately, the fix is simple - the function we use to
get said stats already performs appropriate checks, so we just
need to recursively call it.

Fixes #5652

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-06-02 17:58:52 -04:00
4b37d4d5af Fix a segfault in podman inspect -l w/ no containers
We also need to rework container/image inspect to be separate,
but that can happen in another PR.

Fixes #6472

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-06-02 17:22:00 -04:00
0c878beb57 Remove reference to "upcoming" RHEL 7.7
7.7 has been released for a while now, so change troubleshooting
reference to indicate that.

Fixes #6349

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-06-02 16:47:28 -04:00
4632a4b706 Merge pull request #6467 from baude/v2windowsenv
make env handling os dependent
2020-06-02 22:36:46 +02:00
69020c7040 Bump Conmon in COPR spec
We need 2.0.17 for detached remote exec.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-06-02 15:30:42 -04:00
e0d9404634 Enable detached exec for remote
The biggest obstacle here was cleanup - we needed a way to remove
detached exec sessions after they exited, but there's no way to
tell if an exec session will be attached or detached when it's
created, and that's when we must add the exit command that would
do the removal. The solution was adding a delay to the exit
command (5 minutes), which gives sufficient time for attached
exec sessions to retrieve the exit code of the session after it
exits, but still guarantees that they will be removed, even for
detached sessions. This requires Conmon 2.0.17, which has the new
`--exit-delay` flag.

As part of the exit command rework, we can drop the hack we were
using to clean up exec sessions (remove them as part of inspect).
This is a lot cleaner, and I'm a lot happier about it.

Otherwise, this is just plumbing - we need a bindings call for
detached exec, and that needed to be added to the tunnel mode
backend for entities.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-06-02 15:30:42 -04:00
c4ccd7cbc1 Merge pull request #6435 from QiWang19/uid
check --user range for rootless containers
2020-06-02 20:51:13 +02:00
37ac21ff08 Merge pull request #6460 from vrothberg/no-trunc
images --no-trunc: fix ID formatting
2020-06-02 20:48:18 +02:00
77e4b077b9 check --user range for rootless containers
Check --user range if it's a uid for rootless containers. Returns error if it is out of the range. From https://github.com/containers/libpod/issues/6431#issuecomment-636124686

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-06-02 11:28:58 -04:00
030a4d3257 images --no-trunc: fix ID formatting
Remove the redundant `sha256:` prefix from the image IDs.

Fixes: #6459
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-06-02 17:08:31 +02:00
d10addca6c Merge pull request #6457 from rhatdan/psgo
Update vendor containers/psgo
2020-06-02 15:44:15 +02:00
70e6b2e6dd make env handling os dependent
environment variables are handled differently on windows vs linux.  here we split them to be handled but no actually processing of windows environment variables was done.  it can be added for future.  hoowever, now we dont get errors on windows about processing them.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-06-02 08:28:08 -05:00
2937151e37 Merge pull request #6445 from containers/dependabot/go_modules/github.com/onsi/ginkgo-1.12.3
Bump github.com/onsi/ginkgo from 1.12.2 to 1.12.3
2020-06-02 09:02:08 -04:00