6923 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
b4ef95590b Merge pull request #24868 from rhatdan/kube
Kube volumes can not contain _
2025-01-07 01:23:05 +00:00
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
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
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
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
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
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
0642bb1c25 Merge pull request #24861 from Luap99/debian-fixes
Some debian test fixes
2024-12-19 11:42:58 +00:00
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
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
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
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
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
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
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
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
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
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
ff9d4e72b0 test: enable newly added test
follow-up for commit 64e94efb95e099db93ee8a28735549268490190f

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-12-14 01:54:24 +01:00
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
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
e6d8603136 test/e2e: SkipOnOSVersion() add reason field
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-12-12 15:14:57 +01:00
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
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
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
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
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
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
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
45ac4e2383 Merge pull request #24731 from l0rd/additionalimagestores
Fix additional image stores in podman info
2024-12-03 14:15:08 +00:00
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
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
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
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
6f85808707 Clarify the reason for skip_if_remote
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-11-27 21:26:11 +01:00
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
5ff496ea2b Fix apparent typos in zstd:chunked tests
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-11-27 19:56:48 +01:00
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