8188 Commits

Author SHA1 Message Date
15f273b931 WIP: Enable (and disable) remote testing
podman-remote has not been tested. A principal part of the
problem was #5387 - the YAML I wrote did not have the
intended effect, it did not set TEST_REMOTE_CLIENT=true
and because of my multiple iterations I did not catch this
during testing.

Part 1 of this PR is to fix .cirrus.yml to enable remote tests.

Part 2 -- what I had first noticed and tried to fix -- is that
rootless_test.sh was never running remote because, of course,
envariables are not sent via ssh. I reworked integration_test.sh
and rootless_test.sh to use a command-line decision instead.

Part 3, sigh, is to disable one failing integration test
and *all* system tests, because so many of the latter are
failing. Addressing those failures needs to be done in
subsequent PRs. Issues #6538, #6539, #6540 are filed for
some of the problems I isolated. There will be more.

Also, minor, fixed some stale references to varlink.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-06-09 12:43:58 -06:00
817dbdfdf8 Ensure signal validation happens first in pod kill
This fixes an error in the system tests, which expect that when
you try and kill a nonexistent pod with an incorrect signal, you
receive an error about the signal, not the pod.

At the same time, fix a missing return statement in the bindings,
which could also have caused us grief.

Fixes #6540

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-06-09 14:10:10 -04:00
3218736cff fix api fails with 'strconv.ParseUint: parsing "tcp": invalid syntax'
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
2020-06-10 00:03:04 +08:00
fbe09d78e9 Merge pull request #6533 from containers/dependabot/go_modules/github.com/json-iterator/go-1.1.10
Bump github.com/json-iterator/go from 1.1.9 to 1.1.10
2020-06-09 17:47:47 +02:00
607cfa3ffb Merge pull request #6534 from containers/dependabot/go_modules/github.com/containers/common-0.13.0
Bump github.com/containers/common from 0.12.0 to 0.13.0
2020-06-09 17:44:52 +02:00
c831ae110e Merge pull request #6521 from cevich/update_cors_docs
[CI:DOCS] Improve swagger+CORS metadata docs
2020-06-09 16:43:32 +02:00
a2e0e170f9 Merge pull request #6532 from sujil02/python-test
Modify py test to start stop system service for each test
2020-06-09 16:27:24 +02:00
2df9edbd4f Bump github.com/json-iterator/go from 1.1.9 to 1.1.10
Bumps [github.com/json-iterator/go](https://github.com/json-iterator/go) from 1.1.9 to 1.1.10.
- [Release notes](https://github.com/json-iterator/go/releases)
- [Commits](https://github.com/json-iterator/go/compare/v1.1.9...v1.1.10)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-06-09 10:24:03 -04:00
01c45698ca Bump github.com/containers/common from 0.12.0 to 0.13.0
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.12.0 to 0.13.0.
- [Release notes](https://github.com/containers/common/releases)
- [Commits](https://github.com/containers/common/compare/v0.12.0...v0.13.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-06-09 10:23:06 -04:00
4314336ce3 Improve swagger+CORS metadata docs
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-06-09 09:53:19 -04:00
79f30af384 Merge pull request #6520 from mheon/no_conmon_no_error
Ensure Conmon is alive before waiting for exit file
2020-06-09 10:09:14 +02:00
a85e979529 Merge pull request #6513 from containers/dependabot/go_modules/github.com/stretchr/testify-1.6.1
Bump github.com/stretchr/testify from 1.6.0 to 1.6.1
2020-06-08 23:27:47 +02:00
9d964ffb9f Ensure Conmon is alive before waiting for exit file
This came out of a conversation with Valentin about
systemd-managed Podman. He discovered that unit files did not
properly handle cases where Conmon was dead - the ExecStopPost
`podman rm --force` line was not actually removing the container,
but interestingly, adding a `podman cleanup --rm` line would
remove it. Both of these commands do the same thing (minus the
`podman cleanup --rm` command not force-removing running
containers).

Without a running Conmon instance, the container process is still
running (assuming you killed Conmon with SIGKILL and it had no
chance to kill the container it managed), but you can still kill
the container itself with `podman stop` - Conmon is not involved,
only the OCI Runtime. (`podman rm --force` and `podman stop` use
the same code to kill the container). The problem comes when we
want to get the container's exit code - we expect Conmon to make
us an exit file, which it's obviously not going to do, being
dead. The first `podman rm` would fail because of this, but
importantly, it would (after failing to retrieve the exit code
correctly) set container status to Exited, so that the second
`podman cleanup` process would succeed.

To make sure the first `podman rm --force` succeeds, we need to
catch the case where Conmon is already dead, and instead of
waiting for an exit file that will never come, immediately set
the Stopped state and remove an error that can be caught and
handled.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-06-08 13:48:29 -04:00
edf733c3b6 Bump github.com/stretchr/testify from 1.6.0 to 1.6.1
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.6.0...v1.6.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-06-08 13:17:19 -04:00
b8acc851bb Merge pull request #6515 from vrothberg/v2-enable-ubuntu
V2 enable ubuntu
2020-06-08 12:36:06 -04:00
a5facca78f e2e: disable checkpoint test on Ubuntu
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-06-08 16:51:32 +02:00
b6148b6576 force bats version to v1.1.0
We experienced regression when using the latest `v1.2.0-dev` bats in
Ubuntu 20.04 (see github.com/containers/libpod/pull/6418).  Using
bats v1.1.0 worked in the Ubuntu test VM.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-06-08 15:21:34 +02:00
efd1422143 Enable Ubuntu tests in CI
Add updates required for ubuntu and run integration tests

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-06-08 12:21:16 +02:00
2869cce1d5 Merge pull request #6505 from mheon/parallel_stop
Add parallel operation to `podman stop`
2020-06-08 03:56:11 -04:00
37428df4c2 Modify py test to start stop system service for each test
Start stop system service for each test class to make it east to integrate to CI
Adds more tests
Add some common methods shared between images and containers test.

Signed-off-by: Sujil02 <sushah@redhat.com>
2020-06-07 22:27:01 -04:00
1fcb6788a5 Merge pull request #6417 from sujil02/py-test
Adds docker py regression test.
2020-06-06 05:40:03 -04:00
1cc9731dfa Add parallel operation to podman stop
This is the other command that benefits greatly from being run in
parallel, due to the potential 15-second timeout for containers
that ignore SIGTERM.

While we're at it, also clean up how stop timeout is set. This
needs to be an optional parameter, so that the value set when the
container is created with `--stop-timeout` will be respected.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-06-05 16:18:53 -04:00
723e823439 Merge pull request #6504 from rhatdan/systemd
Fix handling of systemd.
2020-06-05 14:03:20 -04:00
c8f57b71a4 Fix handling of systemd.
Systemd enablement has to happen on the server side, since we need
check if the image is running systemd.

Also need to make sure user setting the StopSignal is not overriden on the
server side. But if not set and using systemd, we set it correctly.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-06-05 13:01:57 -04:00
162c1d812b Fix play kube report printing when no containers are created
Signed-off-by: Aditya Kamath <theunrealgeek@gmail.com>
2020-06-05 09:58:10 -07:00
c448c03269 Merge pull request #6495 from mheon/parallel_execution
Add parallel execution code for container operations
2020-06-05 12:27:25 -04:00
89a1e7db39 Add parallel execution code for container operations
This code will run container operations in parallel, up to a
given maximum number of threads. Currently, it has only been
enabled for local `podman rm` as a proof of concept.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-06-05 11:31:05 -04:00
c6da1a86ce Merge pull request #6500 from containers/dependabot/go_modules/github.com/seccomp/containers-golang-0.5.0
Bump github.com/seccomp/containers-golang from 0.4.1 to 0.5.0
2020-06-05 11:23:31 -04:00
f2432335ef Merge pull request #6498 from mheon/fix_pod_hostname
Ensure that containers in pods properly set hostname
2020-06-05 09:41:26 -04:00
2f2ffd8678 Merge pull request #6501 from rhatdan/iops
Fix handling of ThrottleWriteIOPSDevice
2020-06-05 09:23:50 -04:00
10ace87ca9 Fix handling of ThrottleWriteIOPSDevice
This is causing the UBuntu tests to fail.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-06-05 08:11:37 -04:00
1093b78833 Bump github.com/seccomp/containers-golang from 0.4.1 to 0.5.0
Bumps [github.com/seccomp/containers-golang](https://github.com/seccomp/containers-golang) from 0.4.1 to 0.5.0.
- [Release notes](https://github.com/seccomp/containers-golang/releases)
- [Commits](https://github.com/seccomp/containers-golang/compare/v0.4.1...v0.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-06-05 06:23:08 -04:00
62b7a770e8 Fix missing doc for field in PlayKubePod
Signed-off-by: Aditya Kamath <theunrealgeek@gmail.com>
2020-06-04 18:39:37 -07:00
9be0d759b8 Strip defaults from namespace flags
We were picking up defaults from the client's containers.conf,
which broke pod namespaces. The server-side code already checks
containers.conf when not explicitly overridden by the user, or by
the container being part of a pod (the last bit being our bug).

This only manifested on systems with a containers.conf installed,
so RHEL 8 and Fedora 32 (which means our F32 CI VMs likely should
have caught it, but didn't, which is concerning).

This prevents defaults for these flags being shown, but they were
incorrect anyways for `podman-remote`, so I'm not terribly
concerned.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-06-04 17:43:08 -04:00
644a7b78ff Ensure that containers in pods properly set hostname
When we moved to the new Namespace types in Specgen, we made a
distinction between taking a namespace from a pod, and taking it
from another container. Due to this new distinction, some code
that previously worked for both `--pod=$ID` and
`--uts=container:$ID` has accidentally become conditional on only
the latter case. This happened for Hostname - we weren't properly
setting it in cases where the container joined a pod.
Fortunately, this is an easy fix once we know to check the
condition.

Also, ensure that `podman pod inspect` actually prints hostname.

Fixes #6494

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-06-04 16:32:10 -04:00
359d67a687 Adds docker py regression test.
Adds test to validate podman image endpoints.
Adds readme on how to run python tests
Adds contants file.

Signed-off-by: Sujil02 <sushah@redhat.com>
2020-06-04 16:04:34 -04:00
b0578963aa Merge pull request #6338 from rhatdan/build3
Attempt to turn on special_testing_in_podman tests
2020-06-04 20:02:43 +02:00
6cc323cb78 Merge pull request #6374 from rhatdan/build1
Turn on the podman-commands script to verify man pages
2020-06-04 19:54:34 +02:00
5d69bd88e7 Turn on the podman-commands script to verify man pages
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-06-04 13:02:25 -04:00
77b8187ea0 Attempt to turn on special_testing_in_podman tests
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-06-04 10:58:37 -04:00
bf8337b3fc Merge pull request #6492 from mheon/bump-2.0.0-rc4
[CI:DOCS] Bump to v2.0.0-RC4
2020-06-04 16:55:53 +02:00
49517a1e7d Bump to v2.0.0-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-06-04 10:40:11 -04:00
13becdc81f Bump to v2.0.0-rc4
Signed-off-by: Matthew Heon <mheon@redhat.com>
v2.0.0-rc4
2020-06-04 10:40:08 -04:00
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