11958 Commits

Author SHA1 Message Date
8aeff59478 Merge pull request #14371 from cevich/disable_static_v3.2
[v3.2] Cirrus: Disable CI on unmaintained branch
2022-05-26 10:48:54 -04:00
a41f5110dd Cirrus: Disable CI on unmaintained branch
This release branch is no-longer maintained, disable the non-functional
CI to limit surprises.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-05-25 15:56:08 -04:00
5ef6c011fc Merge pull request #11033 from kolyshkin/3.2-default-errno-ret
[3.2] seccomp: propagate defaultErrnoRet
2021-07-26 12:47:21 +02:00
a1e1edb9b6 seccomp: propagate defaultErrnoRet
This fixes the issue of not propagating defaultErrnoRet from
system's seccomp.json to container's config.json, which can
result in redundant seccomp rules and inability to start a container
when using some runtimes (notably runc up to and including 1.0.1).

The fix is to vendor in containers/common with the fixed pkg/seccomp
which no longer ignores defaultErrnoRet.

Brought to you by:
  go get github.com/containers/common@v0.38.18

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-07-25 03:52:17 -07:00
09e8afe3a9 Merge pull request #10967 from ashley-cui/release_323
[CI:DOCS] Bump to v3.2.3
2021-07-16 15:18:45 -04:00
49a112d2c8 Bump to 3.2.4-dev
Signed-off-by: Ashley Cui <acui@redhat.com>
2021-07-16 14:46:12 -04:00
1e6fd46e91 Bump to v3.2.3
Signed-off-by: Ashley Cui <acui@redhat.com>
v3.2.3
2021-07-16 14:40:40 -04:00
bfb50c0c85 Merge pull request #10966 from mheon/release_notes_323
[CI:DOCS] Release notes for v3.2.3
2021-07-16 14:11:45 -04:00
1d7ddf5118 Update release notes for v3.2.3
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-07-16 13:55:13 -04:00
32c52d5234 Merge pull request #10964 from vrothberg/3.2-backports
[v3.2] vendor containers/common@v0.38.16
2021-07-16 13:15:44 -04:00
e4c45e7595 vendor containers/common@v0.38.16
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-16 17:29:41 +02:00
1b6da0eacb Merge pull request #10957 from vrothberg/3.2-backports
[3.2] vendor containers/buildah@v1.21.3
2021-07-16 07:32:42 -04:00
cb70162249 vendor containers/buildah@v1.21.3
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-16 11:26:37 +02:00
2eea7fefb4 Merge pull request #10945 from Luap99/rootless-cni-v3.2
[v3.2] Backport rootless cni fixes
2021-07-15 15:20:08 -04:00
1a8b2a037f Fix race conditions in rootless cni setup
There was an race condition when calling `GetRootlessCNINetNs()`. It
created the rootless cni directory before it got locked. Therefore
another process could have called cleanup and removed this directory
before it was used resulting in errors. The lockfile got moved into the
XDG_RUNTIME_DIR directory to prevent a panic when the parent dir was
removed by cleanup.

Fixes #10930
Fixes #10922

To make this even more robust `GetRootlessCNINetNs()` will now return
locked. This guarantees that we can run `Do()` after `GetRootlessCNINetNs()`
before another process could have called `Cleanup()` in between.

[NO TESTS NEEDED] CI is flaking, hopefully this will fix it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-07-15 18:21:01 +02:00
e54a513b96 CNI-in-slirp4netns: fix bind-mount for /run/systemd/resolve/stub-resolv.conf
Fix issue 10929 : `[Regression in 3.2.0] CNI-in-slirp4netns DNS gets broken when running a rootful container after running a rootless container`

When /etc/resolv.conf on the host is a symlink to /run/systemd/resolve/stub-resolv.conf,
we have to mount an empty filesystem on /run/systemd/resolve in the child namespace,
so as to isolate the directory from the host mount namespace.

Otherwise our bind-mount for /run/systemd/resolve/stub-resolv.conf is unmounted
when systemd-resolved unlinks and recreates /run/systemd/resolve/stub-resolv.conf on the host.

[NO TESTS NEEDED]

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-07-15 18:18:38 +02:00
1469af265a Make rootless-cni setup more robust
The rootless cni namespace needs a valid /etc/resolv.conf file. On some
distros is a symlink to somewhere under /run. Because the kernel will
follow the symlink before mounting, it is not possible to mount a file
at exactly /etc/resolv.conf. We have to ensure that the link target will
be available in the rootless cni mount ns.

Fixes #10855

Also fixed a bug in the /var/lib/cni directory lookup logic. It used
`filepath.Base` instead of `filepath.Dir` and thus looping infinitely.

Fixes #10857

[NO TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-07-15 18:13:16 +02:00
4136f8bdc9 Merge pull request #10915 from ashley-cui/backport
[3.2] Backport: Support uid,gid,mode options for secrets
2021-07-13 10:50:45 -04:00
6f9d9636a2 Support uid,gid,mode options for secrets
Support UID, GID, Mode options for mount type secrets. Also, change
default secret permissions to 444 so all users can read secret.

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-07-12 17:00:50 -04:00
60d12f72b9 Merge pull request #10871 from vrothberg/3.2-vendor-common
[3.2] vendor containers/common@v0.38.15
2021-07-09 05:46:05 -04:00
bed195bf8c vendor containers/common@v0.38.15
* libimage: import: fix tags
* Don't use systemd defaults if /proc/1/comm != systemd

BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1979497
Fixes: containers/podman/issues/10854
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-08 10:56:35 +02:00
275b0d8263 Merge pull request #10869 from vrothberg/3.2-backports
[CI:DOCS] [3.2] podman search: clarify that results depend on implementation
2021-07-08 04:48:10 -04:00
75431a455f [CI:DOCS] podman search: clarify that results depend on implementation
Clarify in the man page that podman-search is not generally realiable
way of determining the presence/existence of an image.  The results of
the v1 and the v2 endpoints depend on the implementation of each
registry; the semantics are not really specified.  Some registries may
not support search at all as it's not part of the OCI dist spec.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1978556
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-07 11:04:40 +02:00
6f0bf16c83 Merge pull request #10845 from vrothberg/3.2-backports
[3.2] vendor containers/common@v0.38.14
2021-07-02 10:49:05 -04:00
37570b7b75 vendor containers/common@v0.38.14
Fix looking up images with other architectures.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1978556
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-02 11:46:27 +02:00
ac740c649b Merge pull request #10830 from vrothberg/3.2-backports
[3.2] vendor containers/common@v0.38.13
2021-07-01 09:56:00 -04:00
6ecedc1618 vendor containers/common@v0.38.13
* libimage: events: deferred write

Fixes: bugzilla.redhat.com/show_bug.cgi?id=1977673
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-07-01 11:27:04 +02:00
fbb4e5ebc8 Merge pull request #10808 from vrothberg/3.2-backports
[3.2] vendor containers/common@v0.38.12
2021-06-29 06:10:05 -04:00
8a41bf3ee6 [3.2] vendor containers/common@v0.38.12
* pull: custom platform: do not use local image name

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-06-29 10:41:45 +02:00
a2765155ee Merge pull request #10784 from mheon/release_322
[CI:DOCS] Bump to v3.2.2
2021-06-25 17:00:09 -04:00
2c003d9783 Bump README to v3.2.2
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-06-25 16:33:23 -04:00
bb2cbf0d55 Bump to v3.2.3-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-06-25 14:24:32 -04:00
d577c44e35 Bump to v3.2.2
Signed-off-by: Matthew Heon <mheon@redhat.com>
v3.2.2
2021-06-25 14:21:29 -04:00
dec14194f0 Merge pull request #10778 from mheon/backports_322
Backports for v3.2.2
2021-06-25 11:08:43 -04:00
9f4afa1ea2 fix systemcontext to use correct TMPDIR
Users are complaining about read/only /var/tmp failing
even if TMPDIR=/tmp is set.

This PR Fixes: https://github.com/containers/podman/issues/10698

[NO TESTS NEEDED] No way to test this.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

<MH: Fixed cherry-pick conflicts>

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-06-25 09:35:34 -04:00
5dabff27db Scrub podman commands to use report package
Refactor podman commands that have drifted from using
c/common report pkg. Report pkg is needed to implement
go template functions.

Removed obsolete code from podman which exists in c/common.

Latest template library added default newlines and method to
remove them. Incorporated needed changes in c/common PR below.

Depends on https://github.com/containers/common/pull/624
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1855983

Signed-off-by: Jhon Honce <jhonce@redhat.com>

<MH: Fixed cherry-pick conflicts>

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-06-25 09:33:06 -04:00
647c2024e2 Fix volumes with uid and gid options
Podman uses the volume option map to check if it has to mount the volume
or not when the container is started. Commit 28138dafcc39 added to uid
and gid options to this map, however when only uid/gid is set we cannot
mount this volume because there is no filesystem or device specified.
Make sure we do not try to mount the volume when only the uid/gid option
is set since this is a simple chown operation.

Also when a uid/gid is explicity set, do not chown the volume based on
the container user when the volume is used for the first time.

Fixes #10620

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-06-25 09:32:22 -04:00
c2dcb3ee24 Vendor in c/common v0.38.11
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-06-25 09:31:50 -04:00
ba70363f69 Initial release notes for v3.2.2
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-06-24 14:14:09 -04:00
a9fd54775d Fix restoring of privileged containers
Checkpointed containers started with --privileged fail during restore
with:

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

This commit fixes it by not setting the labels when restoring a
privileged container.

[NO TESTS NEEDED]

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-06-24 14:11:59 -04:00
d5f0729b23 Fix handling of podman-remote build --device
Fixes: https://github.com/containers/podman/issues/10614

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-06-24 14:10:42 -04:00
90805fa39f Add support for podman remote build -f - .
Fixes: https://github.com/containers/podman/issues/10621

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-06-24 14:08:57 -04:00
854c27c0a0 Fix panic condition in cgroups.getAvailableControllers
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
2021-06-24 14:07:10 -04:00
b0dc157af9 Fix permissions on initially created named volumes
Permission of volume should match the directory it is being mounted on.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-06-24 14:05:12 -04:00
f5cdb95eec Fix building static podman-remote
As near as I can tell, sometime between `v1.6.4` and `v1.9` the definition
of `LDFLAGS_PODMAN_STATIC` was both created and lost.  Additionally, after
a refactoring of the `Makefile` it was possible to enable CGO (which
will cause a dynamic binary to be built).  Fix both issues by adding the
missing definition and forcing CGO to be disabled.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-06-24 14:03:26 -04:00
1c04cfe837 add correct slirp ip to /etc/hosts
The container name should have the slirp interface ip set in /etc/hosts
and not the gateway ip. Commit c8dfcce6db0a introduced this regression.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1972073

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-06-24 14:00:23 -04:00
6c4ee8535f disable tty-size exec checks in system tests
As discussed in #10710, the additional checks for podman-exec added by
commit 666f555aa52b are extremely flaky and appear in nearly every PR
I have see this week.

Let's temporarily disable the checks and reenable them on #10710 is
fixed.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-06-24 13:50:29 -04:00
6ba9617be6 Fix resize race with podman exec -it
When starting a process with `podman exec -it` the terminal is resized
after the process is started. To fix this allow exec start to accept the
terminal height and width as parameter and let it resize right before
the process is started.

Fixes #10560

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-06-24 13:48:48 -04:00
eb6d4b0cfe Fix documentation of the --format option of podman push
It affects all transports; and without --format, we try several manifest formats.

[NO TESTS NEEDED]

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2021-06-24 13:47:21 -04:00
e5c939183a Fix systemd-resolved detection.
Previously podman failed when run in an environment where 127.0.0.53 is
the only nameserver but systemd-resolved is not used directly.
In practice this happened when podman was run within an alpine container
that used the host's network and the host was running systemd-resolved.

This fix makes podman ignore a file not found error when reading /run/systemd/resolve/resolv.conf.

Closes #10733

[NO TESTS NEEDED]

Signed-off-by: Max Goltzsche <max.goltzsche@gmail.com>
2021-06-24 13:43:40 -04:00