9991 Commits

Author SHA1 Message Date
581508f3ec Merge pull request #8213 from saschagrunert/osusergo
Use osusergo build tag for static build
2020-11-03 14:41:00 -05:00
532bce4ad4 Make volume filters inclusive
When using multiple filters, return a volume that matches any one of the used filters, rather than matching both of the filters.
This is for compatibility with docker's cli, and more importantly, the apiv2 compat endpoint
Closes #6765

Signed-off-by: Ashley Cui <acui@redhat.com>
2020-11-03 14:35:01 -05:00
5b17f58e7e Merge pull request #8219 from rhafer/rootless-mounts
docs: Mention mounts.conf location for non-root users
2020-11-03 14:34:08 -05:00
8eb2cb1f54 [CI:DOCS]Add Urvashi to podman OWNERS
Lets add Urvashi to podman OWNERS so she can review and merge PRs.

Signed-off-by: baude <bbaude@redhat.com>
2020-11-03 13:30:48 -06:00
1e83aea9e6 Merge pull request #8204 from jwhonce/jira/run-976
Add test/apiv2/rest_api tests to make target
2020-11-03 14:27:30 -05:00
2b859a9d18 Improve error messages from failing tests
Using a function like ContainSubstring or Equal is better because if
the test fails it will log a descriptive error that includes the
actual string generated during the test. This is more helpful than a
function like BeTrue that will only indicate that an assertion failed
without giving further details of the failure.

Signed-off-by: Debarshi Ray <rishi@fedoraproject.org>
2020-11-03 19:36:44 +01:00
110c1c8b4b Merge pull request #8231 from baude/fedorarootlesscpulimit
fedora rootless cpu settings
2020-11-03 12:21:08 -05:00
2a6e96e7ae Merge pull request #8226 from debarshiray/wip/rishi/toolbox_test-userns-keepid-HOME
Test $HOME when it's parent is bind mounted with --userns=keep-id
2020-11-03 12:04:26 -05:00
73742a0e73 fedora rootless cpu settings
fedora does not have the the ability in rootless to set cpu limits.
this requires a simple fix for fedora 33 to pass ci tests.

Signed-off-by: baude <bbaude@redhat.com>
2020-11-03 09:28:06 -06:00
96358824f6 Merge pull request #8224 from jjasghar/patch-1
Update README.md
2020-11-03 14:58:20 +01:00
aae3e71f9a Merge pull request #8217 from giuseppe/caps-ambient
specgen: add support for ambient capabilities
2020-11-03 11:44:23 +01:00
b00a195ba2 Test $HOME when it's parent is bind mounted with --userns=keep-id
When --userns=keep-id is used, Podman is supposed to set up the home
directory of the user inside the container to match that on the host
as long as the home directory or any of its parents are marked as
volumes to be bind mounted into the container.

Currently, the test only considers the case where the home directory
itself is bind mounted into the container. It doesn't cover the Podman
code that walks through all the bind mounts looking for ancestors in
case the home directory itself wasn't specified as a bind mount.

Therefore, this improves the existing test added in commit
6ca8067956128585 ("Setup HOME environment when using --userns=keep-id")

Note that this test can't be run as root. The home directory of the
root user is /root, and it's parent is /. Bind mounting the entire /
from the host into the container prevents it from starting:
  Error: openat2 ``: No such file or directory: OCI not found

Signed-off-by: Debarshi Ray <rishi@fedoraproject.org>
2020-11-03 01:56:16 +01:00
1147bc7e7b Update README.md
Typo

Signed-off-by: JJ Asghar <jjasghar@gmail.com>
2020-11-02 16:22:52 -06:00
8dfbdb561b Merge pull request #8166 from rhatdan/unbindable
Allow users to mount with unbindable flag
2020-11-02 18:19:39 +01:00
448aafc2fd docs: Mention mounts.conf location for non-root users
Signed-off-by: Ralf Haferkamp <rhafer@suse.com>
2020-11-02 16:55:10 +01:00
df8bda8cc0 Add test/apiv2/rest_api tests to make target
* renamed old API tests to not be discovered, they do not pass
* Updated the API tests to use a pristine storage configuration
* Skipped attach test, it needs to be re-written

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-11-02 08:36:22 -07:00
7375a55757 Merge pull request #8207 from xordspar0/common-period-quota
Centralize cores and period/quota conversion code
2020-11-02 16:02:55 +01:00
afa4ec0db0 specgen: keep capabilities with --userns=keep-id
if --userns=keep-id is specified and not --user is specified, take the
unprivileged capabilities code path so that ambient capabilities are
honored in the container.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-11-02 15:46:56 +01:00
8bc0f51e33 Merge pull request #8210 from TomSweeneyRedHat/dev/tsweeney/fixpull2
Match build pull functionality with Docker's
2020-11-02 15:34:20 +01:00
6a94429098 specgen: fix check for root user
if the username is specified in the USER:GROUP form, make sure we only
check for USER.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-11-02 14:39:02 +01:00
bce8f851c1 specgen: add support for ambient capabilities
if the kernel supports ambient capabilities (Linux 4.3+), also set
them when running with euid != 0.

This is different that what Moby does, as ambient capabilities are
never set.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-11-02 14:36:39 +01:00
c1ffdfbd78 Merge pull request #8212 from containers/dependabot/go_modules/github.com/containers/storage-1.23.8
Bump github.com/containers/storage from 1.23.7 to 1.23.8
2020-11-02 13:23:03 +01:00
3ee44d942e Add better support for unbindable volume mounts
Allow users to specify unbindable on volume command line

Switch internal mounts to rprivate to help prevent leaks.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-02 07:19:12 -05:00
c8c35c9792 Bump github.com/containers/storage from 1.23.7 to 1.23.8
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.23.7 to 1.23.8.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.23.7...v1.23.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-02 05:26:11 -05:00
5700b56666 Use osusergo build tag for static build
We now use the `osusergo` build tag to not use the glibc functions which
occur in the warnings but them from golang the os/user package.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-11-02 10:19:40 +01:00
0ac857fc0f Change http ConnState actions between new and active
Currently it double counts connections because it's incrementing the
total for both the new and active states. Based on the comments, we
should only count new connections for the total count and perform the
timer stop actions when the connection has transitioned to an active
state.

Closes #8208

Signed-off-by: Alex Schultz <aschultz@redhat.com>
2020-10-31 20:31:33 -06:00
7841aea292 Match build pull functionality with Docker's
This is a continuation of #8189 and #8085.

When doing a `docker build` command, if the `--pull` command is not specified
or set to `false` the pullOption used is `PullifMissing`.  This causes the
build to pull the image only if it is not present in local storage.  It also will
raise an error if the image is not found in the registry (or the registry is down),
even if the image is present in local storage.

If the `--pull` command IS specified or specified with an argument of `true`, the
build will always pull the image from the registries.  This uses the pullOption
`PullAlways`.  It also will raise an error if the image is not found in the registry,
even if the image is present in local storage.

These changes now brings the pull functionality for `podman build` into line
with `docker build`.

However, I consider this to be a breaking change.  Previously if you did
`podman build --pull`, `podman build` or `podman build --pull = true`, then
the image would be pulled from the registry if there was not an image in
local storage or if the image in the registry was newer than the one in
local storage.  An error would *NOT* be raised if there was not an image in
the registry or the registry was down as long as there was a copy in the local
storage.  An error would be raised if the image could not be retrieved from
both the registry and local storage.  This is the PullOption `PullIfNewer`.

I believe this also differs from what Buildah does at this time but I'm too
beat to chase that down at the moment.

Personally I'd like to use the `PullIfNewer` for at least `--pull` and
`--pull=true` so that you don't get an error if the registry has a network
hiccup and the image is already stored locally.  But this differs from Docker.

I'd like to post scrum about this at our next stand up to make sure we're
all on the same page about the ramifications of this change.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-10-31 20:11:00 -04:00
0357964906 Centralize cores and period/quota conversion code
Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
2020-10-31 10:07:11 -05:00
2aaa036f56 Merge pull request #8197 from giuseppe/check-cgroupv2-swap-enabled
specgen, cgroup2: check whether memory swap is enabled
2020-10-31 11:40:07 +01:00
5a53c6e5c9 Merge pull request #8203 from Luap99/fix-8194
Fix dnsname when joining a different network namespace in a pod
2020-10-31 11:12:05 +01:00
b6ab2df9d1 Merge pull request #8100 from QiWang19/mirror-manifest
manifest list inspect single image
2020-10-31 00:19:52 +01:00
e5227b9d75 Merge pull request #8201 from QiWang19/search-limit
Remove search limit since pagination support
2020-10-30 20:34:28 +01:00
d475c99b5b Merge pull request #8202 from TomSweeneyRedHat/dev/tsweeney/buildahv1.17.0
Bump Buildah to v1.17.0
2020-10-30 20:27:53 +01:00
1fe79dd677 Merge pull request #8177 from rhatdan/wrap
Stop excessive wrapping of errors
2020-10-30 19:52:17 +01:00
3653e57a2a Merge pull request #8200 from haircommander/parse-segfault
spec: protect against segfault
2020-10-30 19:42:26 +01:00
4860223ce5 specgen, cgroup2: check whether memory swap is enabled
add a similar check to what we do on cgroup v1.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-10-30 19:35:14 +01:00
2704dfbb7a Fix dnsname when joining a different network namespace in a pod
When creating a container in a pod the podname was always set as
the dns entry. This is incorrect when the container is not part
of the pods network namespace. This happend both rootful and
rootless. To fix this check if we are part of the pods network
namespace and if not use the container name as dns entry.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-10-30 18:53:55 +01:00
acba9d5c01 Bump Buildah to v1.17.0
Bump Buildah to v1.17.0 on Master.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-10-30 13:33:08 -04:00
37b550c96a Merge pull request #8196 from giuseppe/specgen-swap-limit-err-message
specgen: fix error message
2020-10-30 18:22:47 +01:00
5eebe3dd3d Merge pull request #8191 from mheon/no_error_on_sigproxy_stopped
When container stops, drop sig-proxy errors to infos
2020-10-30 18:19:29 +01:00
7a68db33e1 Merge pull request #8127 from andylibrian/grab-systemd-mount-flags-from-the-host-7661
Improve setupSystemd, grab mount options from the host
2020-10-30 18:16:02 +01:00
e632f3f258 Merge pull request #8187 from jwhonce/wip/table
Restore --format table header support
2020-10-30 17:00:22 +01:00
6b5a94cf28 Merge pull request #8192 from rhatdan/shm
Pod's that share the IPC Namespace need to share /dev/shm
2020-10-30 16:54:00 +01:00
3db54bacaa Merge pull request #8199 from cevich/fix_missing_links
[CI:DOCS] Fix broken CI readme links
2020-10-30 16:50:45 +01:00
f794a4f03f Merge pull request #8188 from cevich/workaround_agent_stopped_responding
Cirrus: Workaround F32 BFQ Kernel bug
2020-10-30 16:32:50 +01:00
57650aa5f3 manifest list inspect single image
If the image name not a manifest list type, enable manifest inspect to return manifest of single image manifest type vnd.docker.distribution.manifest.v2+json.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-10-30 11:13:57 -04:00
cab33cfbf6 Remove search limit since pagination support
Remove the search limit check since the c/image v5.6.0 supports pagination and can give result over 100 entries.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-10-30 11:00:40 -04:00
3d70b60adc spec: protect against segfault
when the user passes in "/dev/null::w"

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2020-10-30 10:45:10 -04:00
611c0cb0e0 [CI:DOCS] Fix broken CI readme links
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-10-30 10:32:17 -04:00
6779c1cfc2 Improve setupSystemd, grab mount options from the host
fixes #7661

Signed-off-by: Andy Librian <andylibrian@gmail.com>
2020-10-30 20:51:34 +07:00