Commit Graph

24622 Commits

Author SHA1 Message Date
openshift-merge-bot[bot] cd333458a8
Merge pull request #25190 from containers/renovate/golang.org-x-exp-digest
fix(deps): update golang.org/x/exp digest to e0ece0d
2025-02-03 21:33:15 +00:00
openshift-merge-bot[bot] c81625fd87
Merge pull request #25202 from l0rd/wsl-hardcode-network-config
Force use of iptables on Windows WSL
2025-02-03 20:40:56 +00:00
Paul Holzinger dcdf82e943
test/e2e: improve write/removeConf()
First use proper ginkgo error handling to ensure errors are actually
reported and fail the test. Mark it as helper function to have better
stack traces.

Then use a atomic write function to prevent issues with partial written
files. I think this is causing CI flakes[1].

Lastly fix the file permissions, do not make it world writable and do
not set the executable bit on the file.

[1] https://api.cirrus-ci.com/v1/artifact/task/5985244932734976/html/int-podman-fedora-41-root-host-sqlite.log.html#t--Podman-network-podman-network-ID-test--1

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-03 20:16:07 +01:00
openshift-merge-bot[bot] 61e36a3754
Merge pull request #25206 from Luap99/rpm-attr
rpm: add attr as dependency for podman-tests
2025-02-03 18:56:27 +00:00
openshift-merge-bot[bot] 3819dfb535
Merge pull request #25203 from Luap99/gvproxy-bump
update gvproxy version
2025-02-03 18:50:57 +00:00
openshift-merge-bot[bot] bd614324f9
Merge pull request #25207 from TomSweeneyRedHat/dev/tsweeney/buildah_1_39_0
Bump to Buildah v1.39.0
2025-02-03 18:45:27 +00:00
Brent Baude bc2763eac8 Add --noheading to artifact ls
like images and containers, it could be handy to have a --noheading
option that removes the headings on the output.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-02-03 10:50:46 -06:00
tomsweeneyredhat 35c72bb18e Bump to Buildah v1.39.0
Bump Buildah to v1.39.0 in the main branch.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-02-03 11:46:57 -05:00
Paul Holzinger 26b5864648
rpm: add attr as dependency for podman-tests
Since commit 06c103469d we are using getfattr in system tests, that
caused failures in gating tests[1] as getfattr was not installed. So add
attr as dependency.

[1] https://artifacts.dev.testing-farm.io/d93b6849-e526-46e9-a7c3-874bad4217a9/work-tests.yml8_p4nfkf/tests-n75vnz0u/test.podman-root.bats.log

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-03 17:41:35 +01:00
Matt Heon 06fa617f61 Lock pod while starting and stopping containers
The intention behind this is to stop races between
`pod stop|start` and `container stop|start` being run at the same
time. This could result in containers with no working network
(they join the still-running infra container's netns, which is
then torn down as the infra container is stopped, leaving the
container in an otherwise unused, nonfunctional, orphan netns.

Locking the pod (if present) in the public container start and
stop APIs should be sufficient to stop this.

Signed-off-by: Matt Heon <mheon@redhat.com>
2025-02-03 11:19:20 -05:00
Paul Holzinger 89283c6fcc
update gvproxy version
The current macos installer gvproxy version has a number of issues
around dns handling[1,2]. They should be fixed now in 0.8.3 as they
reverted the dns changes back to the 0.7.5 code. This should make it
work like it used to be. Our 5.3.2 installer ships the 0.7.5 version so
users of the podman installer never noticed that but we got plenty of
reports from brew users. This needs to be backported into v5.4 to make
sure we do not ship the broken version as part of the installer.

[1] https://github.com/containers/gvisor-tap-vsock/issues/462
[2] https://github.com/containers/gvisor-tap-vsock/issues/466

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-03 15:54:34 +01:00
Mario Loriedo dae1541529 Force use of iptables on Windows WSL
This is a workaround for #25201 and helps with
upgrading the WSL image to Fedora 41.

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-02-03 14:39:47 +01:00
openshift-merge-bot[bot] e300f5caa1
Merge pull request #25188 from containers/renovate/github.com-vishvananda-netlink-digest
fix(deps): update github.com/vishvananda/netlink digest to 7c2350b
2025-02-03 12:07:43 +00:00
openshift-merge-bot[bot] e6a35234ce
Merge pull request #25186 from TomSweeneyRedHat/dev/tsweeney/common_0_62_0
Bump c/storage to v1.57.1, c/image v5.34.0, c/common v0.62.0
2025-02-03 10:19:43 +00:00
openshift-merge-bot[bot] 54fd9bcc51
Merge pull request #25181 from Luap99/new-images
new images 2025-01-31
2025-02-03 01:52:43 +00:00
openshift-merge-bot[bot] 7afb601bd8
Merge pull request #25180 from Luap99/local-exec-detach
podman exec: correctly support detaching
2025-02-03 01:49:58 +00:00
renovate[bot] 509c80d5bd
fix(deps): update golang.org/x/exp digest to e0ece0d
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-01 05:07:10 +00:00
renovate[bot] 400645bf10
fix(deps): update github.com/vishvananda/netlink digest to 7c2350b
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-01 01:21:28 +00:00
tomsweeneyredhat 211d3ea3cf Bump c/storage to v1.57.1, c/image v5.34.0, c/common v0.62.0
If not already bumped, this will bump:

c/storage v1.57.1
c/image v5.34.0
c/common v0.62.0

in preparation for Podman v5.4 and beyond.

Buildah will be vendored in a separate PR.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-01-31 18:30:53 -05:00
openshift-merge-bot[bot] b06d78651a
Merge pull request #25182 from baude/artifactnotrunc
Add --no-trunc to artifact ls
2025-01-31 23:30:30 +00:00
Brent Baude d575ae12f8 Add --no-trunc to artifact ls
added a --no-trunc flag to artifact ls, which follows what images has
done.  by default now, the ls output will have the shortened 12
character digest.  the --no-trunc will output the full digest.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-01-31 16:19:18 -06:00
openshift-merge-bot[bot] c131c9d038
Merge pull request #25170 from baude/artifactoptions
Add type and annotations to artifact add
2025-01-31 17:19:18 +00:00
openshift-merge-bot[bot] e83c0c4de1
Merge pull request #24748 from lsm5/no-qemu-centos
[skip-ci] RPM: no qemu on RHEL
2025-01-31 17:08:18 +00:00
Brent Baude bd061aa2d5 Add type and annotations to artifact add
podman artifact add now supports two new command line switches.

--type string that describes the type of artifact
--annotation string slice in the form of key=val

These new options allow users to "tag" information in on their artifacts
for any number of purposes down the line

RUN-2446

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-01-31 09:53:03 -06:00
openshift-merge-bot[bot] a92340956c
Merge pull request #25171 from giuseppe/pass-device-requests-to-cli
pkg/api: honor cdi devices from the hostconfig
2025-01-31 15:21:00 +00:00
Paul Holzinger 4a0006db33
cirrus: ensure HOME is set in postbuild.sh
go 1.24 on rawhide starts to fail with:
go: could not parse netrc (GOAUTH=netrc): $HOME is not defined

GOAUTH is a new go 1.24 feature, and someone this started to require a
$HOME set. We should have $HOME set already in many places but because
the lib.sh script was not loaded here it was not set.

We have GOPATH set AFAICT otherwise go would never have worked without
$HOME.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-01-31 16:05:39 +01:00
Giuseppe Scrivano 18e29076f7
pkg/api: honor cdi devices from the hostconfig
pass down the devices specifies in the resources block so that CDI
devices in the compose file are honored.

Tested manually with the following compose file:

services:
  testgpupodman_count:
    image: ubuntu:latest
    command: ["nvidia-smi"]
    profiles: [gpu]
    deploy:
      resources:
        reservations:
          devices:
          - driver: nvidia
            count: 1
            capabilities: [gpu]
  testgpupodman_deviceid:
      image: docker.io/ubuntu:latest
      command: ["nvidia-smi"]
      deploy:
        resources:
          reservations:
            devices:
            - driver: cdi
              device_ids: ['nvidia.com/gpu=all']
              capabilities: [gpu]

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-01-31 15:26:09 +01:00
Paul Holzinger 1c0f5b0475
new images 2025-01-31
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-01-31 14:51:27 +01:00
Paul Holzinger f0ef791808
podman exec: correctly support detaching
podman exec support detaching early via the detach key sequence. In that
case the podman process should exit successfully but the container exec
process keeps running.

Now I wrote automated test for both podman run and exec detach but this
uncovered several larger issues:
 - detach sequence parsing is broken[1]
 - podman-remote exec detach is broken[2]
 - detach in general seems to be buggy/racy, seeing lot of flakes that
   fail to restore the terminal and get an EIO instead, i.e.
   "Unable to restore terminal: input/output error"

Thus I cannot add tests for now but this commit should at least fix the
obvoius case as reported by the user so I like to get this in regardless
and I will work through the other issues once I have more time.

Fixes #24895

[1] https://github.com/containers/common/pull/2302
[2] https://github.com/containers/podman/issues/25089

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-01-31 13:29:04 +01:00
Paul Holzinger 3eb0e1e8ac
libpod: remove unused ExecStartAndAttach()
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-01-31 13:28:01 +01:00
Lokesh Mandvekar be6fa68296
[skip-ci] RPM: include empty check to silence rpmlint
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-01-31 17:15:17 +05:30
Lokesh Mandvekar e2eb8e4a86
[skip-ci] RPM: adjust qemu dependencies
We only need qemu-system-[x86|aarch64]-core based on the architecture
along with qemu-img. So, there's no need to pull in all of qemu.

The qemu-system-[x86|aarch64]-core packages are not present on CentOS
Stream and RHEL, so we use qemu-kvm there instead.

Ref: https://github.com/containers/podman/pull/24369/files#r1883658262

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-01-31 17:14:07 +05:30
Ashley Cui d3706bcad1 Add BuildOrigin field to podman info
BuildOrigin is a field that can be set at build time by packagers. This helps us trace how and where the binary was built and installed from, allowing us to see if the issue is due to a specfic installation or a general podman bug. This field shows up in podman version and in podman info when populated. Note that podman info has a new field, Client, that only appears when running podman info using the remote client.

Automatically set the BuildOrigin field when building the macOS pkginstaller to pkginstaller.

Usage: make podman-remote BUILD_ORIGIN="mypackaging"

Signed-off-by: Ashley Cui <acui@redhat.com>
2025-01-30 14:48:30 -05:00
openshift-merge-bot[bot] 48f8742278
Merge pull request #25155 from baude/movedetect
Move detection of libkrun and intel
2025-01-30 15:37:07 +00:00
openshift-merge-bot[bot] 357fd2546e
Merge pull request #25159 from containers/renovate/github.com-spf13-pflag-1.x
fix(deps): update module github.com/spf13/pflag to v1.0.6
2025-01-30 15:28:51 +00:00
openshift-merge-bot[bot] be5d807b62
Merge pull request #25164 from giuseppe/replace-walk
util: replace Walk with WalkDir
2025-01-30 13:36:06 +00:00
openshift-merge-bot[bot] 787da60fcc
Merge pull request #25128 from Honny1/hc-timer
Remove timer for HealthCheck when container is paused
2025-01-30 13:16:51 +00:00
openshift-merge-bot[bot] 4fdd00e8cd
Merge pull request #25049 from FedeDP/fix/get_cmd_line_args_memleak
fix(pkg/rootless): avoid memleak during init() contructor
2025-01-30 13:08:39 +00:00
openshift-merge-bot[bot] 96d47dcc91
Merge pull request #25139 from baude/issue25112
Prevent  multiple machines running on different providers on darwin
2025-01-30 11:18:31 +00:00
Federico Di Pierro 51fd6e906c fix(pkg/rootless): avoid memleak during init() contructor.
`argv[0]`, ie: the full buffer allocated by `get_cmd_line_args`,
was going to be freed only if `can_use_shortcut()` was called.
Instead, let `init()` always manage `argv0` lifecycle.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2025-01-30 12:11:42 +01:00
Giuseppe Scrivano 1f3182009a
util: replace Walk with WalkDir
Closes: https://github.com/containers/podman/issues/25163

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-01-30 11:53:34 +01:00
Brent Baude 398377fd97 Move detection of libkrun and intel
A review comment post merge suggested I move the detection of libkrun and intel into the provider.Get()

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-01-29 13:26:45 -06:00
Brent Baude 4eeaedfe13 Prevent two podman machines running on darwin
As issue #25112 points out, it was possible to start a machine on one of the darwin providers and then switch providers and start another one with a different name.  This PR firstly prevents that use which is a forbidden use case.

Secondarily, performed some minor cleanup on the error messages being used so that the error would be specific to this condition.

This bug fix is for darwin only.  In the case of Windows, we probably need to answer the question I raised in #24067 first, which is whether we want to stop allowing WSL to run multiple machines.

Fixes #25112

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-01-29 13:24:18 -06:00
renovate[bot] 27386be189
fix(deps): update module github.com/spf13/pflag to v1.0.6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-29 19:02:56 +00:00
Brent Baude e893747cf3 Remove unnecessary error handling
A function in the reset code does not return an error.  Simply removing the error variable and check for the condition (which was always false or nil)

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-01-29 12:12:17 -06:00
Brent Baude c0aab0a85a Remove usused Kind() function
The Kind() exported function is unused in our code; moreover, the function cannot be accurate because in the case of darwin, applehv and libkrun use the same config in the struct and therefore, we cannot identify the provider via that method.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-01-29 12:12:17 -06:00
openshift-merge-bot[bot] c285c7220f
Merge pull request #25151 from l0rd/fix-evalsymlink-windows-option3
Safer use of `filepath.EvalSymlinks()` on Windows
2025-01-29 14:36:53 +00:00
Jan Rodák 511c8b249d
Remove timer for HealthCheck when container is paused.
If is unpaused then new timer for  HealthCheck is created.

Fixes: https://issues.redhat.com/browse/RUN-2468

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-01-29 13:34:26 +01:00
Mario Loriedo 513b4aaceb Safer use of `filepath.EvalSymlinks()` on Windows
The behavior of function `path/filepath.EvalSymlinks()` has
changed in Go v1.23:

- https://go-review.googlesource.com/c/go/+/565136
- https://go.dev/doc/go1.23#minor_library_changes
- https://tip.golang.org/doc/godebug

As a consequences, starting with Podman 5.3.0, when installing
on Windows (WSL) using scoop, Podman fails to start because it
fails to find helper binaries. Scoop copies Podman binaries in
a folder of type Junction and `EvalSymlinks` returns an error.
The problem is described in #24557.

To address this problem we are checking if a path is a `Symlink`
before calling `EvalSymlinks` and, if it's not (hardlinks, mount
points or canonical files), we are calling `path/filepath.Clean`
for consistency. In fact `path/filepath.EvalSymlinks`, after
evaluating a symlink target, calls `Clean` too.

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2025-01-29 13:15:53 +01:00
openshift-merge-bot[bot] ee24214cb9
Merge pull request #25123 from containers/renovate/google.golang.org-protobuf-1.x
fix(deps): update module google.golang.org/protobuf to v1.36.4
2025-01-29 10:26:38 +00:00