Commit graph

11309 commits

Author SHA1 Message Date
Matthew Heon
8c52ce83cb Bump to v3.1.3-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-04-21 14:35:40 -04:00
Matthew Heon
51b8ddbc22
Bump to v3.1.2
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-04-21 14:33:43 -04:00
Matthew Heon
a2ec25fbde Update release notes for v3.1.2
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-04-21 14:27:36 -04:00
Eduardo Vega
88b48db19b Ensure mount destination is clean, no trailing slash
Signed-off-by: Eduardo Vega <edvegavalerio@gmail.com>
2021-04-21 14:23:30 -04:00
zhangguanzhang
efda088598 Fixes podman-remote save to directories does not work
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
2021-04-21 14:21:50 -04:00
TomSweeneyRedHat
e25859790a [CI:DOCS] Add missing dash to verbose option
The `--verbose` option in the import man page was
missing a dash, this corrects it.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2021-04-21 14:21:18 -04:00
Erik Sjölund
93477b5cca [CI:DOCS] Fix Markdown table layout bugs
* Fix the Markdown table layout bugs that manifest themselves in
  corrupted tables in the generated HTML pages
  http://docs.podman.io/en/latest/markdown/podman-create.1.html
  http://docs.podman.io/en/latest/markdown/podman-run.1.html

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2021-04-21 14:20:56 -04:00
Erik Sjölund
c71c604fe4 [CI:DOCS] Rewrite --uidmap doc in podman-create.1.md and podman-run.1.md
Introduce the concept of "intermediate UID" to explain
how --uidmap works when running rootless.

Add Markdown tables to show examples of how UIDs are mapped.

Co-authored-by: Tom Sweeney <tsweeney@redhat.com>
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2021-04-21 14:20:53 -04:00
Nalin Dahyabhai
e1ea4835fc rmi: don't break when the image is missing a manifest
In libpod/image.Image.Remove(), if the attempt to find the image's
parent fails for any reason, log a warning and proceed as though it
didn't have one instead of failing, which would leave us unable to
remove the image without resetting everything.

In libpod/Runtime.RemoveImage(), if we can't determine if an image has
children, log a warning, and assume that it doesn't have any instead of
failing, which would leave us unable to remove the image without
resetting everything.

In pkg/domain/infra/abi.ImageEngine.Remove(), when attempting to remove
all images, if we encounter an error checking if a given image has
children, log a warning, and assume that it doesn't have any instead of
failing, which would leave us unable to remove the image without
resetting everything.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2021-04-21 14:17:53 -04:00
OpenShift Merge Robot
4973e4704f
Merge pull request #10092 from mheon/bump_cimage
Bump containers/image to v5.11.1
2021-04-21 05:24:21 -04:00
Matthew Heon
a35434a7be Bump containers/image to v5.11.1
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-04-20 15:11:20 -04:00
OpenShift Merge Robot
fa56978310
Merge pull request #10089 from lsm5/v3.1-go-systemd-bump-centos-fix
Bump github.com/coreos/go-systemd from 22.2.0 to 22.3.1
2021-04-20 13:59:12 -04:00
Lokesh Mandvekar
bdd93829d1 Bump github.com/coreos/go-systemd from 22.2.0 to 22.3.1
podman fails to build on CentOS 8 otherwise.

Essentially the same as commit 5a7a1a1 but cherry-picking it gave a lot
of conflicts, so I manually vendored it in.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2021-04-20 11:54:44 -04:00
OpenShift Merge Robot
b9730d2e9b
Merge pull request #10062 from mheon/bump_311
Bump to v3.1.1
2021-04-16 16:38:38 -04:00
Matthew Heon
9148568b26 Fix lint
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-04-16 14:41:15 -04:00
Matthew Heon
fe59da5420 Bump to v3.1.2-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-04-16 14:08:41 -04:00
Matthew Heon
713995bfc3
Bump to v3.1.1
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-04-16 14:08:11 -04:00
Matthew Heon
2d4e1d6099 Update release notes for v3.1.1
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-04-16 14:07:31 -04:00
Paul Holzinger
9584a2a8a1 podman play kube apply correct log driver
The --log-driver flag was silently ignored by podman play kube. This
regression got introduced during the play kube rework.
Unfortunately the test for this was skipped for no good reason.

Fixes #10015

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>

<MH: Fixed cherry-pick conflicts>

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-04-16 14:05:27 -04:00
Lokesh Mandvekar
e4c811bb0f Fix build with GO111MODULE=off
Distro builds on Fedora and Kubic projects use GO111MODULE=off
by default which are currently failing. This commit fixes it and
going forward, podman CI will also indicate failures in rpm builds.

The additional LDFLAGS have been removed  from the spec file
which is not ideal. But, currently we only use the spec file
to check if the rpm builds fine. We can fix the LDFLAGS in a
later commit when we're working on packit integration.

conmon build has also been removed from podman.spec.in because the COPR
for which it was provided has been discontinued.

[NO TESTS NEEDED]

Fixes: #10009

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2021-04-16 14:02:57 -04:00
Jhon Honce
d42f6e3cd2 [CI:DOCS] Set all operation id to be compatibile
Libpod operation id's changed to better match compatibile id

Builds on https://github.com/containers/podman/pull/9123 and corrects
a duplicated ID.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-04-16 14:02:43 -04:00
Tom Deseyn
430ecf41a1 Move operationIds to swagger:operation line
Signed-off-by: Tom Deseyn <tom.deseyn@gmail.com>
2021-04-16 14:02:36 -04:00
Tom Deseyn
611a4a0ceb swagger: add operationIds that match with docker
Signed-off-by: Tom Deseyn <tom.deseyn@gmail.com>
2021-04-16 14:02:28 -04:00
Daniel J Walsh
af5dba34b2 Fix missing podman-remote build options
Fix handling of SecurityOpts
   LabelOpts
   SeccompProfilePath
   ApparmorProfile

Fix Ulimits

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-16 14:00:29 -04:00
Daniel J Walsh
32f61dbf73 [NO TESTS NEEDED] Shrink the size of podman-remote
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-16 14:00:14 -04:00
pendulm
c8130be174 Move socket activation check into init() and set global condition.
So rootless setup could use this condition in parent and child, child
podman should adjust LISTEN_PID to its self PID.

Add system test for systemd socket activation

Signed-off-by: pendulm <lonependulm@gmail.com>
2021-04-16 13:46:54 -04:00
Giuseppe Scrivano
c042b4c820 rootless: use is_fd_inherited
since we already have an exported function that does the check,
refactor the code to use it instead of duplicating the logic.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-04-16 13:46:39 -04:00
Jakub Guzik
b76cc706ad Recreate until container prune tests for bindings
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>

<MH: Fixed cherry-pick conflicts>

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-04-16 13:42:06 -04:00
Ed Santiago
dda91e3454 System tests: special case for RHEL: require runc
As discussed in watercooler 2021-04-06: make sure that RHEL8
and CentOS are using runc. Using crun is probably a packaging
error that should be caught early.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-04-16 13:36:40 -04:00
Daniel J Walsh
04473ddf65 Document --volume from podman-remote run/create client
[NO TESTS NEEDED] This PR is mainly documentation and some code cleanup.

Also cleanup and consolidate handling of other hanlding of podman-remote
hidden options.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-16 13:36:15 -04:00
Jakub Guzik
f5a25c59e3 Containers prune endpoint should use only prune filters
Containers endpoints for HTTP compad and libpod APIs allowed usage of list HTTP
endpoint filter funcs. Documentation in case of libpod and compat API does not allow that.
This commit aligns code with the documentation.

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-04-16 13:34:49 -04:00
Jhon Honce
10a58c976b Trim white space from /top endpoint results
Versions of the ps command have additional spaces between fields, this
manifests as the container asking to run "top" and API reporting "top "
as a process.

Endpoint and tests updated to check that "top" is reported.

There is no libpod specialized endpoint to update.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-04-16 13:33:48 -04:00
Alexander Wellbrock
4cd94ade8d Fix unmount doc reference in image.rst
This pointed to the container-unmount doc page. It now points to the
expected podman-image-unmount doc page.

Signed-off-by: Alexander Wellbrock <a.wellbrock@mailbox.org>
2021-04-16 13:33:03 -04:00
Daniel J Walsh
10bc6233bb Fix handling of remove --log-rusage param
Fixes: https://github.com/containers/podman/issues/9889

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-16 13:32:00 -04:00
Morten Linderud
49a6e326a7 Makefile: introduce install.docker-full
The split of install.docker and install.docker-docs makes some sense but
there should be some way to specify both for packagers.

This introduces `make install.docker-full` which installs both the
docker binary and the documentation.

Signed-off-by: Morten Linderud <morten@linderud.pw>
2021-04-16 13:31:25 -04:00
Morten Linderud
f78d8d9cba Makefile: ensure install.docker creates BINDIR
Commit 3908c00799 introduces a split for
installing the docker binary and the docker documentation. The
install line creating BINDIR and MANDIR was both moved to the
install.docker-docs path which makes `install.docker` fail.

Signed-off-by: Morten Linderud <morten@linderud.pw>
2021-04-16 13:31:17 -04:00
Daniel J Walsh
0d049e93a4 Should send the OCI runtime path not just the name to buildah
[NO TESTS NEEDED] Mainly because I have no idea how we would test
this.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-16 13:28:59 -04:00
Kellen Dunham
ea0e530050 Fixed podman-remote --network flag
Updated reference to network

[NO TESTS NEEDED]

Signed-off-by: Kellen Dunham <kellen@oneaib.com>
2021-04-16 13:27:44 -04:00
Erik Sjölund
053ef1777f podman-run.1.md, podman-create.1.md : Adjust Markdown layout for --userns
* Adjust Markdown layout for --userns.
* Make the --userns sections identical for podman-run.1.md and podman-create.1.md

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2021-04-16 13:18:03 -04:00
Erik Sjölund
775395759a Fix typos --uidmapping and --gidmapping
* Fix typos --uidmapping and --gidmapping in podman-run.1.md
* Add the corresponding sentence in podman-create.1.md

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2021-04-16 13:17:56 -04:00
Jhon Honce
d84db36ebd Add default template functions
For commands that use the golang template library directly add the
compatible template functions

[NO TESTS NEEDED]

Fixes #8773

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-04-16 13:15:26 -04:00
Daniel J Walsh
179f026215 Don't relabel volumes if running in a privileged container
Docker does not relabel this content, and openstack is running
containers in this manner.  There is a penalty for doing this
on each container, that is not worth taking on a disable SELinux
container.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-16 13:13:06 -04:00
Daniel J Walsh
b3ef9e4dd8 Allow users to override default storage opts with --storage-opt
We define in the man page that this overrides the default storage
options, but the code was appending to the existing options.

This PR also makes a change to allow users to specify --storage-opt="".
This will turn off all storage options.

https://github.com/containers/podman/issues/9852

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-16 13:11:25 -04:00
Alexander Wellbrock
19a4df75fd Add transport and destination info to manifest doc
Initially I was missing transport information on podman manifest add.
Especially the `containers-storage` transport which references the
local image store. Had a use case where this came in quite handy and it
is not stated anywhere else in the docs. Suppose it does not make sense
for podman pull & push.

I've only added containers-storage and docker transports for
manifest add since I know those work. Maybe others work too.

I then also added the destination section to manifest push as it is done
in podman push & pull. I've added all transports here, but I don't know
if all are supported. Please review.

Signed-off-by: Alexander Wellbrock <a.wellbrock@mailbox.org>
2021-04-16 13:08:50 -04:00
Daniel J Walsh
5bca115dab Verify existence of auth file if specified
Fixes: https://github.com/containers/podman/issues/9572

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

<MH: Fixed cherry-pick conflicts>

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-04-16 13:07:46 -04:00
Matthew Heon
0cbd322590 Ensure that --userns=keep-id sets user in config
One of the side-effects of the `--userns=keep-id` command is
switching the default user of the container to the UID of the
user running Podman (though this can still be overridden by the
`--user` flag). However, it did this by setting the UID and GID
in the OCI spec, and not by informing Libpod of its intention to
switch users via the `WithUser()` option. Because of this, a lot
of the code that should have triggered when the container ran
with a non-root user was not triggering. In the case of the issue
that this fixed, the code to remove capabilities from non-root
users was not triggering. Adjust the keep-id code to properly
inform Libpod of our intention to use a non-root user to fix
this.

Also, fix an annoying race around short-running exec sessions
where Podman would always print a warning that the exec session
had already stopped.

Fixes #9919

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-04-16 13:05:11 -04:00
Jhon Honce
1df7f8e969 [CI:DOCS] Update swagger definition of inspect manifest
* Changed reference in swagger to correct struture that was being
  returned.
* Added summary to ManifestAddLibpod to clean up generated web site
* Added serve target to Makefile, to aid in debugging generated
  web site

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-04-16 11:56:59 -04:00
Jakub Guzik
3338901c4f Volumes prune endpoint should use only prune filters
Volumes endpoints for HTTP compat and libpod APIs allowed
usage of list HTTP endpoint filter funcs. Documentation in
case of compat API does not allow that. This commit aligns
code with the documentation and also ligns libpod with compat API.

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-04-16 11:55:51 -04:00
Pablo Correa Gómez
850ead4932 Adjust libpod API Container Wait documentation to the code
Closes #9960

Signed-off-by: Pablo Correa Gómez <ablocorrea@hotmail.com>
2021-04-16 11:55:04 -04:00
Jhon Honce
7ccccd22cd Add missing return
libpod df handler missing a return after writing error to client. This
caused a null to be appended to JSON and crashed python decoder.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-04-16 11:46:49 -04:00