Commit Graph

12597 Commits

Author SHA1 Message Date
OpenShift Merge Robot 4429c7c713
Merge pull request #11080 from edsantiago/bats
system tests: fix race in stop test
2021-07-30 06:08:15 -04:00
Ed Santiago d59391c047 system tests: fix race in stop test
In the unlock/timeout test, on slow systems, 'podman ps' could
catch the container before the just-backgrounded 'podman stop'
sends the signal. Wait for signal ack from container before
we inspect it.

Also: If I understand the test correctly, it wasn't actually
checking that 'ps' could grab the lock while the container
was exiting. Add a check.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-07-29 11:57:51 -06:00
OpenShift Merge Robot f17b810279
Merge pull request #11077 from flouthoc/healthcheck-nit
`ci-fix`: healthcheck tests should use `.Should()` instead of `.To()`.
2021-07-29 11:57:23 -04:00
flouthoc 2b5d9cd7d0 Fix: healthcheck tests use .Should() instead of .To()
Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2021-07-29 19:53:30 +05:30
OpenShift Merge Robot 9c4b7f9772
Merge pull request #9887 from edsantiago/test_buildah_bud_with_remote
buildah bud tests under podman-remote
2021-07-29 08:10:36 -04:00
Matej Vasek 872c442e67 Remove ReadHeaderTimeout
Effectively sets timeout to infinity.
This is needed in order to make `podman` work with `pack`.
The `pack` CLI is keeping one connection for prolonged time.
Closing the connection breaks `pack`'s functionality.

[NO TESTS NEEDED]

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-07-29 14:07:47 +02:00
OpenShift Merge Robot 0f42cce2f2
Merge pull request #11073 from giuseppe/fix-zombie-process-first-run
rootless: avoid zombie process on first launch
2021-07-29 07:06:12 -04:00
OpenShift Merge Robot 2041731ecf
Merge pull request #11043 from Kiritow/patch-1
[CI:DOCS] Fix: broken links in transfer doc
2021-07-29 06:57:15 -04:00
Giuseppe Scrivano 724d048234
rootless: avoid zombie process on first launch
avoid a zombie process if on the first launch Podman creates a long
living process, such as "podman system service -t 0".

The `r` variable was overriden thus causing the waitpid to fail and
not clean up the intermediate process.

Closes: https://github.com/containers/podman/issues/10575

[NO TESTS NEEDED]

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-07-29 11:07:17 +02:00
OpenShift Merge Robot 1ec1c85b5a
Merge pull request #11048 from cdoern/heatlhCheckCompat
Fixed Healthcheck formatting, string to []string
2021-07-29 04:13:38 -04:00
Giuseppe Scrivano 8ccf2539ed
test: move container process to a sub-cgroup
move the container to a sub-cgroup before creating a sibling
hierarchy.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-07-29 09:08:00 +02:00
Kirito 1d34a2c4c7
Update transfer.md
Fix broken `podman healthcheck` link

Signed-off-by: Kiritow <1362050620@qq.com>
2021-07-29 12:50:47 +08:00
Ed Santiago ec9dad7e4f buildah bud tests under podman-remote
New functionality -- mostly in the diffs we apply to
buildah's helpers.bash -- to enable running buildah-bud
tests under podman-remote. The gist of it is, we start
a 'podman system service' before each test, and clean
it up on test exit.

Design decision: the diff file for helpers.bash is no
longer trailing-whitespace-clean: that ended up producing
diffs that git wouldn't apply, because in some cases
the whitespace is actually important. In order to pass CI,
we need to exclude this file from some checks.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-07-28 14:14:42 -06:00
OpenShift Merge Robot f9395ddc5a
Merge pull request #11067 from vrothberg/fix-10154-2
remote build: fix streaming and error handling
2021-07-28 16:17:45 +02:00
cdoern a9f6592af6 Fixed Healthcheck formatting, string to []string
Compat healthcheck tests are of the format []string but podman's were of
the format string. Converted podman's to []string at the specgen level since it has the same effect
and removed the incorrect parsing of compat healthchecks.

fixes #10617

Signed-off-by: cdoern <cdoern@redhat.com>
2021-07-28 09:52:41 -04:00
OpenShift Merge Robot 1bf7a9ed9c
Merge pull request #11066 from infiniteregrets/cp-md
[CI:DOCS] Update podman-cp manpage
2021-07-28 15:50:45 +02:00
OpenShift Merge Robot 91b5472af4
Merge pull request #11065 from vrothberg/cp-cleanups
cp: consolidate and simplify
2021-07-28 15:07:27 +02:00
OpenShift Merge Robot 1176c41a60
Merge pull request #11056 from giuseppe/warning-root-no-shared
rootless: check that / is mounted as shared
2021-07-28 15:06:27 +02:00
OpenShift Merge Robot 6c5966cf3c
Merge pull request #10910 from adrianreber/2021-07-12-checkpoint-restore-into-pod
Add support for checkpoint/restore into and out of pods
2021-07-28 14:48:28 +02:00
Valentin Rothberg 4df6e31ccb remote build: fix streaming and error handling
Address a number of issues in the streaming logic in remote build, most
importantly an error in using buffered channels on the server side.

The pattern below does not guarantee that the channel is entirely read
before the context fires.

for {
	select {
		case <- bufferedChannel:
		...
		case <- ctx.Done():
		...
	}
}

Fixes: #10154
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-28 14:46:15 +02:00
Mehul Arora e3b0ba9283 [CI:DOCS] Update podman-cp manpage
Signed-off-by: Mehul Arora <aroram18@mcmaster.ca>
2021-07-28 17:05:06 +05:30
Valentin Rothberg 013267006c cp: consolidate and simplify
Consolidate and simplify code in `podman cp` a bit.  PR #11049
introduced some code duplicates that were worth tackling.

[NO TESTS NEEDED]

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-28 11:18:47 +02:00
Giuseppe Scrivano 67d439197e
rootless: check that / is mounted as shared
if the root mount '/' is not mounted as MS_SHARED, print a
warning, otherwise new mounts that are created in the host won't be
propagated to the rootless mount namespace.

Closes: https://github.com/containers/podman/issues/10946

[NO TESTS NEEDED]

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-07-28 11:04:36 +02:00
OpenShift Merge Robot a5de831418
Merge pull request #11049 from vrothberg/fix-7370
support container to container copy
2021-07-27 22:20:45 +02:00
OpenShift Merge Robot 22b3fe59e8
Merge pull request #11060 from containers/dependabot/go_modules/github.com/containers/storage-1.33.0
Bump github.com/containers/storage from 1.32.6 to 1.33.0
2021-07-27 22:17:45 +02:00
OpenShift Merge Robot a6a0f6c192
Merge pull request #11061 from giuseppe/migrate-no-move-to-cgroup
command: migrate doesn't move process to cgroup
2021-07-27 20:46:46 +02:00
Chris Evich 32b5892164
Multi-arch image build: Daily version-tag push
This mirrors changes from
https://github.com/containers/buildah/pull/3381

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-07-27 14:15:25 -04:00
Adrian Reber 60b9e8c0da
Added tests for out of and into pod checkpoint and restore support
Signed-off-by: Adrian Reber <areber@redhat.com>
2021-07-27 16:10:45 +02:00
Adrian Reber eb94467780
Support checkpoint/restore with pods
This adds support to checkpoint containers out of pods and restore
container into pods.

It is only possible to restore a container into a pod if it has been
checkpointed out of pod. It is also not possible to restore a non pod
container into a pod.

The main reason this does not work is the PID namespace. If a non pod
container is being restored in a pod with a shared PID namespace, at
least one process in the restored container uses PID 1 which is already
in use by the infrastructure container. If someone tries to restore
container from a pod with a shared PID namespace without a shared PID
namespace it will also fail because the resulting PID namespace will not
have a PID 1.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-07-27 16:10:44 +02:00
Adrian Reber 3375cbb198
Vendor in go-criu v5.1.0 for Pod checkpoint/restore support
Signed-off-by: Adrian Reber <areber@redhat.com>
2021-07-27 16:10:44 +02:00
Adrian Reber 92dce3e2fe
Prepare CRIU version check to work with multiple versions
The upcoming commit to support checkpointing out of Pods requires CRIU
3.16. This changes the CRIU version check to support checking for
different versions.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-07-27 16:10:44 +02:00
dependabot[bot] b090738328
Bump github.com/containers/storage from 1.32.6 to 1.33.0
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.32.6 to 1.33.0.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/main/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.32.6...v1.33.0)

---
updated-dependencies:
- dependency-name: github.com/containers/storage
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 13:46:11 +00:00
Valentin Rothberg 0aec93edca cp system tests: reduce number of exec's
Reduce the amount of `podman exec`s in the cp system tests.
Exec is expensive and a number of them could easily be combined
into the container command.

This cuts down the costs of running the tests by around 25 percent
on my local machine.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-27 15:32:23 +02:00
Mehul Arora 6fe03b25ab support container to container copy
Implement container to container copy.  Previously data could only be
copied from/to the host.

Fixes: #7370
Co-authored-by: Mehul Arora <aroram18@mcmaster.ca>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-27 15:32:23 +02:00
OpenShift Merge Robot b6c279be22
Merge pull request #11055 from vrothberg/fix-10701
exec: fix cleanup
2021-07-27 15:31:26 +02:00
OpenShift Merge Robot 27a487929e
Merge pull request #11028 from containers/dependabot/go_modules/github.com/containers/image/v5-5.14.0
Bump github.com/containers/image/v5 from 5.13.2 to 5.14.0
2021-07-27 15:26:24 +02:00
OpenShift Merge Robot 508dc031c6
Merge pull request #10861 from jmguzik/until-prune-volume-cmd
Add prune until filter test for podman volume cli
2021-07-27 14:50:24 +02:00
Giuseppe Scrivano 63ef5576ed
command: migrate doesn't move process to cgroup
add a new annotation for the "system migrate" command to not move the
pause process to a separate cgroup.

The operation is not needed since "system migrate" destroys the pause
process, so there won't be any process left to move to a cgroup.

[NO TESTS NEEDED]

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-07-27 14:26:23 +02:00
Giuseppe Scrivano a0313ef92b
rootless: do not overwrite err variable
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-07-27 14:26:22 +02:00
OpenShift Merge Robot 684f15edee
Merge pull request #11025 from rhatdan/dockerfile
[CI:DOCS] Fix handling of shadow-utils
2021-07-27 13:58:22 +02:00
Valentin Rothberg 7689783ae5 exec: fix cleanup
Commit 341e6a1 made sure that all exec sessions are getting cleaned up.
But it also came with a peformance penalty.  Fix that penalty by
spawning the cleanup process to really only cleanup the exec session
without attempting to remove the container.

[NO TESTS NEEDED] since we have no means to test such performance
issues in CI.

Fixes: #10701
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-27 12:00:15 +02:00
OpenShift Merge Robot d7b2f03f8a
Merge pull request #10983 from vrothberg/fix-dangling
refine dangling checks
2021-07-27 10:57:21 +02:00
Thomas Weber cdbbd79155 stats: add a interval parameter to cli and api stream mode
podman stats polled by default in a 1 sec period.
This can put quite some load on a machine if you run many containers.

The default value is now 5 seconds.
You can change this interval with a new, optional, --interval, -i cli flag.
The api request got also a interval query parameter for the same purpose.

Additionally a unused const was removed.
Api and cli will fail the request if a 0 or negative value is passed in.

Signed-off-by: Thomas Weber <towe75@googlemail.com>
2021-07-27 07:20:47 +02:00
cdoern fd1f57b3a6 Fixed Healthcheck formatting, string to []string
Compat healthcheck tests are of the format []string but podman's were of
the format string. Converted podman's to []string at the specgen level since it has the same effect
and removed the incorrect parsing of compat healthchecks.

fixes #10617

Signed-off-by: cdoern <cdoern@redhat.com>
2021-07-26 16:58:38 -04:00
Jakub Guzik 7fa4d2cb18 Add prune until filter test for podman volume cli
This commit follows work started in #10756. Changes made in #11015
enabled cli support for volume prune --filter until. Adding e2e test
closes #10579.

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-07-26 22:37:45 +02:00
OpenShift Merge Robot 4f5b19c508
Merge pull request #11047 from Luap99/fix-11032
dual-stack network: fix duplicated subnet assignment
2021-07-26 16:09:21 +02:00
OpenShift Merge Robot 89853a30eb
Merge pull request #11036 from caarlos0/fix-podman-manifest-push
fix: podman manifest push respect --tls-verify flag
2021-07-26 16:01:21 +02:00
Paul Holzinger 8d5d5face5
dual-stack network: fix duplicated subnet assignment
Make sure podman network create reads all subnets from existing cni configs
and not only the first one.

Fixes #11032

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-07-26 14:05:33 +02:00
Carlos Alexandro Becker 5473490c6e fix: podman manifest push respect --tls-verify flag
[NO TESTS NEEDED]

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-07-26 08:56:30 -03:00
OpenShift Merge Robot 5ef78c0bfa
Merge pull request #11019 from boaz0/test_cors
Add tests to verify CORs is enabled
2021-07-26 13:56:19 +02:00