14280 Commits

Author SHA1 Message Date
60b0acb7dc Merge pull request #13237 from Luap99/net-docs
[CI:DOCS] podman network: add documentation for netavark
2022-02-15 11:40:40 -05:00
4a166c8b63 podman network: add documentation for netavark
Add some docs about the different network backends. Also remove the CNI
word from network since we refer to either a netavark or CNI config.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-02-15 16:46:23 +01:00
5977fd5095 Merge pull request #13209 from esendjer/main
ignition: propagate proxy settings from a host into a vm
2022-02-14 15:50:38 -05:00
38b19c112a Merge pull request #13223 from Foxboron/morten/fix-annotation
create: Fix key=value annotation in the flag output
2022-02-14 10:06:38 -05:00
a0991c6f36 create: Fix key=value annotation in the flag output
[NO NEW TESTS NEEDED]

Signed-off-by: Morten Linderud <morten@linderud.pw>
2022-02-14 15:42:18 +01:00
ba50e5d9eb Merge pull request #13084 from eriksjolund/troubleshooting_userns_keep_id_uidmap_gidmap
[CI:DOCS] Add --userns=keep-id, --uidmap, --gidmap troubleshooting
2022-02-14 08:42:37 -05:00
d36613908a Merge pull request #13220 from baude/podman4fcos
Temporarily pull machine images from side repo
2022-02-14 03:52:37 -05:00
a8928a3caa ignition: propagate proxy settings from a host into a vm
Set proxy settings (such as `HTTP_PROXY`, and others)
for the whole guest OS with setting up `DefaultEnvironment`
with a `systemd` configuration file `default-env.conf`,
a `profile.d` scenario file - `default-env.sh` and
a `environment.d` configuration file `default-env.conf`

The **actual** environment variables are read by podman
at a start, then they are encrypted with base64 into
a single string and after are provided into a VM through
QEMU Firmware Configuration (fw_cfg) Device

Inside a VM a systemd service `envset-fwcfg.service`
reads the providead encrypted string from fw_cfg, decrypts
and then adds to the files
 - `/etc/systemd/system.conf.d/default-env.conf`
 - `/etc/profile.d/default-env.sh`
 - `/etc/environment.d/default-env.conf`
At the end this service execute  `systemctl daemon-reload`
to propagate new variables for systemd manager

[NO NEW TESTS NEEDED]

Closes #13168

Signed-off-by: esendjer <esendjer@gmail.com>
2022-02-12 21:24:15 +05:00
3b5a3f4a74 [CI:DOCS] Add --userns=keep-id, --uidmap, --gidmap troubleshooting
* Add troubleshooting advice: "Container creates a file that is
  not owned by the user's regular UID". The solution involves
  using the options --uidmap and --gidmap.

* Add troubleshooting advice: "Passed-in devices or files can't be
  accessed in rootless container (UID/GID mapping problem)".
  The general solution involves using the options --uidmap and
  --gidmap. Sometimes --userns=keep-id could be used.

Co-authored-by: Tom Sweeney <tsweeney@redhat.com>

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-02-12 07:29:09 +01:00
eb19a7582e Merge pull request #13144 from lsm5/e2e-netavark
enable netavark specific tests
2022-02-11 20:44:07 -05:00
73f35ff2ae Temporarily pull machine images from side repo
Until podman4 is in the fcos trees, we need to pull the machine images
from a side repository.  There is a hard coded bit that forces the
side repo download right now.  Simple comment or removal of the bit will
revert to normal download behavior.

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-02-11 17:04:18 -06:00
1b22ad95c1 Merge pull request #13214 from adrianreber/2022-02-11-fix-tests
Fix checkpoint/restore pod tests
2022-02-11 16:46:08 -05:00
6f9f78f7f2 enable netavark specific tests
These are copies of the CNI tests with modifications wherever
neccessary.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-02-11 13:34:28 -05:00
564404b4fa Merge pull request #13210 from rhatdan/build
Make sure building with relative paths work correctly.
2022-02-11 12:08:59 -05:00
4b90542d5b Fix checkpoint/restore pod tests
Checkpoint/restore pod tests are not running with an older runc and now
that runc 1.1.0 appears in the repositories it was detected that the
tests were failing. This was not detected in CI as CI was not using runc
1.1.0 yet.

Signed-off-by: Adrian Reber <areber@redhat.com>
2022-02-11 15:11:48 +00:00
28ccb79b41 Merge pull request #13205 from jwhonce/wip/network_version
Add 409 response to swagger godoc
2022-02-11 06:48:59 -05:00
466b8991c4 Merge pull request #13202 from TomSweeneyRedHat/dev/tsweeney/newhello
Make the hello image leaner
2022-02-10 20:45:56 -05:00
4966adddbb Make sure building with relative paths work correctly.
Fixes: https://github.com/containers/podman/issues/12763

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-02-10 20:40:09 -05:00
3f28d697ee Add 409 response to swagger godoc
When attempting to create a network with a name that already exists,
a 409 status code will be returned

[NO NEW TESTS NEEDED]

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2022-02-10 13:47:24 -07:00
40ba9f10e5 Make the hello image leaner
[NO TESTS NEEDED]

Change from using a bash script to a c file
for running the image.  With thanks to discussions
with @afbjorklund, the Containerfile was rigged
up to make the final image be only KB's in size.

Also add USER 1000 to make the image test/run as
non-root, and update the README.md

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2022-02-10 15:45:04 -05:00
6d2b54a731 Merge pull request #13197 from giuseppe/doc-cannot-write-loginuid
[CI:DOCS] troubleshooting: add doc for ssh into a container
2022-02-10 13:37:59 -05:00
0144413a5a Merge pull request #13191 from mheon/resolvconf_fixes
Modify /etc/resolv.conf when connecting/disconnecting
2022-02-10 12:24:03 -05:00
a0b38c071b troubleshooting: add doc for ssh into a container
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-02-10 17:08:54 +01:00
87cca4e5e3 Modify /etc/resolv.conf when connecting/disconnecting
The `podman network connect` and `podman network disconnect`
commands give containers access to different networks than the
ones they were created with; these networks can also have DNS
servers associated with them. Until now, however, we did not
modify resolv.conf as network membership changed.

With this PR, `podman network connect` will add any new
nameservers supported by the new network to the container's
/etc/resolv.conf, and `podman network disconnect` command will do
the opposite, removing the network's nameservers from
`/etc/resolv.conf`.

Fixes #9603

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2022-02-10 09:44:00 -05:00
9cf1b1bd2f Merge pull request #13178 from vrothberg/sym-hello
helloimage: header symmetry
2022-02-10 09:11:58 -05:00
64a73686b9 Merge pull request #13189 from jwhonce/wip/network_version
Add version guard to libpod API endpoints
2022-02-10 09:09:56 -05:00
0585aaa1f1 Merge pull request #13192 from TomSweeneyRedHat/dev/tsweeney/bumpcommon
Bump c/common to v0.47.4
2022-02-10 09:07:56 -05:00
c4676c5719 Add version guard to libpod API endpoints
* Ensure meaningful behaviour when called with /v3.x.x semantics
* Change return code to 409 from 500 when client attempts to use an
  existing network name
* Update API bats test runner to support /v4.0.0 endpoints by default

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2022-02-09 14:22:42 -07:00
1512740e3b Bump c/common to v0.47.4
As the title says.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2022-02-09 15:26:51 -05:00
12836a5610 Merge pull request #13184 from Luap99/cni-dir
Do not set the network config dir to cni plugin dir
2022-02-09 14:51:53 -05:00
cd9ec7f7c3 Merge pull request #13182 from Luap99/api-doc
[CI:DOCS] Show API doc for several versions
2022-02-09 12:59:51 -05:00
829f88d74d Show API doc for several versions
Right now it is not possible to look at the API version for a specific
version. docs.podman.io always show the latest version from the main
branch. This is not want many users want so they now have the ability to
select a different version.

Fixes #12796

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-02-09 18:17:52 +01:00
3762946e63 Do not set the network config dir to cni plugin dir
I do not know why this code was added but it is wrong. We should never
use a plugin dir as config dir. Also this will fail for netavark. The
correct default will be set in c/common so podman should not touch it.

[NO NEW TESTS NEEDED]

Ref #13183

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-02-09 16:18:21 +01:00
411fca0b3d helloimage: header symmetry
Make the header symmetric by adding a whitespace before the `!` on the
righthand side.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-02-09 14:57:16 +01:00
eb0a0db318 Merge pull request #13142 from tmds/ImageCreate_200_schema
[CI:DOCS] Add schema for ImageCreate 200 response.
2022-02-09 04:45:13 -05:00
e405fefb31 [NO NEW TEST NEEDED] Add schema for ImageCreate 200 response.
Signed-off-by: Tom Deseyn <tom.deseyn@gmail.com>
2022-02-09 10:12:47 +01:00
b92846b42f Merge pull request #13170 from rhatdan/idmap
idmap should be able to be specified along with other options
2022-02-09 03:51:09 -05:00
61f97083c6 idmap should be able to be specified along with other options
[NO NEW TESTS NEEDED] crun is not available everywhere to test idmap.
Kernel might not be recent enough and not all file systems support
idmap option.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-02-08 17:08:49 -05:00
6ffd59828d Merge pull request #13164 from containers/dependabot/go_modules/github.com/docker/distribution-2.8.0incompatible
Bump github.com/docker/distribution from 2.7.1+incompatible to 2.8.0+incompatible
2022-02-08 11:02:21 -05:00
119f8bc6c7 Merge pull request #13163 from myml/myml/fix-duration
fix: Multiplication of durations
2022-02-08 10:58:20 -05:00
cbd0980d5b Merge pull request #13159 from Luap99/slirp4-scope
move rootless netns slirp4netns process to systemd user.slice
2022-02-08 07:10:15 -05:00
5bcd9134ff Bump github.com/docker/distribution
Bumps [github.com/docker/distribution](https://github.com/docker/distribution) from 2.7.1+incompatible to 2.8.0+incompatible.
- [Release notes](https://github.com/docker/distribution/releases)
- [Commits](https://github.com/docker/distribution/compare/v2.7.1...v2.8.0)

---
updated-dependencies:
- dependency-name: github.com/docker/distribution
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-08 12:09:28 +00:00
58adf1a835 fix: Multiplication of durations
'killContainerTimeout' is already 5 second
[NO NEW TESTS NEEDED]

Signed-off-by: myml <wurongjie1@gmail.com>
2022-02-08 09:15:45 +08:00
8d0fb0a4ed move rootless netns slirp4netns process to systemd user.slice
When running podman inside systemd user units, it is possible that
systemd kills the rootless netns slirp4netns process because it was
started in the default unit cgroup. When the unit is stopped all
processes in that cgroup are killed. Since the slirp4netns process is
run once for all containers it should not be killed. To make sure
systemd will not kill the process we move it to the user.slice.

Fixes #13153

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-02-07 17:38:53 +01:00
46d9a2570a Merge pull request #13156 from flouthoc/fix-compat-build-response-header
compat: endpoint `/build` must set header `content type` as `application/json` in response header.
2022-02-07 10:34:22 -05:00
30b076b987 Merge pull request #13158 from edsantiago/bats
Cleanup: remove obsolete/misleading bug workaround
2022-02-07 10:28:22 -05:00
d0d1ffa43e Cleanup: remove obsolete/misleading bug workaround
Followup to #13129: remove a no-longer-necessary workaround
for a healthcheck bug.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-02-07 06:58:19 -07:00
b1dcd025c6 Merge pull request #13129 from flouthoc/healthcheck-session-read-from-pipe
healthcheck, libpod: Read healthcheck event output from os pipe
2022-02-07 08:52:23 -05:00
f6b0abfa8a Merge pull request #13155 from myml/main
Fix: Do not print error when parsing journald log fails
2022-02-07 08:20:17 -05:00
3b561a4682 compat: endpoint /build must set header content type as application/json in reponse
Lot of clients are expecting proper `Content-type: application/json`
configured in response headers of `/build` compat api. Following commit
fixes that.

Fixes issues where code is setting header field after writing header
which is wrong. We must set `content-type` before we write and flush
http header.

Signed-off-by: Aditya R <arajan@redhat.com>
2022-02-07 13:38:19 +05:30