20875 Commits

Author SHA1 Message Date
a1577ec7b0 podman build --remote URI Dockerfile shoud not be treated as file
Podman build --remote is translating https://path as if it was a file
path. This change will leave it as a URL so it can be parsed on the
server side.

Fixed: https://github.com/containers/podman/issues/20475

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-10-27 15:10:18 -04:00
4f6a8f0d50 Merge pull request #20483 from vrothberg/RUN-1934
container.conf: support attributed string slices
2023-10-27 17:49:13 +00:00
6ec458d828 Merge pull request #20510 from mheon/powercap_2
Do not add powercap mask if no paths are masked
2023-10-27 15:47:48 +00:00
95a5ad258b Small fixes for wacko CI environments
In the unusual case where the `runtimeDir` is not already created, we
should do so on `machine init`.

When starting gvproxy from podman, we now ensure it is running (for
applehv) but waiting for the unixgram socket to appear in the filesystem
before moving on.

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-10-27 10:33:39 -05:00
95fc0044f0 Merge pull request #20508 from vrothberg/fix-20502
compose: try all possible providers before throwing an error
2023-10-27 14:49:04 +00:00
c6d410cc36 Do not add powercap mask if no paths are masked
This solves `--security-opt unmask=ALL` still masking the path.

[NO NEW TESTS NEEDED] Can't easily test this as we do not have
access to it in CI.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2023-10-27 09:55:12 -04:00
09c64ef31f Merge pull request #20503 from containers/renovate/github.com-google-uuid-1.x
Update module github.com/google/uuid to v1.4.0
2023-10-27 12:08:26 +00:00
3743955d6d compose: try all possible providers before throwing an error
Do not error out immediately but collect all errors and report them if
no candidate succeeded.  That'll fix #20502 and improve the quality of
reported errors.

[NO NEW TESTS NEEDED]

Fixes: #20502
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-10-27 13:46:13 +02:00
91df369ae6 podman kube play --replace should force removal of pods and containers
Fixes: https://github.com/containers/podman/issues/20025

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-10-27 07:29:53 -04:00
3ce62d3cc4 Sort kube options alphabetically
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-10-27 07:25:44 -04:00
4a2efe0ecf Merge pull request #20497 from containers/renovate/go.etcd.io-bbolt-1.x
fix(deps): update module go.etcd.io/bbolt to v1.3.8
2023-10-27 11:20:54 +00:00
dfa7e37763 Merge pull request #20500 from containers/renovate/github.com-docker-docker-24.x
fix(deps): update module github.com/docker/docker to v24.0.7+incompatible
2023-10-27 11:15:57 +00:00
e966c86d98 container.conf: support attributed string slices
All `[]string`s in containers.conf have now been migrated to attributed
string slices which require some adjustments in Buildah and Podman.

[NO NEW TESTS NEEDED]

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-10-27 12:44:33 +02:00
7d5af58bd7 Merge pull request #20501 from mheon/powercap
Mask /sys/devices/virtual/powercap
2023-10-27 08:04:52 +00:00
91ccd7cd2f CI: podman farm tests cleanup
Followup from #20050. Lots of tiny problems in tests, all of
them adding up to significant maintainability problems.

These tests are currently impossible to run in a dev environment,
and super-painful to set up in 1mt, so I've just done a few hours
of cleanup and am giving up for the week.

This is ready for merge, in the sense that it's much better than
what exists now, but it still needs boatloads more work.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-10-26 18:12:07 -06:00
be7dd128ef Mask /sys/devices/virtual/powercap
I don't really like this solution because it can't be undone by
`--security-opt unmask=all` but I don't see another way to make
this retroactive. We can potentially change things up to do this
the right way with 5.0 (actually have it in the list of masked
paths, as opposed to adding at spec finalization as now).

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2023-10-26 18:24:25 -04:00
05a607f14f Update module github.com/google/uuid to v1.4.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-26 20:41:41 +00:00
c3fae01368 Merge pull request #20494 from edsantiago/systest_subnet_check
CI: systest: safer random_rfc1918_subnet
2023-10-26 20:40:19 +00:00
6a0b2c680f fix(deps): update module github.com/docker/docker to v24.0.7+incompatible
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-26 19:34:27 +00:00
6badb659ce fix(deps): update module go.etcd.io/bbolt to v1.3.8
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-26 17:05:07 +00:00
e5101b28de Merge pull request #20492 from brlin-tw/patch-1
[CI:DOCS] Fix broken code block markup in Introduction.rst
2023-10-26 17:03:50 +00:00
499c608905 Merge pull request #20489 from containers/renovate/go-google.golang.org/grpc-vulnerability
chore(deps): update module google.golang.org/grpc to v1.57.1 [security]
2023-10-26 15:19:57 +00:00
9e3363c5e3 CI: systest: safer random_rfc1918_subnet
Our aarch64 CI system uses 172.31.0.0/20. Because I was (and am)
lazy, my random_rfc1918_subnet() helper was only checking /24.
This causes flakes.

Solution is to actually do it right: binary arithmetic, prefix
matching. This is effectively impossible in bash, so, use a
hairy perl helper and add copious tests.

Fixes: #18693

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-10-26 09:19:32 -06:00
c1d177e8e7 Merge pull request #20493 from edsantiago/getport_safe
CI: e2e: safer GetPort()
2023-10-26 13:37:13 +00:00
c841fa9e9a CI: e2e: safer GetPort()
Problem: frequent CI flakes of the form:

   Error: cannot listen on the TCP port: listen tcp4 :5355: bind: address already in use

Always 5355.

Cause: systemd-resolve listens on 5355, but not on 127.0.0.1. So
when GetPort() tries its is-it-in-use check by binding localhost,
it succeeds; but then podman binds * and fails.

Solution: GetPort(): test by binding 0.0.0.0.

Also, improve the failure message.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-10-26 05:52:02 -06:00
fd5140d87a Fix broken code block markup in Introduction.rst
Signed-off-by: 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>

Signed-off-by: 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
2023-10-26 18:51:45 +08:00
d0ce60c631 chore(deps): update module google.golang.org/grpc to v1.57.1 [security]
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-26 10:17:03 +00:00
642c0c798a Merge pull request #20478 from lstocchi/i20373
fix: check npipe when executing podman compose on wsl vm
2023-10-26 10:15:49 +00:00
15969a60bc chore: remove npipe const and use vmtype const for checking
Signed-off-by: lstocchi <lstocchi@redhat.com>
2023-10-26 09:43:04 +02:00
0242a7439e Merge pull request #20470 from edsantiago/curl_port_flake_fix
CI: try to fix more networking flakes
2023-10-25 21:17:03 +00:00
84efd2b7e8 Merge pull request #20468 from p-fruck/fix/api-compat-network-docs
[CI:DOCS] (API): Fix compat network (dis-)connect
2023-10-25 19:58:00 +00:00
5a47b1e150 Merge pull request #20050 from umohnani8/farm-build-2
Add podman farm build command
2023-10-25 19:54:36 +00:00
2158e15401 Update module github.com/onsi/gomega to v1.29.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-25 19:29:22 +00:00
32ef2d7080 Merge pull request #20479 from ygalblum/quadlet-read-only
Quadlet - explicit support for read-only-tmpfs
2023-10-25 19:28:07 +00:00
c0fb8fe594 CI: try to fix more networking flakes
There's a whole slew of networking-related flakes whose common
element seems to be improper use of curl. Fix those by:

  * add --retry --retry-connrefused; and/or
  * add -S ("show errors". Plain -s silences everything!); and/or
  * test exit status from curl; and/or
  * add wait_for_port after "podman run -d", to avoid races
  * log commands, to make debugging easier

Important note: wait_for_port() was not working with rootless
podman ports. Trivial proof:

  $ podman run -d --name foo -p 8192:80 \
      quay.io/libpod/testimage:20221018 \
      /bin/busybox-extras httpd -f -p 80
  $ grep :2000 /proc/net/tcp
  [no results]

Solution: use ss tool; it seems to handle this just fine.
There may be a better solution.

Oh, also, add -t1 to a podman restart, to shave 18s from test run.

Fixes: #20335 and, I think, a handful of others

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-10-25 07:24:16 -06:00
556898511c Merge pull request #20481 from vrothberg/fix-20469
compat API: fix image-prune --all
2023-10-25 11:29:30 +00:00
c21f28813e fix: check wsl npipe when executing podman compose
Signed-off-by: lstocchi <lstocchi@redhat.com>
2023-10-25 13:28:10 +02:00
532804be54 Merge pull request #20482 from containers/renovate/golangci-golangci-lint-1.x
[CI:DOCS] Update dependency golangci/golangci-lint to v1.55.1
2023-10-25 11:26:21 +00:00
9ea1ed6d49 [CI:DOCS] Update dependency golangci/golangci-lint to v1.55.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-25 10:48:36 +00:00
151a01917c Merge pull request #20480 from ygalblum/makefile-user-control
Makefile - allow more control over Ginkgo parameters
2023-10-25 10:48:08 +00:00
76cca08f8a Quadlet - explicit support for read-only-tmpfs
Add Quadlet key and disconnect relationship withr read-only
Update and add tests
Update man with new key

Remove the reference to VolatileTmpfs in the man page to reduce its
usage, since the same functionality can be achieved using the Tmpfs key
while keeping its support to maintain backward compatibility

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-10-25 13:28:15 +03:00
c13b8e3c9c compat API: fix image-prune --all
Docker deals with the --all flag on the client side while Podman does it
on the server side.  Hence, make sure to not set the dangling filter
with two different values in the backend.

Fixes: #20469
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-10-25 10:58:00 +02:00
0e15861c59 Makefile - allow more control over Ginkgo parameters
Allow the user to control flake retry and color output
Update README

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-10-25 09:48:36 +03:00
242d223196 Merge pull request #20463 from vrothberg/RUN-1934
vendor c/{buildah,common}: appendable containers.conf strings, Part 1
2023-10-24 23:18:06 +00:00
ebe01ca292 Add e2e tests for farm build
Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-10-24 17:32:47 -04:00
989afd910e vendor c/{buildah,common}: appendable containers.conf strings, Part 1
This change is the first step of integrating appendable string arrays
into containers.conf and starts with enabling the `Env`, `Mounts`, and
`Volumes` fields in the `[Containers]` table.

Both, Buildah and Podman, read (and sometimes write) the fields of the
`Config` struct at various places, so I decided to migrate the fields
step-by-step.  The ones in this change are most critical ones for
customers.  Once all string slices/arrays are migrated, the docs of
containers.conf will be updated.  The current changes are entirely
transparent to users.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-10-24 20:33:36 +02:00
35121f67bf Merge pull request #20455 from rhatdan/play
Use buildah default isolation when working with podman play kube
2023-10-24 18:29:23 +00:00
dd8f57a3b4 Add podman farm build command
Add podman farm build command that sends out builds to
nodes defined in the farm, builds the images on the farm
nodes, and pulls them back to the local machine to create
a manifest list.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-10-24 12:58:39 -04:00
2e88d580a9 Add emulation package
Add emulation pkg to be used with farm build when
determining emulated platforms for the farm nodes.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-10-24 12:21:27 -04:00
06b7264977 Use buildah default isolation when working with podman play kube
Users can specify BUILDAH_ISOLATION environment variable to change the
default.

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

Currently podman play kube is defaulting to chroot, which is the least
safe version of build, we should always default to secure whenever
possible. Chroot should only be used when building within a container.

No great way to tests this.
[NO NEW TESTS NEEDED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-10-24 12:20:11 -04:00