11952 Commits

Author SHA1 Message Date
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
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
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
ab3b6df130 Makefile: ensure install.docker creates BINDIR
Commit 3908c00799fe2af1a12c9c4f4be8b49dbdecd9be 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
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
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
2d824d85e1 Merge pull request #9888 from baude/machineign
podman machine init --ignition-path
2021-03-31 15:24:47 +02:00
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
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
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
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
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
a373e2fdf3 Merge pull request #9885 from ashley-cui/machinels
Add podman machine ls
2021-03-30 22:36:25 +02:00
bd07179e9c Merge pull request #9892 from jwhonce/wip/top
Trim white space from /top endpoint results
2021-03-30 21:29:26 +02:00
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
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
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
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
6189232ef8 Merge pull request #9882 from rhatdan/volume
Document --volume from podman-remote run/create client
2021-03-30 19:39:56 +02:00
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
f7ad9fbd9e Merge pull request #9873 from baude/correctaarch64
resolve proper aarch64 image names
2021-03-30 17:09:58 +02:00
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
5e28b35aa5 Merge pull request #9872 from baude/vmaltimage
podman machine init user input
2021-03-30 16:07:02 +02:00
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
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
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
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
c5f9819dac Silence podman network reload errors with iptables-nft
Make sure we do not display the expected error when using podman network
reload. This is already done for iptables-legacy however iptables-nft
creates a slightly different error message so check for this as well.
The error is logged at info level.

[NO TESTS NEEDED] The test VMs do not use iptables-nft so there is no
way to test this. It is already tested for iptables-legacy.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-03-30 10:48:26 +02:00
f7d82a1f30 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-03-30 10:19:22 +02:00
5eb59509be Merge pull request #9876 from edsantiago/apiv2_relax_versioncheck
APIv2 basic test: relax APIVersion check
2021-03-30 04:42:37 +00:00
b6089a5e99 resolve proper aarch64 image names
when automatically downloading fcos for the Apple M1, we needed
to replace a statically defined URL with the dynamically
determined one.

also, it appears boolean qemu options `server` and `onwait` are
not defined as `server=on` and `wait=off`.

[NO TESTS NEEDED]

Signed-off-by: baude <bbaude@redhat.com>
2021-03-29 20:20:39 -05:00
4fe1ce154f Merge pull request #9846 from afbjorklund/qemu-arm64
[NO TESTS NEEDED] Add machine support for qemu-system-aarch64 on linux
2021-03-30 00:37:36 +00:00
c03ff140d8 APIv2 basic test: relax APIVersion check
It is tedious and error-prone to update the 'APIVersion=<exact>'
test every time there's a minor bump. Change the test so it
confirms only the major version.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-03-29 15:32:01 -06:00
b9e064ab84 Merge pull request #9795 from mheon/bump_320_dev
Bump to v3.2.0-dev
2021-03-29 20:42:03 +00:00