Commit Graph

12209 Commits

Author SHA1 Message Date
OpenShift Merge Robot 23ee8b1df1
Merge pull request #9899 from kellen-dunham/fix_9698
Fix #9698 Updated reference to network
2021-04-01 23:47:46 +02:00
Ashley Cui 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
Paul Holzinger 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
Paul Holzinger 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
Paul Holzinger 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
Paul Holzinger 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
Paul Holzinger 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
Paul Holzinger 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
Paul Holzinger 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
Paul Holzinger 8627de28bc Fix dnsname test
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-01 17:27:03 +02:00
Paul Holzinger 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
Paul Holzinger 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
Paul Holzinger 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
Paul Holzinger 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
Paul Holzinger 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
OpenShift Merge Robot 8b599c5126
Merge pull request #9894 from baude/machinesshfix
Remove --execute from podman machine ssh
2021-04-01 17:14:44 +02:00
Jakub Guzik c5beaf0e17 Recreate until container prune tests for bindings
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-04-01 12:10:31 +02:00
OpenShift Merge Robot 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
OpenShift Merge Robot 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
baude 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
OpenShift Merge Robot 2e72b13823
Merge pull request #9904 from Luap99/podman-machine-autocomplete
podman machine shell completion
2021-03-31 18:20:53 +02:00
OpenShift Merge Robot 78b4dcf476
Merge pull request #9903 from rhatdan/rusage
Fix handling of remote --log-rusage param
2021-03-31 18:19:53 +02:00
OpenShift Merge Robot 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
OpenShift Merge Robot 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
Kellen Dunham 6c1f6bdccc Fixed podman-remote --network flag
Updated reference to network

[NO TESTS NEEDED]

Signed-off-by: Kellen Dunham <kellen@oneaib.com>
2021-03-31 09:55:45 -05:00
Morten Linderud 7801072851
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-03-31 16:38:06 +02:00
Morten Linderud ab3b6df130
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-03-31 16:38:06 +02:00
Alexander Wellbrock 6fa1c7e465
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-03-31 16:00:22 +02:00
Daniel J Walsh 37d1bc4298
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-03-31 09:46:42 -04:00
OpenShift Merge Robot 2d824d85e1
Merge pull request #9888 from baude/machineign
podman machine init --ignition-path
2021-03-31 15:24:47 +02:00
Paul Holzinger 009322c57a podman machine shell completion
Add shell completion for machine names.

[NO TESTS NEEDED]
I would like to add one to the shell completion test however
using podman machine init is to expensive.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-03-31 14:29:07 +02:00
Daniel J Walsh ab7c83392b
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-03-31 07:46:20 -04:00
Jakub Guzik e174a8b5da Fix bindings prune containers flaky test
In #9863 prune containers filter params were narrowed to support only those
required by http API. name filter in bindings was replaced by until filter,
which is not a good match, as until filters are causing tests to be flaky.

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-31 13:40:55 +02:00
OpenShift Merge Robot dbb7009e55
Merge pull request #9877 from TomSweeneyRedHat/dev/tsweeney/docreadme
[CI:DOCS] Add local html build info to docs/README.md
2021-03-31 11:11:47 +02:00
TomSweeneyRedHat 09f2c01ded [CI:DOCS] Add local html build info to docs/README.md
Rename Readme.md to README.md in the docs directory.   Add
the local build process per @Luap99 in #9856 for the man pages
to preview any changes that are made.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2021-03-30 18:45:40 -04:00
OpenShift Merge Robot a373e2fdf3
Merge pull request #9885 from ashley-cui/machinels
Add podman machine ls
2021-03-30 22:36:25 +02:00
OpenShift Merge Robot bd07179e9c
Merge pull request #9892 from jwhonce/wip/top
Trim white space from /top endpoint results
2021-03-30 21:29:26 +02:00
Ashley Cui ef4e91a59e Add podman machine list
podman machine list lists all virtual machines & indicates the default VM
connection, if it exists. it also can take a --format flag arg as a go
template.

[NO TESTS NEEDED]

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-03-30 14:56:21 -04:00
OpenShift Merge Robot 989c8e9785
Merge pull request #9863 from jmguzik/fix-prune-filter-funcs
Containers prune endpoint should use only prune filters
2021-03-30 20:51:00 +02:00
OpenShift Merge Robot 1d14e6ed3c
Merge pull request #9878 from jwhonce/wip/version
[NO TESTS NEEDED] Remove semantic version suffices from API calls
2021-03-30 20:22:55 +02:00
Jhon Honce eef66973de 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-03-30 10:42:06 -07:00
OpenShift Merge Robot 6189232ef8
Merge pull request #9882 from rhatdan/volume
Document --volume from podman-remote run/create client
2021-03-30 19:39:56 +02:00
Jhon Honce e731e624ca Remove semantic version suffices from API calls
When using the bindings do not include the pre-release or build
metadata in the URL for the service. This breaks older services, while
not providing that much additional functionality.

[NO TESTS NEEDED]

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-03-30 08:46:41 -07:00
OpenShift Merge Robot f7ad9fbd9e
Merge pull request #9873 from baude/correctaarch64
resolve proper aarch64 image names
2021-03-30 17:09:58 +02:00
baude b898b19e45 podman machine init --ignition-path
allow for the user to provide an alternate ignition-file rather than the
auto-generated one.

updated docs to describe ramifications of providing an alterate ignition
file.

[NO TESTS NEEDED]

Signed-off-by: baude <bbaude@redhat.com>
2021-03-30 09:44:04 -05:00
OpenShift Merge Robot 5e28b35aa5
Merge pull request #9872 from baude/vmaltimage
podman machine init user input
2021-03-30 16:07:02 +02:00
Daniel J Walsh 5b50fa565f
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-03-30 10:05:54 -04:00
OpenShift Merge Robot bb66b49cd7
Merge pull request #9886 from mheon/bump_main_310
[CI:DOCS] Update main branch to reflect the release of v3.1.0
2021-03-30 16:00:03 +02:00
OpenShift Merge Robot c0802e72c2
Merge pull request #9881 from Luap99/net-reload-silence-errors
Silence podman network reload errors with iptables-nft
2021-03-30 15:59:02 +02:00
Matthew Heon d446942a96 Update main branch to reflect the release of v3.1.0
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-03-30 09:18:08 -04:00