14242 Commits

Author SHA1 Message Date
f71dfcb5da Initial implementation of mac forwarding using a privileged docker sock claim helper
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-02-16 14:02:52 -05:00
2128236da5 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-16 14:02:42 -05:00
809da6b0ba Update to podman4 copr stream
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-02-16 14:01:20 -05:00
bd8ac0017e Unify ls --filter docs for networks and pods
Signed-off-by: Patrycja Guzik <patrycja.k.guzik@gmail.com>

#13078 follow-up
2022-02-16 14:00:50 -05:00
77e51e188c e2e: merge after/since image-filter tests
Merge the two tests to speed up testing.  Both built the exact same
images.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-02-16 14:00:30 -05:00
8ad29421eb 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-16 14:00:06 -05:00
f35e03ec81 create: Fix key=value annotation in the flag output
[NO NEW TESTS NEEDED]

Signed-off-by: Morten Linderud <morten@linderud.pw>
2022-02-16 13:59:36 -05:00
22cfa98605 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-16 13:59:04 -05:00
d77b4f92c0 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-16 13:58:40 -05:00
a72e22160a 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-16 13:56:39 -05:00
975d79aedb 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-16 13:55:56 -05:00
a34f27959a Merge pull request #13233 from baude/v4.0fcosside
[BACKPORT] V4.0fcosside
2022-02-16 13:27:44 -05:00
421b7466c2 Fix images since/after tests
For the since and after imagve filter tests, instead of using the
read-only cache of images, we just use the empty r/w store.  We then
build three images that are strictly predictable.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-02-16 10:49:43 -06:00
04badc2c9c Changes of docker descriptions
It looks like some descriptions have changed on the docker registry
where we had been searching for images that include 'alpine'.  We are
now seeing an image in the initial list that has 'alpine' in its
description.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-02-16 10:49:35 -06:00
aa1a6b6eaa Merge pull request #13249 from baude/backporte2efixes
[BACKPORT] Backporte2efixes
2022-02-16 11:33:43 -05:00
09708bee9c Fix images since/after tests
For the since and after imagve filter tests, instead of using the
read-only cache of images, we just use the empty r/w store.  We then
build three images that are strictly predictable.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-02-16 08:55:36 -06:00
35a4f32be6 Changes of docker descriptions
It looks like some descriptions have changed on the docker registry
where we had been searching for images that include 'alpine'.  We are
now seeing an image in the initial list that has 'alpine' in its
description.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-02-16 08:38:50 -06:00
629d864459 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-14 15:10:40 -06:00
ab3e566d74 Merge pull request #13216 from cevich/ci_updates
[4.0] Enable Netavark/Aardvark-DNS CI Testing
2022-02-14 08:28:37 -05:00
b0a445e354 Merge pull request #13203 from mheon/bump_rc5
Bump to v4.0.0-RC5
2022-02-11 16:34:08 -05:00
a6fbfd47c9 Cirrus: TODO: netavark/aardvark release branches
Signed-off-by: Chris Evich <cevich@redhat.com>
2022-02-11 14:49:44 -05:00
e5644bbf13 Cirrus: Expand netavark testing to include rootless
The list of netavark/aardvark-dns tasks is likely to be
ever-growing for the near-term.  Consolidate them into a single task
entry with a matrix attribute to make future expansions less
YAML-duplicative.  Also, re-arrange it to fall in-between the CNI
integration and system task sections.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-02-11 14:49:44 -05:00
1656a23359 Cirrus: Minor - limit release task applicability
This task/test is guaranteed to fail on non-release PRs.  Upon
reviewing actual practice and the release docs, this task should be
limited to PRs with a title containing `release` or `bump` keywords.
Also fix a minor comment typo.

Ref:
https://github.com/containers/podman/pull/13106#pullrequestreview-869855449

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-02-11 14:49:44 -05:00
afb39f2e47 Cirrus: Add [CI:BUILD] magic that only builds
This is intended for cases where no code changes were made in this repo.
but something did change which could affect the toolchain.  For example,
`Makefile` or packaging changes.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-02-11 14:49:44 -05:00
926c3b08ae CI: fix nightly builds
Nightly builds were failing on CI ever since the Makefile change to have
install target independent of build targets.
See: e4636ebdc84ca28cf378873435cc9a27c81756f8

This commit ensures everything is built before installation.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-02-11 14:49:44 -05:00
1e3115cf42 Cirrus: Log netavark/aardvark binary build info.
Enabled by:
* https://github.com/containers/netavark/pull/191
* https://github.com/containers/aardvark-dns/pull/36

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-02-11 14:49:43 -05:00
66a3be3709 Cirrus: Add netavark/aardvark system test task
Also add a system-test that verifies netavark driver is in use when
magic env. var. is set.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-02-11 14:49:40 -05:00
6b0d4d9158 Cirrus: Also download aardvark-dns binary
This involves a minor code-change so the download/install can run in a
loop for the two different repositories and binaries.  Given everything
is exactly the same except the URLs and names.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-02-11 14:47:57 -05:00
b63f61f5cd Cirrus: Add e2e task w/ upstream netavark
This PR adds the CI mechanisms to obtain the latest upstream netavark
binary, and set a magic env-var to indicate e2e tests should execute
podman with `--network-driver=netavark`.  A future commit implement
this functionality within the e2e tests.

Due to the way the new environment is enabled, the standard task name
is too long for github to display without adding ellipsis.  Force the
custom task name `Netavark Integration` to workaround this.  At some
future point, when netavark is more mainstream/widely supported, this
custom task and upstream binary install can simply be removed - i.e.
netavark will simply be used by default in the normal e2e tasks.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-02-11 14:44:16 -05:00
6a3de93513 Revert minimum API change
CI is barfing and this seems like the most likely cause.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-02-11 14:04:02 -05:00
9688a462e9 netavark e2e tests
enabled e2e tests for netavark

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-02-11 11:23:24 -05:00
92790e98c6 Bump to v4.0.0-dev
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2022-02-10 16:15:11 -05:00
d7d79ce815 Bump to v4.0.0-RC5
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
v4.0.0-rc5
2022-02-10 16:14:01 -05:00
5356e36b8e Update release notes for v4.0.0-RC5
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2022-02-10 14:20:04 -05:00
77ca2498e9 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 14:05:48 -05:00
f8cd4df1b6 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-10 14:04:17 -05:00
d0fccbbbba 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-10 14:03:58 -05:00
e7998b1224 [NO NEW TEST NEEDED] Add schema for ImageCreate 200 response.
Signed-off-by: Tom Deseyn <tom.deseyn@gmail.com>
2022-02-10 14:03:26 -05:00
6d01b6dd63 fix: Multiplication of durations
'killContainerTimeout' is already 5 second
[NO NEW TESTS NEEDED]

Signed-off-by: myml <wurongjie1@gmail.com>
2022-02-10 14:01:42 -05:00
ed60f89086 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-10 13:59:07 -05:00
7e37c608f7 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-10 13:58:12 -05:00
9aee36b768 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-10 13:57:48 -05:00
b1b9a0d7a2 tests: retrofit healthcheck system tests
All the healthcheck return output now but systems tests is written to
expect empty output which seems wrong.

Modify jq output to contain newline character rather than actual newline

Signed-off-by: Aditya R <arajan@redhat.com>
2022-02-10 13:56:28 -05:00
74cba33c78 healthcheck, libpod: Read healthcheck event output from os pipe
It seems we are ignoring output from healthcheck session.
Open a valid pipe to healthcheck session in order read its output.

Use common pipe for both `stdout/stderr` since that was the previous
behviour as well.

Signed-off-by: Aditya R <arajan@redhat.com>
2022-02-10 13:56:22 -05:00
7ec63f092f Fix: Do not print error when parsing journald log fails
foramtError was written as err
[NO NEW TESTS NEEDED]

Signed-off-by: myml <wurongjie1@gmail.com>
2022-02-10 13:55:24 -05:00
d62a0204d4 Bump github.com/buger/goterm from 1.0.1 to 1.0.4
Bumps [github.com/buger/goterm](https://github.com/buger/goterm) from 1.0.1 to 1.0.4.
- [Release notes](https://github.com/buger/goterm/releases)
- [Commits](https://github.com/buger/goterm/compare/v1.0.1...v1.0.4)

---
updated-dependencies:
- dependency-name: github.com/buger/goterm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-10 13:55:04 -05:00
bcd5f5ead7 append podman dns search domain
Append the podman dns seach domain to the host search domains when we
use the dnsname/aardvark server. Previously it would only use podman
seach domains and discard the host domains.

Fixes #13103

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-02-10 13:54:18 -05:00
b1bf91a22a Podman pod create --share-parent vs --share=cgroup
separated cgroupNS sharing from setting the pod as the cgroup parent,
made a new flag --share-parent which sets the pod as the cgroup parent for all
containers entering the pod

remove cgroup from the default kernel namespaces since we want the same default behavior as before which is just the cgroup parent.

resolves #12765

Signed-off-by: cdoern <cdoern@redhat.com>
Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
Signed-off-by: cdoern <cdoern@redhat.com>
2022-02-10 13:49:46 -05:00
85c0fe7dc0 System tests: revert emergency skip of checkpoint tests
Revert #13049. criu-3.16.1-6.fc36 fixes the problem and is
now in fc36 stable:

   https://bodhi.fedoraproject.org/updates/FEDORA-2022-183b337712

(Yes, I confirmed that tests pass on a rawhide vm)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-02-10 13:47:56 -05:00
c4a9aa7c73 Merge pull request #13195 from jwhonce/wip/network_version_4.0
[4.0] Add version guard to libpod API endpoints
2022-02-10 10:17:57 -05:00