Commit Graph

6961 Commits

Author SHA1 Message Date
Paul Holzinger 6c06577455
artifact: only allow single manifest
Allowing for multiple manifest per artifact just makes the code and cli
design harder to work with it. It is not clear how mounting, extracting
or edit on a multi manifest artifact should have worked.

A single manifest should make the code much easier to work with.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-04 12:17:24 +01: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
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
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
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
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
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
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
renovate[bot] 14cd6ff1d2
chore(deps): update dependency pytest to v8.3.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-28 14:32:40 +00:00
openshift-merge-bot[bot] dedbea55fb
Merge pull request #25130 from Luap99/vendor
vendor latest c/{buildah,common,image,storage}
2025-01-28 10:24:23 +00:00
Paul Holzinger 97323a691a
test/buildah-bud: skip two new problematic tests on remote
They are new and failing on remote, needs to be looked at (#25138)
For now skip them so we can have a proper buildah vendored for rc2.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-01-27 20:04:52 +01:00
openshift-merge-bot[bot] eea2866a09
Merge pull request #25133 from lsm5/rawhide-selinux-system-test
system-tests: switch ls with getfattr for selinux tests
2025-01-27 19:04:05 +00:00
openshift-merge-bot[bot] 8d65d1e9e2
Merge pull request #25102 from Honny1/prune
Clean up after unexpectedly terminated build
2025-01-27 16:52:06 +00:00
openshift-merge-bot[bot] 9403c3d98d
Merge pull request #24678 from rhatdan/manifest
Add podman manifest rm --ignore
2025-01-27 14:52:05 +00:00
Jan Rodák 81eb84fdaa
Clean up after unexpectedly terminated build
The `podman system prune` command is able to remove build containers that were created during the build, but were not removed because the build terminated unexpectedly.

By default, build containers are not removed to prevent interference with builds in progress. Use the **--build** flag when running the command to remove build containers as well.

Fixes: https://issues.redhat.com/browse/RHEL-62009

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-01-27 14:21:27 +01:00
Lokesh Mandvekar 06c103469d
system-tests: switch ls with getfattr for selinux tests
The test `podman selinux: check unsupported relabel` has been failing
recently on Fedora rawhide.

This is due to a regression in the `ls` command itself. Workaround for
now is to switch to `getfattr -n security.selinux ...`.

Ref: https://github.com/containers/podman/issues/25132#issuecomment-2615744915

Fixes: #25132

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2025-01-27 18:40:43 +05:30
openshift-merge-bot[bot] da8db52fc3
Merge pull request #25092 from Luap99/api-create-command
do not set the CreateCommand for API users
2025-01-23 15:45:35 +00:00
openshift-merge-bot[bot] c8fc73e19c
Merge pull request #25097 from mtrmac/PodmanOptions
Refactor Podman E2E helpers to allow passing/adding more options to the low-level executor
2025-01-23 10:20:25 +00:00
Miloslav Trmač 4bdb947d72 Define, and use, PodmanExitCleanlyWithOptions
This is a generalization of PodmanExitCleanly, scalable
to an arbitrary number of possible options.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-01-23 01:10:31 +01:00
Miloslav Trmač df9e8c3ce6 Eliminate PodmanSystemdScope
It seems this utility is not all that generally useful,
so eliminate it from the global namespace and use
PodmanWithOptions directly.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-01-23 01:10:18 +01:00
Miloslav Trmač 7c40e85968 Fix image ID query
Read the full one, not the truncated one

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-01-23 00:11:24 +01:00
Miloslav Trmač 11ee6c4f90 Revert "Use the config digest to compare images loaded/pulled using different methods"
This reverts commit 1d7ec1ef5f.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-01-23 00:11:24 +01:00
Miloslav Trmač f20d9bd637 Update expected errors when pulling encrypted images
https://github.com/containers/image/issues/2646 will track actually
returning a meaningful error instead of these internal details.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-01-23 00:11:24 +01:00
Miloslav Trmač 9363c8c362 Eliminate PodmanExtraFiles
Instaed, inline the implementation into callers, calling
PodmanWithOptions directly, demonstrating how to use
PodmanWithOptions.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-01-23 00:04:05 +01:00
Miloslav Trmač 44c5767460 Introduce PodmanTestIntegration.PodmanWithOptions
... and, to an extent, centralize the PodmanSessionIntegration
creation in that function.

This reduces duplication, and we will further eliminate
some of the callers.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-01-23 00:04:02 +01:00
Miloslav Trmač ce1b4f72a7 Restructure use of options
Pass exactly the same PodmanExecOptions to makeOptions
and to PodmanExecBaseWithOptions.  This will allow
simplifying the code further.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-01-23 00:03:58 +01:00
Miloslav Trmač d509bb0823 Inline PodmanBase into callers
Eliminate this helper / indirection, and pass around
PodmanExecOptions explicitly.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-01-23 00:03:56 +01:00
Miloslav Trmač f17590b2bd Pass all of PodmanExecOptions to various [mM]akeOptions functions
This will make it easier to structure the API, at the cost
of making it a bit more opaque about which parts of PodmanExecOptions
are implemented where.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-01-23 00:03:52 +01:00
Miloslav Trmač f2d552f5db Turn PodmanAsUserBase into PodmanExecBaseWithOptions
... replacing the many parameters with a struct with named fields.

This makes the meaning of parameters more explicit, and more importantly
it makes it easier to just edit _one_ of the parameters without requiring
specialized wrappers for every single case.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-01-23 00:03:42 +01:00
Paul Holzinger 5522def65a
do not set the CreateCommand for API users
This should be set only by podman as it is used for the podman generate
systemd --new command. For the api it was set to the system service
command which is simply pointless. It must be empty in these cases.

Fixes #25026

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-01-22 19:13:08 +01:00
Daniel J Walsh 5181becfde
Add podman manifest rm --ignore
When removing manifests, users should be allowed to ignore
ones that no longer exists.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-01-22 11:43:47 -05:00
Brent Baude d7553fabc7 podman artifact
the podman artifact verb is used to manage OCI artifacts.  the following
verbs were added to `podman artifact`:

* add
* inspect
* ls
* pull
* push
* rm

Notable items with this PR:

* all artifact commands and their output are subject to change. i.e.
  consider all of this tech preview
* there is no way to add a file to an artifact that already exists in
  the store.  you would need to delete and recreate the artifact.
* all references to artifacts names should be fully qualified names in
  the form of repo/name:tag (i.e. quay.io/artifact/foobar:latest)
* i understand that we will likely want to be able to attribute things
  like arch, etc to artifact files.  this function is not available yet.

Many thanks to Paul Holzinger for autocompletion PRs and review PRs that
fixed issues early on.

Also fix up some Args function to specify the correct number of args.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: Brent Baude <bbaude@redhat.com>
2025-01-21 12:47:30 -06:00
Florian Apolloner 805e78c2aa Set network ID if available during container inspect
Fixes #24910

Signed-off-by: Florian Apolloner <florian@apolloner.eu>
2025-01-20 15:55:26 +01:00
Daniel J Walsh 6ad44fe179
Replace instances of PodmanExitCleanly in play_kube_test.go
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-01-15 16:12:02 -05:00
Daniel J Walsh 6565bde6e8
Add --no-hostname option
Fixes: https://github.com/containers/podman/issues/25002

Also add the ability to inspect containers for
UseImageHosts and UseImageHostname.

Finally fixed some bugs in handling of --no-hosts for Pods,
which I descovered.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-01-15 06:51:32 -05:00
openshift-merge-bot[bot] 04e6488315
Merge pull request #25011 from AhmedMoalla/fix-wrongly-ported-cunescape_one
Fix unescaping octal escape sequence in values of Quadlet unit files
2025-01-15 11:44:56 +00:00
Ahmed Moalla 68f29df602 Fix unescaping octal escape sequence in values of Quadlet unit files
Signed-off-by: Ahmed Moalla <ahmed.moalla@gmail.com>
2025-01-14 23:21:47 +01:00
openshift-merge-bot[bot] 9f1fee2a0b
Merge pull request #24987 from AhmedMoalla/fix-comment-char-in-quadlet-unit-file
add support to ; for comments in unit files as per systemd documentation
2025-01-13 17:15:37 +00:00
Ahmed Moalla 75b4a1b2aa add support to `;` for comments in unit files as per systemd documentation
Signed-off-by: Ahmed Moalla <ahmed.moalla@gmail.com>
2025-01-13 14:20:24 +01:00
Miloslav Trmač de1aa44cc9 Use PodmanExitCleanly in attach_test.go
just as a demonstration.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-01-09 18:47:37 +01:00
Miloslav Trmač 0c18beaea7 Introduce PodmanTestIntegration.PodmanExitCleanly
This significantly simplifies the ceromony of running a Podman command
in integration tests, from

> session := p.Podman([]string{"stop", id})
> session.WaitWithDefaultTimeout()
> Expect(session).Should(ExitCleanly())

to
> p.PodmanExitCleanly("stop", id)

There are >4650 instances of ExitCleanly() in the tests,
and many could be migrated; this does not do that.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-01-09 18:47:26 +01:00
renovate[bot] ba24512959
chore(deps): update dependency setuptools to ~=75.8.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-08 21:35:30 +00:00
openshift-merge-bot[bot] 2e1e7107b7
Merge pull request #24882 from giuseppe/keep-id-size
namespaces: allow configuring keep-id userns size
2025-01-08 18:29:05 +00:00
openshift-merge-bot[bot] 0798f54e94
Merge pull request #24655 from mheon/fix_volume_perms_cp
Mount volumes before copying into a container
2025-01-08 14:51:46 +00:00
openshift-merge-bot[bot] 164a47ec9e
Merge pull request #24973 from containers/renovate/golang.org-x-tools-0.x
fix(deps): update module golang.org/x/tools to v0.29.0
2025-01-08 13:07:15 +00:00
renovate[bot] fca64e5429
fix(deps): update module golang.org/x/tools to v0.29.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-08 12:13:19 +00:00
Erik Sjölund 806722b3d6
specgenutil: Fix parsing of mount option ptmxmode
Fix typo: ptxmode -> ptmxmode

Reference: https://github.com/containers/podman/discussions/24921

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2025-01-08 11:52:11 +01:00
Giuseppe Scrivano b0b1d19723
namespaces: allow configuring keep-id userns size
Introduce a new option "size" to configure the maximum size of the
user namespace configured by keep-id.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2025-01-08 10:08:29 +01:00
renovate[bot] b23349d3bd
chore(deps): update dependency setuptools to ~=75.7.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-07 14:02:54 +00:00
openshift-merge-bot[bot] b4ef95590b
Merge pull request #24868 from rhatdan/kube
Kube volumes can not contain _
2025-01-07 01:23:05 +00:00
openshift-merge-bot[bot] e79686ee12
Merge pull request #24675 from gtjoseph/main-pass-hostname-to-netavark
Pass container hostname to netavark
2025-01-06 17:20:07 +00:00
openshift-merge-bot[bot] 7786378e06
Merge pull request #24899 from Odilhao/pod-shm-size-issue
Add support to ShmSize in Pods with Quadlet
2025-01-06 16:09:49 +00:00
George Joseph 6fa234a5de Pass container hostname to netavark
Passing the hostname allows netavark to include it in DHCP lease
requests which, in an environment where DDNS is used, can cause
DNS entries to be created automatically.

* The current Hostname() function in container.go was updated to
check the new `container_name_as_hostname` option in the
CONTAINERS table of containers.conf.  If set and no hostname
was configured for the container, it causes the hostname to be
set to a version of the container's name with the characters not
valid for a hostname removed.  If not set (the default), the original
behavior of setting the hostname to the short container ID is
preserved.

* Because the Hostname() function can return the host's hostname
if the container isn't running in a private UTS namespace, and we'd
NEVER want to send _that_ in a DHCP request for a container, a new
function NetworkHostname() was added which functions like Hostname()
except that it will return an empty string instead of the host's
hostname if the container is not running in a private UTS namespace.

* networking_common.getNetworkOptions() now uses NetworkHostname()
to set the ContainerHostname member of the NetworkOptions structure.
That member was added to the structure in a corresponding commit in
common/libnetwork/types/network.go.

* Added test to containers_conf_test.go

Signed-off-by: George Joseph <g.devel@wxy78.net>
2025-01-06 07:09:12 -07:00
Odilon Sousa d1a3f96cbf Add support to ShmSize in Pods with Quadlet
This closes #22915

Signed-off-by: Odilon Sousa <osousa@redhat.com>
2024-12-30 12:33:00 -03:00
renovate[bot] de829251fc
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.22.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-23 15:02:22 +00:00
openshift-merge-bot[bot] 2af27b15fe
Merge pull request #24862 from containers/renovate/go-golang.org-x-crypto-vulnerability
chore(deps): update module golang.org/x/crypto to v0.31.0 [security]
2024-12-23 14:59:20 +00:00
openshift-merge-bot[bot] 0642bb1c25
Merge pull request #24861 from Luap99/debian-fixes
Some debian test fixes
2024-12-19 11:42:58 +00:00
renovate[bot] 29c29e215f
chore(deps): update module golang.org/x/crypto to v0.31.0 [security]
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-19 11:42:36 +00:00
openshift-merge-bot[bot] 7ba410aa76
Merge pull request #24760 from Honny1/fix-major-minor-nums
Fix device limitations in `podman-remote update` on remote systems
2024-12-18 14:15:11 +00:00
Daniel J Walsh ecd882f9f7
Kube volumes can not container _
Need to substiture all _ to - for k8s support.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-12-18 09:07:57 -05:00
openshift-merge-bot[bot] 08363250ce
Merge pull request #24852 from rhatdan/kube
When generating host volumes for k8s, force to lowercase
2024-12-18 01:32:48 +00:00
Paul Holzinger f2f6eb88e9 test/system: fix "podman play --build private registry" error
When running this test on a system without unqualifiedsearch registries
it will fail with a different error causing the test to fail. to avoid
that case define our own registries.conf that defines quay.io as
registry. This should make the test pass in the debian env.

Signed-off-by: Paul Holzinger <git@holzinger.dev>
2024-12-17 17:20:28 +01:00
Paul Holzinger 23d4908c8b test/system: CopyDirectory() do not chown files
If the source dir is owned by another user then the test the chown will
fail assuming we run the tests rootless. This function is only used by
the quadlet tests and for the purpose all we need is to read the files
so the simple fix is remove the chown as this should make the tests pass
on the special debian gating env.

Fixes #24802

Signed-off-by: Paul Holzinger <git@holzinger.dev>
2024-12-17 17:05:47 +01:00
Paul Holzinger 8729725684 test/system: remove system dial-stdio test
This test a pretty much useless, it checks that a connection attempt on
the default socket fails. But this is incorrect as the socket is outside
of the test control as such it might be ready to accept connections as
thus the test can fail locally or as reported here in the debian tests.

Given that a simple connection fails does not add any value I opted to
remove it.

Fixes #24803

Signed-off-by: Paul Holzinger <git@holzinger.dev>
2024-12-17 17:04:17 +01:00
Paul Holzinger 153a975888 shell completion: respect CONTAINERS_REGISTRIES_CONF
Found in debian testing where by default there are no unqualified search
registries installed. As such the test failed as the FIXME said. Now
there is no need for the test to assume anything.

Instead set our own config via CONTAINERS_REGISTRIES_CONF then we can
do exact matches, except that env was not read in the shell completion
code so move some code around to make it read the var in the same way as
podman login/logout.

Signed-off-by: Paul Holzinger <git@holzinger.dev>
2024-12-17 16:29:40 +01:00
renovate[bot] 10d65f30b6
fix(deps): update module github.com/cpuguy83/go-md2man/v2 to v2.0.6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-16 18:11:07 +00:00
Daniel J Walsh 8b23e6d408
When generating host volumes for k8s, force to lowercase
Fixes: https://github.com/containers/podman/issues/16542

Kubernetes only allows lower case persistent volume names.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-12-16 11:22:22 -05:00
Giuseppe Scrivano ff9d4e72b0
test: enable newly added test
follow-up for commit 64e94efb95

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-12-14 01:54:24 +01:00
openshift-merge-bot[bot] 3cffc6bcaf
Merge pull request #24825 from giuseppe/simplify-systemd-parser
systemd: simplify parser and fix infinite loop
2024-12-13 18:47:03 +00:00
Giuseppe Scrivano 64e94efb95
systemd: simplify parser and fix infinite loop
This commit simplifies the systemd parser logic, and it solves an
infinite loop when using a continuation line.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-12-12 20:45:23 +01:00
Paul Holzinger e6d8603136
test/e2e: SkipOnOSVersion() add reason field
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-12-12 15:14:57 +01:00
Paul Holzinger e74df8c35a
test/e2e: remove outdated SkipOnOSVersion() calls
Both of them are for fedora 36 which is long EOL and thus not run in our
CI.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-12-12 15:14:57 +01:00
openshift-merge-bot[bot] b60df61c3f
Merge pull request #24794 from ruihe774/fix-quadlet-container-network
quadlet: fix inter-dependency of containers in `Network=`
2024-12-11 16:54:42 +00:00
Misaki Kasumi cf505fe788 quadlet: fix inter-dependency of containers in `Network=`
Signed-off-by: Misaki Kasumi <misakikasumi@outlook.com>
2024-12-11 08:33:37 +08:00
Jan Rodák 2f31a61cce
Fix device limitations in podman-remote update on remote systems
Fixes: https://issues.redhat.com/browse/RUN-2381

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2024-12-09 17:35:56 +01:00
Nalin Dahyabhai 8f45474809 Fix panic in `manifest annotate --index`
When the --index flag is used, `manifest annotate` shouldn't be
expecting a second non-flag argument.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2024-12-06 15:31:01 -05:00
renovate[bot] 2c17ffa54d
fix(deps): update module golang.org/x/tools to v0.28.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-05 11:35:04 +00:00
Jan Rodák 8f1266c717
Fix overwriting of LinuxResources structure in the database
with defaults values when changes configuration with podman update.

The new LinuxResource structure does not represent the current unchanged configuration, which was not affected by the change.

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

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2024-12-04 13:16:32 +01:00
openshift-merge-bot[bot] 45ac4e2383
Merge pull request #24731 from l0rd/additionalimagestores
Fix additional image stores in podman info
2024-12-03 14:15:08 +00:00
Mario Loriedo 0d3a653c30 Fix `podman info` with multiple imagestores
The command `podman info` returned only one imagestore in
`store.graphOptions.<driver>.imagestore` even if multiple
image stores were configured.

This change replaces the field `<driver>.imagestore` with
the field `<driver>.additionalImageStores`, that instead
of a string is an array of strings and that includes all
the configured additional image stores.

Fix https://github.com/containers/storage/issues/2094

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2024-12-02 15:37:16 +00:00
James Hewitt 48ae52c08b
Add a test for forcing compression and v2s2 format
This highlights a bug in common where the compression format is reset if the format is v2s2, even if its a valid compression format.

Signed-off-by: James Hewitt <james.hewitt@uk.ibm.com>
2024-11-29 12:40:49 +00:00
openshift-merge-bot[bot] b3c02684fd
Merge pull request #24701 from giuseppe/stats-ignore-no-cgroups
stats: ignore errors from containers without cgroups
2024-11-28 15:08:08 +00:00
Giuseppe Scrivano 6673f5c202
stats: ignore errors from containers without cgroups
Now `podman stats --all` ignores failures from a container that has no
cgroups.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-11-28 15:19:04 +01:00
Miloslav Trmač 6f85808707 Clarify the reason for skip_if_remote
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-11-27 21:26:11 +01:00
Miloslav Trmač 39e08c3ffa Sanity-check that the test is really using partial pulls
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-11-27 21:26:11 +01:00
Miloslav Trmač 5ff496ea2b Fix apparent typos in zstd:chunked tests
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-11-27 19:56:48 +01:00
Matthew Heon e66b788a51 Mount volumes before copying into a container
This solves several problems with copying into volumes on a
container that is not running.

The first, and most obvious, is that we were previously entirely
unable to copy into a volume that required mounting - like
image volumes, volume plugins, and volumes that specified mount
options.

The second is that this fixed several permissions and content
issues with a fresh volume and a container that has not been run
before. A copy-up will not have occurred, so permissions on the
volume root will not have been set and content will not have been
copied into the volume.

If the container is running, this is very low cost - we maintain
a mount counter for named volumes, so it's just an increment in
the DB if the volume actually needs mounting, and a no-op if it
doesn't.

Unfortunately, we also have to fix permissions, and that is
rather more complicated. This involves an ugly set of manual
edits to the volume state to ensure that the permissions fixes
actually worked, as the code was never meant to be used in this
way. It's really ugly, but necessary to reach full Docker
compatibility.

Fixes #24405

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2024-11-27 08:09:50 -05:00
Gavin Lam 4f7395f93a
Add --hosts-file flag to container and pod commands
* Add --hosts-file flag to container create, container run and pod create
* Add HostsFile field to pod inspect and container inspect results
* Test BaseHostsFile config in containers.conf

Signed-off-by: Gavin Lam <gavin.oss@tutamail.com>
2024-11-24 22:00:34 -05:00
Gavin Lam dc564257a2
Add nohosts option to /build and /libpod/build
Signed-off-by: Gavin Lam <gavin.oss@tutamail.com>
2024-11-24 22:00:31 -05:00
Ygal Blum 13affe96d6 Quadlet - Use = sign when setting the pull arg for build
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2024-11-22 15:06:50 -05:00
openshift-merge-bot[bot] d85ac938e6
Merge pull request #24442 from Honny1/change-healthcheck-config-via-podman-update
Configure HealthCheck with `podman update`
2024-11-22 15:57:30 +00:00
openshift-merge-bot[bot] 60ddddcf44
Merge pull request #24635 from containers/renovate/github.com-onsi-ginkgo-v2-2.x
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.22.0
2024-11-21 10:04:20 +00:00
renovate[bot] 34d63459ba
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.22.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-21 04:19:54 +00:00
renovate[bot] 3096681ce3
chore(deps): update dependency setuptools to ~=75.6.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-20 20:27:53 +00:00
Jan Rodák a1249425bd
Configure HealthCheck with `podman update`
New flags in a `podman update` can change the configuration of HealthCheck when the container is started, without having to restart or recreate the container.

This can help determine why a given container suddenly started failing HealthCheck without interfering with the services it provides. For example, reconfigure HealthCheck to keep logs longer than the usual last X results, store logs to other destinations, etc.

Fixes: https://issues.redhat.com/browse/RHEL-60561

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2024-11-19 19:44:14 +01:00
Ed Santiago 97ed067d1a CI: --image-volume test: robustify
Test is failing on 1mt because of differences between 'stat'
command output and /proc/mounts. Solution: compare stat %t
(hex filesystem type), not %T (human-readable). This should
match no matter what kernel version or version of stat on
host/container.

Fixes: #24611

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-11-19 10:03:55 -07:00
Matt Heon 61b57b7d7d Overlay mounts supersede image volumes & volumes-from
This matches the behavior of other volume and mount types. Image
volumes and volumes/mounts from the `--volumes-from` flag should
be overridden by actual user-specified named volumes and mounts,
but this was not true for overlay mounts. Fortunately, our
duplicate-mount detection logic still works, so we got a good
error message at least.

The fix is simple - extend our supersede logic, which currently
only works with named volumes and mounts, to also work with
overlay mounts.

Fixes #24555

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-11-15 08:26:16 -05:00
openshift-merge-bot[bot] fa5e3b6e94
Merge pull request #24535 from M1cha/network-driver-options
add support for driver-specific options during container creation
2024-11-14 09:29:44 +00:00
openshift-merge-bot[bot] ecaf9bf515
Merge pull request #24525 from Luap99/lint
update golangci-lint to v1.62.0
2024-11-13 21:47:38 +00:00