8426 Commits

Author SHA1 Message Date
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
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
a338cd4e8a Update comment related to seccomp profiles in play kube
Signed-off-by: Aditya Kamath <theunrealgeek@gmail.com>
2020-06-03 12:57:08 -07: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