11535 Commits

Author SHA1 Message Date
69ace20535 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-05 12:48:09 -04:00
c6a21a38b3 Add support for podman --context default
This is a noop but helps with scripting and docker-compose.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-05 12:41:47 -04:00
28251f41ff Verify existence of auth file if specified
Fixes: https://github.com/containers/podman/issues/9572

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-05 12:36:04 -04:00
3fae801a37 Merge pull request #9313 from jwhonce/issues/8773
Add default template functions
2021-04-05 17:44:15 +02:00
131458e956 Merge pull request #9423 from Luap99/rootless-cni-no-infra
rootless cni without infra container
2021-04-05 17:12:14 +02:00
7a446b06c3 fix machine naming conventions
try to align the machine commands and their usage descriptions.

[NO TESTS NEEDED]

Signed-off-by: baude <bbaude@redhat.com>
2021-04-05 09:50:03 -05:00
7ec8760cbf Initial network bindings tests
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-04-05 16:48:10 +02:00
ab94827cbb Update release notes to indicate CVE fix
We didn't release this with the original release notes as the fix
was still under embargo.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-04-05 10:33:27 -04:00
1c8d3d0f6f Merge pull request #9928 from pendulm/fix_rootless_socket_activation
Fix rootless socket activation
2021-04-05 16:02:15 +02:00
9005f40c69 Merge pull request #9937 from containers/dependabot/go_modules/github.com/onsi/ginkgo-1.16.0
Bump github.com/onsi/ginkgo from 1.15.2 to 1.16.0
2021-04-05 13:16:13 +02:00
11917a1a6b 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-05 17:43:11 +08:00
ed5ad8cac4 Bump github.com/onsi/ginkgo from 1.15.2 to 1.16.0
Bumps [github.com/onsi/ginkgo](https://github.com/onsi/ginkgo) from 1.15.2 to 1.16.0.
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/ginkgo/compare/v1.15.2...v1.16.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-05 09:37:20 +00:00
6ca4bc3fe4 Merge pull request #9929 from eriksjolund/fix_typo_uidmapping
[CI:DOCS] Fix typos --uidmapping and --gidmapping and adjust Markdown layout for --userns
2021-04-05 06:19:13 +02:00
27ebbe3fe7 Http api tests for network prune with until filter
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-04-04 23:33:14 +02:00
72eb0005f1 Merge pull request #9900 from containers/dependabot/go_modules/github.com/rootless-containers/rootlesskit-0.14.1
Bump github.com/rootless-containers/rootlesskit from 0.14.0 to 0.14.1
2021-04-04 03:34:22 +02:00
307014170f Merge pull request #9884 from rhatdan/build
Fix missing podman-remote build options
2021-04-04 01:26:22 +02:00
ace3a3efd0 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-03 15:43:04 +02:00
cecb7099f5 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-03 14:41:12 +02:00
ab7a3b2069 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-03 13:12:34 +02:00
5bc6bf8ecd Bump github.com/rootless-containers/rootlesskit from 0.14.0 to 0.14.1
Bumps [github.com/rootless-containers/rootlesskit](https://github.com/rootless-containers/rootlesskit) from 0.14.0 to 0.14.1.
- [Release notes](https://github.com/rootless-containers/rootlesskit/releases)
- [Commits](https://github.com/rootless-containers/rootlesskit/compare/v0.14.0...v0.14.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-03 06:34:41 -04:00
3ed56079f9 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-02 08:00:06 -07:00
052732857a 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-02 09:19:03 -04:00
1db9053add Merge pull request #9912 from jmguzik/recreate-prune-until-tests-for-containers
Recreate until container prune tests for bindings
2021-04-02 14:35:10 +02:00
3ae42358e1 Merge pull request #9920 from ashley-cui/rooty
[NO TESTS NEEDED] Add ssh connection to root user
2021-04-02 14:32:08 +02:00
203e464f93 Merge pull request #9925 from containers/dependabot/go_modules/github.com/coreos/go-systemd/v22-22.3.1
Bump github.com/coreos/go-systemd/v22 from 22.3.0 to 22.3.1
2021-04-02 14:31:09 +02:00
5a7a1a1673 Bump github.com/coreos/go-systemd/v22 from 22.3.0 to 22.3.1
Bumps [github.com/coreos/go-systemd/v22](https://github.com/coreos/go-systemd) from 22.3.0 to 22.3.1.
- [Release notes](https://github.com/coreos/go-systemd/releases)
- [Commits](https://github.com/coreos/go-systemd/compare/v22.3.0...v22.3.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-02 07:58:47 +00:00
23ee8b1df1 Merge pull request #9899 from kellen-dunham/fix_9698
Fix #9698 Updated reference to network
2021-04-01 23:47:46 +02:00
f8bc391e34 Add ssh connection to root user
When initing a VM, create two add connections - one to user, one to
root.
podman machine remove removes both connections as well.

[NO TESTS NEEDED]

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-04-01 13:51:02 -04:00
d1e32dc6c6 Add rootless docker-compose test to the CI
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-01 17:27:03 +02:00
973807092d Use the slrip4netns dns in the rootless cni ns
If a user only has a local dns server in the resolv.conf file the dns
resolution will fail. Instead we create a new resolv.conf which will use
the slirp4netns dns.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-01 17:27:03 +02:00
6cd807e3b7 Cleanup the rootless cni namespace
Delte the network namespace and kill the slirp4netns process when it is
no longer needed.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-01 17:27:03 +02:00
676fcb722f Add new docker-compose test for two networks
Also fix the tests so we can use the podman function with the output.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-01 17:27:03 +02:00
954d920825 Make the docker-compose test work rootless
Make sure the DOCKER_SOCK location is accessible by the user when run
rootless. Alos set the DOCKER_HOST env var to ensure docker-compose will
use the non default location. Cleanup steps such as `rm` or `umount`
must be run inside podman unshare otherwise they can fail due missing
privileges.

Change the curl test to use --retry-all-errors otherwise the tests will
flake. The web server inside the container will return http code 500
sometimes, most likely because it is not fully ready to accept
connections. With --retry-all-errors curl will retry instead of failing
and thus the test will work.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-01 17:27:03 +02:00
d7e003f362 Remove unused rootless-cni-infra container files
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-01 17:27:03 +02:00
db19224b6d Only use rootless RLK when the container has ports
Do not invoke the rootlesskit port forwarder when the container has no
ports.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-01 17:27:03 +02:00
8627de28bc Fix dnsname test
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-01 17:27:03 +02:00
294c90b05e Enable rootless network connect/disconnect
With the new rootless cni supporting network connect/disconnect is easy.
Combine common setps into extra functions to prevent code duplication.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-01 17:27:03 +02:00
94e67ba9a2 Move slirp4netns functions into an extra file
This should make maintenance easier.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-01 17:27:03 +02:00
0743ead712 Fix pod infra container cni network setup
For rootless users the infra container used the slirp4netns net mode
even when bridge was requested. We can support bridge networking for
rootless users so we have allow this. The default is not changed.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-01 17:27:03 +02:00
00b2ec5e6f Add rootless support for cni and --uidmap
This is supported with the new rootless cni logic.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-01 17:27:03 +02:00
54b588c07d rootless cni without infra container
Instead of creating an extra container create a network and mount
namespace inside the podman user namespace. This ns is used to
for rootless cni operations.
This helps to align the rootless and rootful network code path.
If we run as rootless we just have to set up a extra net ns and
initialize slirp4netns in it. The ocicni lib will be called in
that net ns.

This design allows allows easier maintenance, no extra container
with pause processes, support for rootless cni with --uidmap
and possibly more.

The biggest problem is backwards compatibility. I don't think
live migration can be possible. If the user reboots or restart
all cni containers everything should work as expected again.
The user is left with the rootless-cni-infa container and image
but this can safely be removed.

To make the existing cni configs work we need execute the cni plugins
in a extra mount namespace. This ensures that we can safely mount over
/run and /var which have to be writeable for the cni plugins without
removing access to these files by the main podman process. One caveat
is that we need to keep the netns files at `XDG_RUNTIME_DIR/netns`
accessible.

`XDG_RUNTIME_DIR/rootless-cni/{run,var}` will be mounted to `/{run,var}`.
To ensure that we keep the netns directory we bind mount this relative
to the new root location, e.g. XDG_RUNTIME_DIR/rootless-cni/run/user/1000/netns
before we mount the run directory. The run directory is mounted recursive,
this makes the netns directory at the same path accessible as before.

This also allows iptables-legacy to work because /run/xtables.lock is
now writeable.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-01 17:27:03 +02:00
8b599c5126 Merge pull request #9894 from baude/machinesshfix
Remove --execute from podman machine ssh
2021-04-01 17:14:44 +02:00
c5beaf0e17 Recreate until container prune tests for bindings
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-04-01 12:10:31 +02:00
12881abc06 Merge pull request #9906 from rhatdan/runtime
Should send the OCI runtime path not just the name to buildah
2021-04-01 03:10:24 +02:00
5798102679 Merge pull request #9898 from Foxboron/morten/fix-makefile
[CI:DOCS] Makefile: Fix make install.docker regression
2021-03-31 23:05:50 +02:00
f6438d36f3 Remove --execute from podman machine ssh
The --execute flag ended up serving no purpose.  It was removed and
documentation was updated.

Fixed a panic when no VM name was provided.

[NO TESTS NEEDED]

Signed-off-by: baude <bbaude@redhat.com>
2021-03-31 12:51:33 -05:00
2e72b13823 Merge pull request #9904 from Luap99/podman-machine-autocomplete
podman machine shell completion
2021-03-31 18:20:53 +02:00
78b4dcf476 Merge pull request #9903 from rhatdan/rusage
Fix handling of remote --log-rusage param
2021-03-31 18:19:53 +02:00
24a0262bc0 Merge pull request #9902 from jmguzik/fix-containers-flaky-bindings-prune-test
Fix bindings prune containers flaky test
2021-03-31 18:18:57 +02:00
e5f0869561 Merge pull request #9901 from w4tsn/docs/fix-podman-image-unmount-link
[CI:DOCS] Fix unmount doc reference in image.rst
2021-03-31 18:16:59 +02:00