Commit graph

13239 commits

Author SHA1 Message Date
Adrian Reber dcbf5cae12
Set Checkpointed state to false after restore
A restored container still had the state set to 'Checkpointed: true'
which seems wrong if it running again.

[NO NEW TESTS NEEDED]

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-10-27 13:40:54 +00:00
OpenShift Merge Robot 979b631228
Merge pull request #11956 from vrothberg/pause
remove need to download pause image
2021-10-27 10:22:56 +00:00
OpenShift Merge Robot 9fbf2a40f1
Merge pull request #12107 from giuseppe/fix-dbus-process-leak
cgroups: use SessionBusPrivateNoAutoStartup
2021-10-27 07:11:55 +00:00
OpenShift Merge Robot ed3aa2acaf
Merge pull request #12098 from Luap99/slirp-dad
Slirp4netns with ipv6 set net.ipv6.conf.default.accept_dad=0
2021-10-26 20:54:27 +00:00
OpenShift Merge Robot 1243954372
Merge pull request #12067 from hshiina/logs-journal-tail
Fix a few problems in 'podman logs --tail' with journald driver
2021-10-26 20:33:26 +00:00
Giuseppe Scrivano 55397de935
cgroups: use SessionBusPrivateNoAutoStartup
do not start up a dbus daemon if it is not already running.

[NO NEW TESTS NEEDED] the fix is in a dependency.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-10-26 21:05:45 +02:00
Giuseppe Scrivano 8163d38c60
vendor: update godbus to v5.0.6
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-10-26 21:05:22 +02:00
OpenShift Merge Robot 22e5dc19b0
Merge pull request #12092 from rhatdan/build
If Dockerfile exists in same directory as service, we should not use it.
2021-10-26 18:33:53 +00:00
OpenShift Merge Robot 420ac5d13d
Merge pull request #12088 from adrianreber/2021-10-25-fix-label-ipc-host
Allow 'container restore' with '--ipc host'
2021-10-26 16:38:54 +00:00
OpenShift Merge Robot b7639ab503
Merge pull request #12096 from containers/dependabot/go_modules/github.com/docker/docker-20.10.10incompatible
Bump github.com/docker/docker from 20.10.9+incompatible to 20.10.10+incompatible
2021-10-26 16:36:53 +00:00
Paul Holzinger 008075ce54
Slirp4netns with ipv6 set net.ipv6.conf.default.accept_dad=0
Duplicate Address Detection slows the ipv6 setup down for 1-2 seconds.
Since slirp4netns is run it is own namespace and not directly routed
we can skip this to make the ipv6 address immediately available.
We change the default to make sure the slirp tap interface gets the
correct value assigned so DAD is disabled for it.
Also make sure to change this value back to the original after slirp4netns
is ready in case users rely on this sysctl.

Fixes #11062

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-10-26 18:27:30 +02:00
Hironori Shiina c723e6b978 Fix a few problems in 'podman logs --tail' with journald driver
The following problems regarding `logs --tail` with the journald log
driver are fixed:
- One more line than a specified value is displayed.
- '--tail 0' displays all lines while the other log drivers displays
  nothing.
- Partial lines are not considered.
- If the journald events backend is used and a container has exited,
  nothing is displayed.

Integration tests that should have detected the bugs are also fixed. The
tests are executed with json-file log driver three times without this
fix.

Signed-off-by: Hironori Shiina <shiina.hironori@jp.fujitsu.com>
2021-10-26 12:18:57 -04:00
OpenShift Merge Robot 31548609f5
Merge pull request #12099 from Luap99/cni-k8s-env
[CI:DOCS] Document to not set K8S envars for CNI
2021-10-26 15:38:27 +00:00
Adrian Reber bf8fd943ef
Allow 'container restore' with '--ipc host'
Trying to restore a container that was started with '--ipc host' fails
with:

Error: error creating container storage: ProcessLabel and Mountlabel must either not be specified or both specified

We already fixed this exact same error message for containers started
with '--privileged'. The previous fix was to check if the to be restored
container is a privileged container (c.config.Privileged). Unfortunately
this does not work for containers started with '--ipc host'.

This commit changes the check for a privileged container to check if
both the ProcessLabel and the MountLabel is actually set and only then
re-uses those labels.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-10-26 14:42:32 +00:00
Paul Holzinger efd1c080bf
Document to not set K8S envars for CNI
Setting these environment variables can cause issues with custom CNI
plugins, see #12083.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-10-26 16:11:46 +02:00
dependabot[bot] 773caf293a
Bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.9+incompatible to 20.10.10+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Changelog](https://github.com/moby/moby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/docker/docker/compare/v20.10.9...v20.10.10)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-26 12:26:52 +00:00
Valentin Rothberg 75f478c08b pod create: remove need for pause image
So far, the infra containers of pods required pulling down an image
rendering pods not usable in disconnected environments.  Instead, build
an image locally which uses local pause binary.

Fixes: #10354
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-10-26 13:51:45 +02:00
Valentin Rothberg 9d2b8d2791 add kubernetes pause
Add the k8s pause binary to `pause/pause.c` and do the plumbing in the
Makefile to install it in $libexec/podman/pause/pause.  It is intended to
replace the k8s pause image and hence the need for network connectivity
when creating pods.

[NO NEW TESTS NEEDED] since it will be tested in a following commit.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-10-26 13:51:45 +02:00
Valentin Rothberg e86549b18d cirrus: containers: mount directory in /var/tmp to /tmp
Mount a directory from /var/tmp to /tmp to make sure that /tmp is not on
an overlay mount.  This should make overlay mounts possible in the
containerized tests which we're currently skipping.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-10-26 13:51:45 +02:00
Valentin Rothberg 2e3611d61f overlay root fs: create mount on runtime dir
Make sure to create the mounts for containers with an overlay root FS in
the runtime dir (e.g., /run/user/1000/...) to guarantee that we can
actually overlay mount on the specific path which is not the case for
the graph root.

[NO NEW TESTS NEEDED] since it is not a user-facing change.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-10-26 13:51:45 +02:00
OpenShift Merge Robot 4d75df8be3
Merge pull request #12086 from rhatdan/log
Add support to play kube for --log-opt
2021-10-26 10:53:26 +00:00
OpenShift Merge Robot f82f93c9bd
Merge pull request #12084 from rhatdan/VENDOR
Update vendor github.com/opencontainers/runtime-tools
2021-10-26 07:58:25 +00:00
Daniel J Walsh a42c131c80
Update vendor github.com/opencontainers/runtime-tools
This will change mount of /dev within container to noexec, making
containers slightly more secure.

[NO NEW TESTS NEEDED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-10-25 16:50:45 -04:00
Daniel J Walsh d6296c918d
If Dockerfile exists in same directory as service, we should not use it.
We should only use the Containerfiles/Dockerfiles found in the context
directory.

Fixes: https://github.com/containers/podman/issues/12054

[NO NEW TESTS NEEDED] It is difficult to setup a test for this in the
CI/CD system, but build tests should find if this PR broke anything.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-10-25 16:33:13 -04:00
Daniel J Walsh acd8b49000
Add support to play kube for --log-opt
Fixes: https://github.com/containers/podman/issues/11727

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-10-25 11:40:42 -04:00
OpenShift Merge Robot dbe770e3ce
Merge pull request #12079 from stweil/lgtm
[NO NEW TESTS NEEDED] Fix off-by-one index comparision (reported by LGTM)
2021-10-25 10:58:50 +00:00
OpenShift Merge Robot 6618d574b9
Merge pull request #12078 from stweil/typos
[CI:DOCS Fix some typos in documentation and comments (found by codespell)
2021-10-25 09:04:50 +00:00
Stefan Weil d7662edf66 [NO NEW TESTS NEEDED] Fix off-by-one index comparision (reported by LGTM)
LGTM alert:

    Off-by-one index comparison against length may lead to out-of-bounds read.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-25 10:52:01 +02:00
Stefan Weil 24c83980e5 Fix some typos in documentation and comments (found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-25 07:41:14 +02:00
OpenShift Merge Robot 283ce3de6c
Merge pull request #12071 from eriksjolund/fix_typo_keep_id
[CI:DOCS] Fix typo keep_id -> keep-id
2021-10-24 22:08:47 +00:00
OpenShift Merge Robot c233d7bf58
Merge pull request #12077 from stweil/main
[CI:DOCS] Replace 'an user' => 'a user'
2021-10-24 22:07:48 +00:00
Stefan Weil 22270fb845 Replace 'an user' => 'a user'
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-24 22:27:39 +02:00
Erik Sjölund 936ab158c6
[CI:DOCS] Fix typo keep_id -> keep-id
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2021-10-24 09:54:23 +03:00
OpenShift Merge Robot 54c630aa0a
Merge pull request #12061 from dancerj/typo
[CI:DOCS] fuse-overlay probably means fuse-overlayfs.
2021-10-22 14:28:45 +00:00
OpenShift Merge Robot 5dd211f91b
Merge pull request #11991 from rhatdan/size
Allow API to specify size and inode quota
2021-10-22 14:18:45 +00:00
OpenShift Merge Robot 833d92d709
Merge pull request #12021 from rhatdan/kube
Generate Kube should not print default structs
2021-10-22 14:12:44 +00:00
Junichi Uekawa ce4ed7d133 fuse-overlay probably means fuse-overlayfs.
fuse-overlayfs is usually the package name.

Signed-off-by: Junichi Uekawa <dancer@debian.org>
2021-10-22 13:41:58 +09:00
OpenShift Merge Robot 9e453e242e
Merge pull request #12048 from rhatdan/man
Remove --kernel-memory options
2021-10-22 00:26:39 +00:00
OpenShift Merge Robot c09fab59dd
Merge pull request #12047 from mheon/remove_infra_from_db
[NO NEW TESTS NEEDED] Remove infra ID from DB before removing containers
2021-10-21 17:58:41 +00:00
Daniel J Walsh 8e3760c29f
Remove --kernel-memory options
Kernel memory option has been depracated in runtime-spec,  It is
believed that it will not work properly on certain kernels.  runc
ignores it.

This PR removes documentation of the flag and also prints a warning if
a user uses it.

[NO NEW TESTS NEEDED]

Helps Fix: https://github.com/containers/podman/issues/12045

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-10-21 13:29:44 -04:00
OpenShift Merge Robot 54f2c9a540
Merge pull request #12057 from flouthoc/allow-tagging-manifest-list
tag: Support tagging manifest list instead of resolving to images
2021-10-21 13:45:28 +00:00
OpenShift Merge Robot 6338e74cc9
Merge pull request #12028 from edsantiago/test_system_connection
Add test for system connection
2021-10-21 13:44:28 +00:00
Aditya Rajan f4f96962c0
tag: Support tagging manifest list instead of resolving to images
Following commit makes sure when buildah tag is invoked on a manifest
list, it tags the same manifest list instead of resolving to an image and
tagging it.

Port of: https://github.com/containers/buildah/pull/3483

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-10-21 17:44:31 +05:30
OpenShift Merge Robot 4268a4afee
Merge pull request #12049 from edsantiago/test_dash_a_with_l
System tests: confirm that -a and -l clash
2021-10-20 19:14:08 +00:00
Matthew Heon 30245f5849 Remove infra ID from DB before removing containers
If we interrupt pod removal between removing containers and
removing the whole pod, the infra ID was still in the DB, and
most pod operations would try to retrieve the infra container
(and would this fail). Clear the infra ID from the DB just before
we remove all containers to prevent this.

Fixes #12034

[NO NEW TESTS NEEDED] This is a very narrow race and I have no
idea how to repro it.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-10-20 14:56:22 -04:00
Ed Santiago 70a5d8cd1d System tests: confirm that -a and -l clash
...and fix one instance where there was no check

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-10-20 11:09:32 -06:00
OpenShift Merge Robot eba281c3e0
Merge pull request #11851 from cdoern/podRm
Pod Rm Infra Handling Improvements
2021-10-20 13:20:12 +00:00
OpenShift Merge Robot 97f051f657
Merge pull request #12017 from nalind/exponential
Use exponential backoff when waiting for a journal entry
2021-10-20 12:49:10 +00:00
OpenShift Merge Robot a3dba7fdfb
Merge pull request #12032 from eastonman/eastonman-systemd-patch-1
[CI:DOCS] Change systemd service file to be compatible with rootless mode
2021-10-20 09:24:10 +00:00
OpenShift Merge Robot 2c6c801067
Merge pull request #12041 from edsantiago/container_env
system tests: CONTAINER_* and --help: cleanup
2021-10-20 08:40:10 +00:00