Commit Graph

19378 Commits

Author SHA1 Message Date
Paul Holzinger db7cb1dbfc
test/tools: vendor ginkgo v2.11
Ginkgo currently logs a warning because the cli version (defnied in
test/tools/go.mod) does not match the library version (defnied in
go.mod).

Simply fix this by updating ginkgo to the latest version.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-07-05 10:12:44 +02:00
Paul Holzinger c20612babc
test/e2e: write timings directly to file
There is no need to buffer them all into an array then write them once
at the end. Just write directly to the file.

Fixes #19104

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-07-05 10:12:43 +02:00
OpenShift Merge Robot f33a3bdc35
Merge pull request #19085 from dfr/emulate-linux
pkg/specgen: properly identify image OS on FreeBSD
2023-07-05 03:50:19 -04:00
OpenShift Merge Robot 10615e784b
Merge pull request #19106 from edsantiago/refactor_registry
system tests: refactor registry code
2023-07-05 02:29:52 -04:00
Ed Santiago ba1355b230 system tests: refactor registry code
The podman-login tests have accumulated much cruft over the
years, because that's the only place where we run a local
registry, and the process was crufty: we actually start/stopped
the registry as the first & last tests of the file. Meaning,
you couldn't do 'hack/bats 150:just-one-test' because that
would skip the registry start. And just now, a completely
unrelated test has had to be shoved into the login file.

This PR revamps the whole thing, by adding a new registry helper
module that can be used anywhere. And, once the registry is
started, it just stays running until the end of tests. (This
requires BATS 1.7 or greater).

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-07-04 15:26:55 -06:00
Doug Rabson 644f7cd9be pkg/specgen: properly identify image OS on FreeBSD
When working on Linux emulation on FreeBSD, I assumed that
SpecGenerator.ImageOS was always populated from the image's OS value but
in fact, this value comes from the CLI --os flag if set, otherwise "".
This broke running FreeBSD native containers unless --os=freebsd was
also set. Fix the problem by getting the value from the image itself.

This is a strong incentive for me to complete a stalled project to enable
podman system tests on FreeBSD.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2023-07-04 13:53:42 +01:00
OpenShift Merge Robot 5c302db506
Merge pull request #19101 from haircommander/runc-bump
libpod: use new libcontainer BlockIO constructors
2023-07-04 03:22:09 -04:00
Peter Hunt a3a62275c8 libpod: use new libcontainer BlockIO constructors
[NO NEW TESTS NEEDED]

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2023-07-03 15:11:35 -04:00
OpenShift Merge Robot e0846ac383
Merge pull request #19088 from edsantiago/fix_corrupt_man_tables
[CI:DOCS] uidmap man pages: fix corrupt tables
2023-07-03 02:46:27 -04:00
Ed Santiago 4a5396b467 [CI:DOCS] uidmap man pages: fix corrupt tables
The markdown-to-manpage sequence needs a long row of dashes,
not a single dash. A single dash, as used in this one option,
generates unreadable *roff.

Also, some tool somewhere doesn't like too-long columns. Shrtn thm.

Also, verify that there are no more three-or-fewer-dash columns:

    $ ack '\|\s+-{1,3}\s' docs/source/markdown

Fixes: #19086

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-07-02 17:38:42 -06:00
Daniel J Walsh 03d7ed468d
Merge pull request #19080 from containers/renovate/github.com-crc-org-vfkit-digest
fix(deps): update github.com/crc-org/vfkit digest to c9a4b08
2023-07-02 07:05:05 -04:00
OpenShift Merge Robot 539be58163
Merge pull request #19079 from containers/renovate/github.com-containers-buildah-1.x
fix(deps): update module github.com/containers/buildah to v1.31.0
2023-07-01 06:38:41 -04:00
OpenShift Merge Robot 0004ae86e2
Merge pull request #19076 from containers/renovate/github.com-opencontainers-image-spec-1.x
fix(deps): update module github.com/opencontainers/image-spec to v1.1.0-rc4
2023-07-01 06:35:37 -04:00
renovate[bot] 5a8e092a22
fix(deps): update github.com/crc-org/vfkit digest to c9a4b08
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-01 05:43:07 +00:00
renovate[bot] d0359fccaa
fix(deps): update module github.com/containers/buildah to v1.31.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-01 00:26:07 +00:00
renovate[bot] 300eb36b45
fix(deps): update module github.com/opencontainers/image-spec to v1.1.0-rc4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-30 19:35:30 +00:00
OpenShift Merge Robot 82af41cf2a
Merge pull request #19062 from Luminger/fix-use-gid-map-not-uid-map
Use /proc/self/gid_map as intended, not uid_map
2023-06-30 09:46:59 -04:00
OpenShift Merge Robot 92a22bb94b
Merge pull request #19063 from BlackHole1/fix-search
fix(command): ignore `--format` in `podman search --list-tags`
2023-06-30 09:41:26 -04:00
OpenShift Merge Robot b050710827
Merge pull request #19060 from vrothberg/fix-17403
podman machine start: fix ready service
2023-06-30 09:38:52 -04:00
OpenShift Merge Robot 6652e29cc7
Merge pull request #19057 from dfr/freebsd-install
Makefile: don't rely on the non-standard -r flag for ln
2023-06-30 09:36:26 -04:00
OpenShift Merge Robot b7a21aad7b
Merge pull request #19055 from containers/renovate/github.com-containers-libhvee-0.x
fix(deps): update module github.com/containers/libhvee to v0.2.0
2023-06-30 07:01:55 -04:00
Simon Brakhane 94e59bd2ff Use /proc/self/gid_map as intended, not uid_map
GetKeepIDMapping never read the gid (as it intended) but reused the uid.
Most likely a typo that never bothered anybody as uid and gid usually
match.

Signed-off-by: Simon Brakhane <simon@brakhane.net>
2023-06-30 12:57:55 +02:00
Black-Hole1 a16488f89d
fix(command): ignore `--format` in `podman search --list-tags`
Fix: https://github.com/containers/podman/issues/19033

Signed-off-by: Black-Hole1 <bh@bugs.cc>
2023-06-30 18:19:48 +08:00
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
Valentin Rothberg 9fb2f8e100 podman machine start: fix ready service
When debugging #17403, the logs of sshd indicates that Podman tried to
ssh into the machine too soon as the `core` user has not yet been fully
set up:

 > error: kex_exchange_identification: Connection closed by remote host
 > fatal: Access denied for user core by PAM account configuration [preauth]

@dustymabe found that the we may have to wait for systemd-user sessions
to be up.  Doing that reduces the flake rate on my M2 machine but does
not entirely fix the issue.

Since I have seen multiple symptoms of flakiness, I think it does not
hurt to add the systemd-user sessions to the dependencies of the ready
service and continue investigating.

[NO NEW TESTS NEEDED] - once we have a fix out, I want to exercise
frequent stop/start in the machine tests but they won't pass now.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-06-30 10:50:30 +02:00
Doug Rabson 8408ad4987 Makefile: don't rely on the non-standard -r flag for ln
This flag is not supported on BSD-derived systems including FreeBSD and
macos. We can get exactly the same symlink by passing the desired
relative path as source argument to 'ln -sf'.

Signed-off-by: Doug Rabson <dfr@rabson.org>
2023-06-30 08:20:55 +01: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
renovate[bot] fe0de8b9f6
fix(deps): update module github.com/containers/libhvee to v0.2.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-30 00:28:26 +00: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