Commit graph

9665 commits

Author SHA1 Message Date
Matthew Heon 915591b832 Restore indent on JSON from podman inspect
I don't know when this was disabled, but it's very hard to read
without it.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-10-13 14:52:33 -04:00
OpenShift Merge Robot 8fef35a2ff
Merge pull request #7998 from cevich/add_ci_docs
[CI:DOCS] Cirrus: Ability to skip most tests for docs updates
2020-10-13 20:47:41 +02:00
OpenShift Merge Robot 6a548df546
Merge pull request #8007 from ashley-cui/formatting
Restore --format: container stats & pod ps
2020-10-13 20:36:46 +02:00
Matthew Heon f58d2f5e75 Enforce LIFO ordering for shutdown handlers
This allows us to run both the Libpod and Server handlers at the
same time without unregistering one.

Also, pass the signal that killed us into the handlers, in case
they want to use it to determine what to do (e.g. what exit code
to set).

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-10-13 14:21:19 -04:00
baude ef5c884673 alter compat no such image message
we need to alter the return error message when a GET (inspect) is performed on an image using the compatibility layer.  docker-py bindings look for a initial capped error message.

Signed-off-by: baude <bbaude@redhat.com>
2020-10-13 12:11:52 -05:00
OpenShift Merge Robot 3e2d7a992a
Merge pull request #7955 from ParkerVR/7751-alt
Container detach newlines
2020-10-13 12:31:14 -04:00
Chris Evich 23087f77ae
Cirrus: Restore APIv2 Testing
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-10-13 11:42:31 -04:00
Chris Evich b7fd5d022d
Cirrus: Ability to skip most tests for docs updates
***Warning***: `skip` has non-obvious side-effects vs `only_if`:
https://cirrus-ci.org/guide/writing-tasks/#conditional-task-execution

The skip instruction can give a false sense of security by always
marking tasks as passed in the UI, even if they didn't run. In
contrast, the `only_if` condition will avoid creating the task
all -together; therefore, a problematic task's absense is more likely to
be noticed if it introduced a problem.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-10-13 10:17:51 -04:00
OpenShift Merge Robot 7ad631b819
Merge pull request #8000 from edsantiago/fix_apiv2_tests_again
APIv2 tests: try again to fix them
2020-10-13 09:33:57 -04:00
OpenShift Merge Robot d161f4225a
Merge pull request #7995 from mheon/api_is_stable
[CI:DOCS] Remove a note that the HTTP API is not yet stable.
2020-10-13 09:25:23 -04:00
Ashley Cui 8f603a76f6 Restore --format: stats & pod ps
Restore formatting for stats
Fix formatting for pod ps

Signed-off-by: Ashley Cui <acui@redhat.com>
2020-10-13 09:08:13 -04:00
OpenShift Merge Robot b1b9d9e139
Merge pull request #7996 from edsantiago/ci_systemtest_rootless_safe
System tests: run with local podman, not remote
2020-10-13 03:34:43 -04:00
Matthew Heon 83e6e4ccdd Enable masking stop signals within container creation
Expand the use of the Shutdown package such that we now use it
to handle signals any time we run Libpod. From there, add code to
container creation to use the Inhibit function to prevent a
shutdown from occuring during the critical parts of container
creation.

We also need to turn off signal handling when --sig-proxy is
invoked - we don't want to catch the signals ourselves then, but
instead to forward them into the container via the existing
sig-proxy handler.

Fixes #7941

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-10-12 17:08:26 -04:00
Ed Santiago 2a6a3f333b APIv2 tests: try again to fix them
CI discovered that a lot of networking tests are failing; my
fault, for not having run my tests as root on my laptop.
Disable those.

Also: bump up the ten-request time limit, from 5 to 7 seconds.
Looks like something keeps getting slower and slower, but I
guess there's not much we can do about it.

Also: when we get a mismatch response code (e.g. 500 when we
expect 200), dump the response body and skip any subsequent
response checks.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-10-12 13:57:59 -06:00
Matthew Heon 8381f3feee Add a shutdown handler package
We need a unified package for handling signals that shut down
Libpod and Podman. We need to be able to do different things on
receiving such a signal (`system service` wants to shut down the
service gracefully, while most other commands just want to exit)
and we need to be able to inhibit this shutdown signal while we
are waiting for some critical operations (e.g. creating a
container) to finish. This takes the first step by defining the
package that will handle this.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-10-12 14:32:27 -04:00
Ed Santiago 7c351fbfe2 System tests: run with local podman, not remote
Initially filed as #7967 but that has run into huge complicated
snags related to Ubuntu and environment.

It is crucial to get system tests working with podman-local.
It is less important to get them on Ubuntu. Let's please
expedite this PR while we settle the Ubuntu stuff in #7967

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-10-12 11:08:25 -06:00
OpenShift Merge Robot 5801a30487
Merge pull request #7994 from edsantiago/fix_apiv2_tests
APIv2 tests: get them passing again
2020-10-12 12:54:14 -04:00
OpenShift Merge Robot 609f230ad7
Merge pull request #7853 from xordspar0/play-kube-limits-#7742
Add support for resource limits to play kube
2020-10-12 12:47:24 -04:00
OpenShift Merge Robot ce7478b15c
Merge pull request #7588 from HarryMichal/add-toolbox-e2e-tests
tests/e2e: Add Toolbox-specific test cases
2020-10-12 11:31:59 -04:00
Matthew Heon c0e0a42d13 Remove a note that the HTTP API is not yet stable.
It's been out for quite a while now, I think we can safely call
it stable.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-10-12 11:14:05 -04:00
OpenShift Merge Robot e8f48a11b6
Merge pull request #7983 from mheon/inspect_network_not_running
Include CNI networks in inspect output when not running
2020-10-12 11:08:22 -04:00
Ed Santiago b2e6e4829f APIv2 tests: get them passing again
In the new-Cirrus transition, APIv2 tests were inadvertently
disabled. As expected when tests get disabled, they break.

This commit fixes some failing tests, and comments out others
(with big FIXMEs) because I have neither the expertise nor
time to figure out the real problems.

The big change to test-apiv2 is due to a recently-added
test that looks for an '=' sign in json output. My '=' vs '~'
detector completely barfed on that, and there's just no
way to make it work in a bash 'case' statement. So, switch
to an 'if' with 'expr'.

And, unrelated, fix a longstanding (harmless) bug that was
issuing spurious "expected" messages to the test log; those
should've been going to the full results log.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-10-12 08:45:39 -06:00
Jordan Christiansen a413d4d77f Add support for resource limits to play kube
Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
2020-10-12 08:38:37 -05:00
OpenShift Merge Robot 212011f166
Merge pull request #7836 from QiWang19/search-tags
Search repository tags using --list-tags
2020-10-12 07:01:10 -04:00
OpenShift Merge Robot dce30de594
Merge pull request #7980 from 3sky/compatibility-api-timestamp
Resolve #7860 - add time.RFC3339 format
2020-10-12 06:53:40 -04:00
OpenShift Merge Robot 717177a8df
Merge pull request #7984 from nalind/seccomp-error-message
pkg/spec: fix a confusing error message
2020-10-12 06:50:01 -04:00
OpenShift Merge Robot 04674298bd
Merge pull request #7949 from edsantiago/bats
system tests: cleanup, and add more tests
2020-10-12 06:13:14 -04:00
3sky 1fc64c8a5a Resolve #7860 - add time.RFC3339Nano into ContainerJSONBase
Signed-off-by: 3sky <3sky@protonmail.com>
2020-10-12 08:51:47 +02:00
OpenShift Merge Robot 7876dd5113
Merge pull request #7690 from Edward5hen/apiv2_images_more
Add more APIv2 tests for images.
2020-10-10 07:07:31 -04:00
OpenShift Merge Robot 6f5867bc44
Merge pull request #7977 from stefanrua/fix-doc-link-and-typo
[CI:DOCS] Fix documentation link and typo
2020-10-10 06:53:53 -04:00
OpenShift Merge Robot 36d5ab5115
Merge pull request #7986 from jwhonce/issues/7946
Monitor for client closing stream
2020-10-10 06:50:21 -04:00
Edward Shen eb11e12f35 Add more APIv2 tests for images: push, tag, untag, rmi and image tree.
Signed-off-by: Edward Shen <weshen@redhat.com>
2020-10-09 22:19:04 -04:00
Matthew Heon 77033c4aed Include CNI networks in inspect output when not running
We were only including the CNI Network fields in the output of
`podman inspect` when the container was not running. It's simple
enough to fix (populate with empty structs, since we can't fill
anything without a CNI response to get IP address assigned, etc).

This is necessary for Docker compatibility.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-10-09 20:20:19 -04:00
Jhon Honce 0cdb10448a Monitor for client closing stream
Fixes #7946

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-10-09 15:39:29 -07:00
Nalin Dahyabhai b14bffd2aa pkg/spec: fix a confusing error message
When we try, but fail, to load the default seccomp profile, say that,
instead of suggesting that we tried to load a profile with no name.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2020-10-09 15:54:03 -04:00
OpenShift Merge Robot cec240375d
Merge pull request #7968 from xordspar0/oci-runtime-error
Print the correct underlying cause for OCI errors
2020-10-09 15:24:58 -04:00
OpenShift Merge Robot ffabd57d6d
Merge pull request #7975 from jwhonce/jira/run-898-4
Restore --format table...
2020-10-09 13:20:39 -04:00
Qi Wang 66798e993a Search repository tags using --list-tags
For fix of BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1684263
Add --list-tags to podman search to return a table the repository tags.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-10-09 11:49:46 -04:00
Jordan Christiansen c47a1b1e55 Fix the "err: cause" order of OCI runtime errors
Previously, the order of OCI error messages was reversed, so that the
type of error was listed as the cause. For example:

    Error: writing file `cpu.cfs_quota_us`: Invalid argument: OCI runtime error

This error message makes it seem like "OCI runtime error" is the
argument that was invalid. In fact, "OCI runtime error" is the error and
"writing file ..." is the cause. With this change, the above message
reads:

    Error: OCI runtime error: writing file `cpu.cfs_quota_us`: Invalid argument

Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
2020-10-09 10:36:21 -05:00
OpenShift Merge Robot 7348836958
Merge pull request #7973 from jwhonce/jira/run-898-3
Port V1 --format table to V2 podman
2020-10-09 10:58:48 -04:00
OpenShift Merge Robot fa01b838a6
Merge pull request #7891 from rhatdan/rm
This PR allows users to remove external containers directly
2020-10-09 10:55:15 -04:00
Ondřej Míchal a1e1a3af71 tests/e2e: Add Toolbox-specific test cases
In the past, Toolbox[0] has been affected by several of Podman's
bugs/changes of behaviour. This is one of the steps to assure that as
Podman progresses, Podman itself and subsequently Toolbox do not regress.
One of the other steps is including Toolbox's system tests in Podman's
gating systems (which and to what extent is yet to be decided on).

The tests are trying to stress parts of Podman that Toolbox needs for
its functionality: permission to handle some system files, correct
values/permissions/limits in certain parts, management of users and
groups, mounting of paths,.. The list is most likely longer and
therefore more commits will be needed to control every aspect of the
Toolbox/Podman relationship :).

Some test cases in test/e2e/toolbox_test.go rely on some tools being
present in the base image[1]. That is not the case with the common
ALPINE image or the basic Fedora image.

Some tests might be duplicates of already existing tests. I'm more in
favour of having those duplicates. Thanks to that it will be clear what
functionality/behaviour Toolbox requires.

[0] https://github.com/containers/toolbox
[1] https://github.com/containers/toolbox/#image-requirements

Signed-off-by: Ondřej Míchal <harrymichal@seznam.cz>
2020-10-09 16:32:47 +02:00
OpenShift Merge Robot 71d675a164
Merge pull request #7944 from cevich/new_get_ci_vm
Cirrus: Fix obtaining a CI VM
2020-10-09 06:14:17 -04:00
OpenShift Merge Robot 2694fb85f4
Merge pull request #7974 from andylibrian/kube-generate-support-resource-limits-7855
Add support for resource cpu limit to generate kube
2020-10-09 06:10:45 -04:00
OpenShift Merge Robot 4511053499
Merge pull request #7961 from alvistack/master-linux-amd64
Update nix pin with `make nixpkgs`
2020-10-09 06:06:42 -04:00
Daniel J Walsh fea78d5530
This PR allows users to remove external containers directly
Currenly if a user specifies the name or ID of an external storage
container, we report an error to them.

buildah from scratch
working-container-2
podman rm working-container-2
Error: no container with name or ID working-container-2 found: no such container

Since the user specified the correct name and the container is in storage we
force them to specify --storage to remove it. This is a bad experience for the
user.

This change will just remove the container from storage.  If the container
is known by libpod, it will remove the container from libpod as well.

The podman rm --storage option has been deprecated, and removed from docs.

Also cleaned documented options that are not available to podman-remote.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-09 06:06:08 -04:00
OpenShift Merge Robot 953e16f31a
Merge pull request #7910 from EduardoVega/7567-podman-configmaps
Enable k8s configmaps as flags for play kube
2020-10-09 06:01:50 -04:00
stefanrua b115e3efbe Fix documentation link and typo
Signed-off-by: Stefan Rua <stefan.rua@iki.fi>
2020-10-09 12:58:16 +03:00
OpenShift Merge Robot db684f970f
Merge pull request #7971 from rhatdan/blob
BlobInfoCacheDir is set incorrectly when copying images
2020-10-09 05:04:27 -04:00
Jhon Honce f128bff232 Restore --format table...
Following commands:
* systemd generate
* networks inspect
* pod stats
  * Fixed test where format was quoted and then quoted again
  * Fixed bug where output never printed '--' on missed reads
* pod ps

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-10-08 18:19:37 -07:00