Commit Graph

19352 Commits

Author SHA1 Message Date
OpenShift Merge Robot 5561390a00
Merge pull request #19053 from edsantiago/pasta_test_cleanup
pasta system tests: cleanup, fixes, sanity check
2023-06-30 05:10:21 -04:00
OpenShift Merge Robot acaaf3de41
Merge pull request #19042 from dgibson/bug17922
pasta: Create /etc/hosts entries for pods using pasta networking
2023-06-30 05:07:50 -04:00
David Gibson 39624473b0 pasta: Create /etc/hosts entries for pods using pasta networking
For pods with bridged and slirp4netns networking we create /etc/hosts
entries to make it more convenient for the containers to address each
other.  We omitted to do this for pasta networking, however.  Add the
necessary code to do this.

Closes: https://github.com/containers/podman/issues/17922

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2023-06-30 13:04:02 +10:00
OpenShift Merge Robot fca3c2ef84
Merge pull request #19049 from dfr/freebsd-api-server
Add support for 'podman system service' on FreeBSD
2023-06-29 17:03:52 -04:00
Ed Santiago 2393fe4536 pasta tests: add sanity check for test name vs function
Confirm that pasta test name agrees with the test being run.
This is a development-time-only check, it must never fail
beyond CI. The idea is to prevent something like

   @test "... Single TCP ... IPv4" {
      pasta_test_to 6 ... udp ...
   }

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-06-29 12:54:33 -06:00
Ed Santiago 4da3e47b6f pasta tests: cleanup + 1 new test
- typo fix, a misspelled variable resulting in test being NOP
- remove unnecessary variable (followup to #19044)
- add opportunistic CONTAINERS_CONF test (followup to #19032)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-06-29 12:54:33 -06:00
OpenShift Merge Robot fad2fa3dac
Merge pull request #19047 from fwiesel/patch-1
[CI:DOCS] Document support of pod security context IDs
2023-06-29 20:42:02 +02:00
OpenShift Merge Robot d09edd2820
Merge pull request #19043 from dgibson/fix19021
pasta: Remove some leftover code from pasta bats tests
2023-06-29 16:22:30 +02:00
Doug Rabson 43b9426fc6 cmd/podman, pkg/domain/infra: sockets should live in /var/run on FreeBSD
The /var/run directory is the preferred location for unix domain
sockets.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2023-06-29 14:52:51 +01:00
OpenShift Merge Robot 92db6a871a
Merge pull request #19032 from Luap99/def-rootless-network
rootless: use default_rootless_network_cmd config
2023-06-29 15:27:31 +02:00
OpenShift Merge Robot 4d270d2460
Merge pull request #19039 from containers/renovate/github.com-coreos-stream-metadata-go-0.x
fix(deps): update module github.com/coreos/stream-metadata-go to v0.4.3
2023-06-29 14:51:20 +02:00
Doug Rabson e3f2a97d1f cmd/podman/system: add API server support on FreeBSD
This adds the 'system service' command to the build on FreeBSD and
suppresses the call to servicereaper.Start which is only needed to
support slirp4netns on Linux. A stub for compat.StatsContainer is also
added - stats are still supported via the libpod.StatsContainer API
call.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2023-06-29 13:10:44 +01:00
OpenShift Merge Robot 8ff12e09f0
Merge pull request #19044 from dgibson/bug17287
Correct intermittent failures in pasta port range forwarding tests
2023-06-29 13:04:39 +02:00
Fabian Wiesel 0d7da5c0b4 [CI:DOCS] Document support of pod security context IDs
With PR #14167, the pod-level security Context ID are supported, while the markdown says it isn't.
This patch fixes it.

```
None
```

Signed-off-by: Fabian Wiesel <fwiesel@users.noreply.github.com>
2023-06-29 12:39:51 +02:00
Paul Holzinger f64a1a1cc8
rootless: use default_rootless_network_cmd config
Make sure we use the config field to know if we should use pasta or
slirp4netns as default.

While at it fix broken code which sets the default at two different
places, also do not set in Validate() as this should not modify the
specgen IMO, so set it directly before that.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-06-29 09:46:25 +02:00
OpenShift Merge Robot 62399c77be
Merge pull request #19040 from TomSweeneyRedHat/dev/tsweeney/image_commonbump
Bump c/image to v5.26.0, c/common 0.54.0
2023-06-29 09:21:55 +02:00
OpenShift Merge Robot 45eaa4d414
Merge pull request #19035 from lsm5/rpm-fixes
[CI:BUILD] RPM: Fix koji and ELN issues
2023-06-29 08:48:18 +02:00
David Gibson e4efd709d9 Revert^3 "pasta: Use two connections instead of three in TCP range forward tests"
This reverts commit c2a24abc0d, which
itself reverted 1c08f2edac, which
reverted e33f4e0bc7.

The original e33f4e0bc7 "pasta: Use two connections instead of three
in TCP range forward tests" was a workaround to avoid intermittent
errors in CI where the pasta networking port range forwarding tests
would fail.  It was reverted and unreverted when we thought we'd fixed
the problem, but that turned out not to be the case.

We're now much more confident that we've genuinely found and fixed (or
at least, worked around) the underlying problem, so we revert it again.

Link: https://github.com/containers/podman/issues/17287

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2023-06-29 16:15:02 +10:00
David Gibson 17cd5aecbb pasta: Workaround occasional socat failures in CI
With a number of the port range forwarding tests, we've seen occasional
failures where the sending socat fails with an EINTR on connect().  This
was mitigated by e33f4e0bc7 "pasta: Use two connections instead of three
in TCP range forward tests" (which has been reverted and un-reverted
several times).  However, this did not eliminate the problem, for example
see [0].

For the failing tests we are using the socat address "EXEC:printf x" to
make socat invoke printf(1) to generate a single byte of data to transfer.
Closer analysis shows that the SIGCHLD as the printf process ends is
occasionally intersecting with the connect() call causing this failure.

This is arguably a bug in socat, to not handle this race one way or
another.  However, we can easily workaround the problem by using a
temporary file with the data to transfer, rather than invoking printf every
time.  Do this, to avoid the flakiness of these tests.

[0]
https://github.com/containers/podman/issues/17287#issuecomment-1611855165

Closes: https://github.com/containers/podman/issues/17287

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2023-06-29 15:53:13 +10:00
David Gibson 13c7d05cc1 pasta: Remove some leftover code from pasta bats tests
https://github.com/containers/podman/pull/19021 fixed bugs with the pasta
networking tests not working on hosts with multiple interfaces.  Alas, the
patch left in some stale code that generates spurious error messages for
the IPv6 case.  This is sort of harmless - later code overrides what's done
here and the tests can pass anyway.  However if a test fails for some other
reason it means we get a misleading irrelevant error message.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2023-06-29 12:51:44 +10:00
Tom Sweeney bc58dae366 Bump c/image to v5.26.0, c/common 0.54.0
Bumping these two in preparation for Podman v4.6 and
eventuall RHEL 8.9/9.3

[NO NEW TESTS NEEDED]

Signed-off-by: Tom Sweeney <tsweeney@redhat.com>
2023-06-28 20:08:42 -04:00
renovate[bot] 2cb549339d
fix(deps): update module github.com/coreos/stream-metadata-go to v0.4.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-28 22:30:00 +00:00
OpenShift Merge Robot f0cb8dfe5b
Merge pull request #19031 from dfr/freebsd-init
pkg/specgen: add support for 'podman run --init' on FreeBSD
2023-06-28 22:57:07 +02:00
OpenShift Merge Robot 455c7c8264
Merge pull request #19011 from rhatdan/secret1
Display secret to user in inspect
2023-06-28 22:54:35 +02:00
OpenShift Merge Robot b2ce082df8
Merge pull request #19034 from edsantiago/enable_rootless_systemd_test
e2e: systemd test: major fixes
2023-06-28 20:15:46 +02:00
Daniel J Walsh bf60bb0731
Display secret to user in inpspect
It is pretty complicated to display the secret on the host, but is
not really secured. This patch makes it easier to examine the secret.

Partial fix for https://github.com/containers/podman/issues/18667

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-06-28 13:14:49 -04:00
Lokesh Mandvekar 448e015667
[CI:BUILD] RPM: Fix koji and ELN issues
- build dnsname the old way otherwise it fails on koji
- use the binary path for go-md2man for successful ELN builds

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-06-28 12:23:57 -04:00
Ed Santiago 8fb719a9e8 e2e: systemd test: major fixes
[October 2022] While mucking around in this test, I noticed that
a test was being unnecessarily skipped in rootless. Reason was,
test was creating a /etc/systemd file, which it really shouldn't
have been doing anyway.

[Flash forward to June 2023] Ugh. This got complicated, so I
abandoned it. But it's flaking in CI, so one focus-push later,
here's everything that this PR fixes:

  - create systemd unit file in proper (safe) path.

  - create it *with proper podman options!!!* As in, the
    whole --this --that --root --tmpdir options! Sheesh!

  - use a pseudorandom service name, not just "redis"

  - invoke systemctl/journalctl with --system or --user
    as appropriate.

  - remove unnecessary "bash -c"

  - remove SkipIfRootless, but add SkipIfRemote

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-06-28 10:07:19 -06:00
OpenShift Merge Robot 2ac2ba9e4f
Merge pull request #19030 from lsm5/main-bump
Bump version after v4.6 branch cut
2023-06-28 17:02:43 +02:00
OpenShift Merge Robot 92b2a15a27
Merge pull request #19029 from rhatdan/inspect
Remove 'inspecting object' from inspect errors
2023-06-28 17:00:10 +02:00
Doug Rabson 865d77e942 pkg/specgen: add support for 'podman run --init' on FreeBSD
This adds define.BindOptions to declare the mount options for bind-like
mounts (nullfs on FreeBSD). Note: this mirrors identical declarations in
buildah and it may be preferable to use buildah's copies throughout
podman.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2023-06-28 14:43:50 +01:00
OpenShift Merge Robot 416b4eeac6
Merge pull request #18814 from danishprakash/kube-down-volrm
play.go: remove volumes with `kube down --force`
2023-06-28 15:31:41 +02:00
Lokesh Mandvekar 74b4615aab
Bump version after v4.6 branch cut
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-06-28 09:05:01 -04:00
OpenShift Merge Robot 9067d5c85e
Merge pull request #19013 from dfr/emulate-linux
pkg/specgen: Add support for Linux emulation on FreeBSD
2023-06-28 14:50:07 +02:00
Daniel J Walsh b6e636cbe2
Remove 'inspecting object' from inspect errors
This is just useless noise and gets us closer to what
Docker returns.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-06-28 08:19:37 -04:00
OpenShift Merge Robot be49741dc7
Merge pull request #19021 from dgibson/bug19007
pasta: Fix pasta tests to work on hosts with multiple interfaces
2023-06-28 13:06:43 +02:00
OpenShift Merge Robot c8b9c29113
Merge pull request #19019 from BlackHole1/fix-windows-docs
[CI:DOCS] fix command incorrect in windows
2023-06-28 12:30:19 +02:00
OpenShift Merge Robot 6babf9492d
Merge pull request #19015 from rhatdan/read-only
Fix readonly=false failure
2023-06-28 07:56:58 +02:00
OpenShift Merge Robot f739f8f990
Merge pull request #18921 from fangpenlin/fix-18907-set-correct-cwd-for-poststop-hook-exe
Fixes #18907, pass in correct cwd value for hooks exe
2023-06-28 07:51:52 +02:00
David Gibson fe8355be7f pasta: Fix pasta tests to work on hosts with multiple interfaces
At various points the pasta bats tests need to know the name of the
interface that pasta will use by default, and the host addresses it will
use by default.  Currently we use the pre-existing helper functions
ether_get_name and ipv[46]_get_addr_global to retreive that.

However, those just pick the first non-loopback interface or address, which
may not be the one that pasta uses if there are multiple connected host
interfaces.

Replace those helpers with local ones which examine the routing table to
more closely match pasta's internal logic about which interface to select.
This allows the tests to run successfully on a host with multiple
interfaces.

Closes: https://github.com/containers/podman/issues/19007

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2023-06-28 13:12:33 +10:00
Black-Hole1 d15cca0246
[CI:DOCS] fix command incorrect in windows
Signed-off-by: Black-Hole1 <bh@bugs.cc>
2023-06-28 09:23:51 +08:00
Daniel J Walsh bcb89fc8b2
Fix readonly=false failure
There was a huge cut and paste of mount options which were not constent
in parsing tmpfs, bind and volume mounts.  Consolidated into a single
function to guarantee all parse the same.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-06-27 16:57:21 -04:00
OpenShift Merge Robot 4dc2e08618
Merge pull request #18977 from jakecorrenti/move-qemu-functions-to-proper-files
Re-organize hypervisor implementations
2023-06-27 22:09:21 +02:00
OpenShift Merge Robot 089dbed498
Merge pull request #18999 from Luap99/vendor
update c/{common,image,storage,buildah} to latest
2023-06-27 21:10:58 +02:00
OpenShift Merge Robot c928da6d67
Merge pull request #18975 from rhatdan/man
Kube quadlets can support autoupdate as well as containers
2023-06-27 19:52:09 +02:00
OpenShift Merge Robot 1aacafbe1e
Merge pull request #18984 from rhatdan/podmansh
[CI:DOCS] Fix up podmansh man page
2023-06-27 19:46:56 +02:00
Doug Rabson 609c47ae6c pkg/specgen: Add support for Linux emulation on FreeBSD
This is limited to images that don't depend on complex cgroup or capability
setups but does cover enough functionality to be useful.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2023-06-27 17:36:28 +01:00
Daniel J Walsh cf9ebcddfd
Fix up podmansh man page
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-06-27 12:05:24 -04:00
Daniel J Walsh 05eb3e6f13
Make Podman/Buildah use same DecryptConfig/EncryptConfig funcs
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-06-27 18:04:42 +02:00
Ed Santiago f5cc0487e8
Fixes for vendoring Buildah
This commit was automatically cherry-picked
by buildah-vendor-treadmill v0.3
from the buildah vendor treadmill PR, #13808

Changes since 2023-05-01:
  - skip a new test, it fails in remote
  - skip encrypted-FROM test, broken by buildah PR 4746

Signed-off-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-06-27 18:04:42 +02:00