Commit Graph

24002 Commits

Author SHA1 Message Date
Zachary Hanham
feb46513f0 scp: add option types
Prior to this commit, many scp functions existed without option structs, which would make extending functionality (adding new options) impossible without breaking changes, or without adding redundant wrapper functions.

This commit adds in new option types for various scp related functions, and changes those functions' signatures to use the new options.

This commit also modifies the `ImageEngine.Scp()` function's interface to use the new opts.

The commit also renames the existing `ImageScpOptions` entity type to `ScpTransferImageOptions`. This is because the previous `ImageScpOptions` was inaccurate, as it is not the actual options for `ImageEngine.Scp()`. `ImageEngine.Scp()` should instead receive `ImageScpOptions`.

This commit should not change any behavior, however it will break the existing functions' signatures.

Signed-off-by: Zachary Hanham <z.hanham00@gmail.com>
2024-10-14 21:46:55 -04:00
openshift-merge-bot[bot]
3fbae8e28e Merge pull request #24259 from emakrushin/containers
Unlock mutex before returning from function
2024-10-14 21:09:26 +00:00
openshift-merge-bot[bot]
11ab0b7246 Merge pull request #24120 from Luap99/cirrus-build-speed
cirrus: use fastvm for builds
2024-10-14 16:04:12 +00:00
Егор Макрушин
06b470d79b Unlock mutex before returning from function
mapMutex is initialized in the ContainerRm function and cannot be released from outside,
thus unlock mutex before returning from function.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Егор Макрушин <emakrushin@astralinux.ru>
2024-10-14 18:22:42 +03:00
Matt Heon
7ea6120794 Note in the README that we are moving to timed releases
I'll also throw this on Podman.io and maybe write a short blog
about it there.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-10-14 18:22:42 +03:00
openshift-merge-bot[bot]
92666f2d70 Merge pull request #24257 from ericcurtin/CheckProcessRunning-debug
Make error messages more descriptive
2024-10-14 15:14:46 +00:00
Paul Holzinger
5d10e6e16b cirrus: let tar extract figure out the compression
tar should be smart enough to check the magic byte and use the correct
decompression algo based on that so there is no need to spell it out
explictly.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-14 17:08:34 +02:00
Eric Curtin
94dcf76eb2 Make error messages more descriptive
Recently was trying to start podman machine with krunkit and got:

Error: krunkit exited unexpectedly with exit code 1

which isn't very descriptive. Although this doesn't solve the
issue, it increases the debugability of this error.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2024-10-14 13:59:38 +01:00
Daniel J Walsh
3a4c4468f2 Mention containers.conf settings for podman machine commands
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-10-14 08:17:47 -04:00
openshift-merge-bot[bot]
0894cec14d Merge pull request #24253 from lsm5/packit-centos-re-enable
[skip-ci] Packit: re-enable CentOS Stream 10/Fedora ELN tasks
2024-10-14 10:55:54 +00:00
Lokesh Mandvekar
7dc58c105b [skip-ci] Packit: re-enable CentOS Stream 10/Fedora ELN teasks"
We now have golang 1.23.1 in CentOS Stream 10 and ELN.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2024-10-14 14:48:32 +05:30
Giuseppe Scrivano
3d57560a21 cmd: use logrus to print error
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-10-11 23:24:37 +02:00
Giuseppe Scrivano
71d5ee0e04 podman: do not set rlimits to the default value
since the effect would be to lower the rlimits when their definition
is higher than the default value.

The test doesn't fail on the previous version, unless the system is
configured with a nofile ulimit higher than the default value.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2317721

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-10-11 23:04:27 +02:00
Giuseppe Scrivano
5ebba75dbd spec: always specify default rlimits
the previous implementation was expecting the rlimits to be set for the
entire process and clamping the values only when running as rootless.

Change the implementation to always specify the expected values in the
OCI spec file and do the clamping only when running as rootless and
using the default values.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-10-11 23:04:27 +02:00
Giuseppe Scrivano
8896ace2a4 vendor: update containers/common
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-10-11 23:04:26 +02:00
openshift-merge-bot[bot]
2aacd4e212 Merge pull request #24236 from Luap99/nftables-stable
Revert "CI: test nftables driver on fedora"
2024-10-11 15:17:51 +00:00
openshift-merge-bot[bot]
74c85ac2da Merge pull request #24232 from mheon/releases_are_quarterly
Note in the README that we are moving to timed releases
2024-10-11 14:33:50 +00:00
Matt Heon
92a188ea38 Note in the README that we are moving to timed releases
I'll also throw this on Podman.io and maybe write a short blog
about it there.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-10-11 08:00:39 -04:00
Paul Holzinger
7f836df303 Revert "CI: test nftables driver on fedora"
This reverts commit 43f6173cc6.

The netavark version with nftables default is in f41 and rawhide
already so this is no longer needed. While we do not yet test f41 in CI
we have rawhide which is good enough until we update.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-11 13:13:53 +02:00
openshift-merge-bot[bot]
f311979ec0 Merge pull request #23409 from arixmkii/unix-api-socket
Implement publishing API UNIX socket on Windows platforms
2024-10-11 10:23:14 +00:00
Paul Holzinger
9e35fead03 cirrus: use zstd over bzip2 for repo archive
The repo tar process took over 1:20 min, with zstd it takes less than
10s so we safe over a minute by doing this.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-11 11:25:34 +02:00
Paul Holzinger
6e69978d2e cirrus: use shared repo_prep/repo_artifacts scripts
The script for aarch is exactly the same so there doesn't seem to be a
reason to duplciate it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-11 11:25:33 +02:00
Paul Holzinger
7eb4a6fe2b cirrus: speed up postbuild
In particular the main build task already did a make vendor and a
regeneration of the completion scripts. This means the first tre_status
would pick up both changes so the suggestion would be off. And rerunning
the same thing again here just makes thing slower than they need to be.
In particular there was the bug that make completion even rebuild podman
because generate-bindings obviously updates the timestamps of the files
as they are overwritten.

We do however must run generate-bindings as it was not run before.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-11 11:25:33 +02:00
Paul Holzinger
04dffbc2c7 cirrus: change alt arch task to only compile binaries
The current podman-release-%.tar.gz target does a lot more then just
checking if we can build for the given arch, in particular it first
builds a local podman-remote for the remote-docs.sh script. This makes
things slow as we compile several things and then builda and package the
docs. Given the docs are not arch specific there is realy no point in
doing all that work. All we care about is if the bianries can build on
other arches to catch compile issue for otherwise untested arches.

This should make the CI Alt Arch. tasks much faster.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-11 11:25:33 +02:00
Paul Holzinger
9082a14d76 cirrus: run make with parallel jobs where useful
The doc generation and the validate-binaries target can be run in
parallel as they do not depend on each other and a specific ordering. As
such we pass -j $(nproc) but also --output-sync=target to ensure the
output is not intermixed between several targets which could be harder
to read in case of errors.

Hower dus the complex podman-release target we can run podman-release
and validate-binaries at the same time as the dependencies are not right
and we run podman-release first in order to get the correct binaires
build.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-11 11:25:33 +02:00
Paul Holzinger
bc3db7c95b Makefile: allow man-page-check to be run in parallel
This target runs several scripts in serial but they do not have any
dependencies so we can split them all into their own target so that make
-j can run the targets in parallel to speed this up.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-11 11:25:33 +02:00
Paul Holzinger
39963cc984 cirrus: use fastvm for builds
Builds now take over 10 mins, given golang compilation is parallelized
by default we can give more cores to speed it up.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-11 11:25:33 +02:00
openshift-merge-bot[bot]
d512e44147 Merge pull request #24227 from Luap99/ci-image-update
cirrus: update CI images
2024-10-10 17:25:39 +00:00
Paul Holzinger
4e3a03795d test/e2e: skip some Containerized checkpoint tests
They no longer work in the latest image update, it is not clear why and
I do not have the time to debug that stuff. I opened #24230 to track it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-10 17:44:09 +02:00
Paul Holzinger
fe404959ed test: update timezone checks
In debian EST and MST7MDT are gone by default and moved to a special
package[1], instead of also installing that in the images lets use
different timezones in the test.

[1] 42c0008f86

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-10 17:44:08 +02:00
openshift-merge-bot[bot]
569d005b34 Merge pull request #24225 from Luap99/pasta-hang
test/e2e: try debug potential pasta issue
2024-10-10 12:28:26 +00:00
Paul Holzinger
a79fec5e98 cirrus: update CI images
Images from https://github.com/containers/automation_images/pull/387

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-10 14:19:25 +02:00
Paul Holzinger
f517e52167 test/e2e: try debug potential pasta issue
Run pasta with --trace and a log file to see if the hangs are caused by
pasta not correctly closing connections as assumed in #24219.

As the log is super verbose do not log it by default so I added some
extra logic to make sure it is only logged when the test fails.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-10 12:00:25 +02:00
openshift-merge-bot[bot]
9a887d1600 Merge pull request #24221 from edsantiago/fix-sizerootfs-flake
CI: quadlet system tests: use airgapped testimage
2024-10-10 00:15:13 +00:00
Ed Santiago
38803713d6 CI: quadlet system tests: use airgapped testimage
This command sequence causes SizeRootFs to change on foo:

   podman tag foo newimagename
   podman save ... newimagename
   podman load ...

Solution: get foo completely out of the picture. Use an
airgapped image: new image, new digest, new everything.

Fixes: #23756

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-10-09 14:11:00 -06:00
openshift-merge-bot[bot]
5890190c59 Merge pull request #24194 from lambinoo/quadlet-disable-default-dependencies
Allow removing implicit quadlet systemd dependencies
2024-10-09 16:23:31 +00:00
Farya L. M
bac655a6b1 Allow removing implicit quadlet systemd dependencies
Quadlet inserts network-online.target Wants/After dependencies to ensure pulling works.
Those systemd statements cannot be subsequently reset.

In the cases where those dependencies are not wanted, we add a new
configuration item called `DefaultDependencies=` in a new section called
[Quadlet]. This section is shared between different unit types.

fixes #24193

Signed-off-by: Farya L. Maerten <me@ltow.me>
2024-10-09 14:48:05 +02:00
openshift-merge-bot[bot]
3460ec496c Merge pull request #24212 from containers/renovate/github.com-cyphar-filepath-securejoin-0.x
fix(deps): update module github.com/cyphar/filepath-securejoin to v0.3.4
2024-10-09 08:40:05 +00:00
renovate[bot]
05a449c61e fix(deps): update module github.com/cyphar/filepath-securejoin to v0.3.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-09 04:53:26 +00:00
openshift-merge-bot[bot]
b997841bde Merge pull request #24208 from Luap99/remote-wait
Improve podman-remote run --rm exit code handling
2024-10-08 17:43:40 +00:00
openshift-merge-bot[bot]
a4e098ae79 Merge pull request #24163 from slp/update-krunkit-0.1.3
Bump bundled krunkit to 0.1.3
2024-10-08 17:35:19 +00:00
Paul Holzinger
b3829a2932 libpod API: make wait endpoint better against rm races
In the common scenario of podman-remote run --rm the API is required to
attach + start + wait to get exit code. This has the problem that the
wait call races against the container removal from the cleanup process
so it may not get the exit code back. However we keep the exit code
around for longer than the container so  we can just look it up in the
endpoint. Of course this only works when we get a full id as param but
podman-remote will do that.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-08 18:03:15 +02:00
Paul Holzinger
3215d5124f podman-remote run: improve how we get the exit code
Call the wait endpoint right away when a container is started and not
only when attach is done, this allows us for wait to work when the
container has been removed otherwise (i.e. podman-remote run --rm). In
that case it was possible that wait failed and we then fall back to
reading events. However based on some reports there seems to be the
chance that the event readin is not working for them either and returns
a bad error "Cannot get exit code: <nil>" which does not help anybody.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-08 18:03:11 +02:00
openshift-merge-bot[bot]
07da6313c4 Merge pull request #24195 from edsantiago/055-cleanup
055-rm test: clean up a test, and document
2024-10-08 12:34:53 +00:00
openshift-merge-bot[bot]
7652e04398 Merge pull request #24202 from lsm5/packit-koji-build-constraint
[skip-ci] Packit: constrain koji and bodhi jobs to fedora package to avoid dupes
2024-10-08 11:09:37 +00:00
openshift-merge-bot[bot]
c8805f24c5 Merge pull request #24188 from containers/renovate/google.golang.org-protobuf-1.x
fix(deps): update module google.golang.org/protobuf to v1.35.0
2024-10-08 10:58:37 +00:00
Lokesh Mandvekar
3d1a4301af [skip-ci] Packit: constrain koji and bodhi jobs to fedora package to avoid dupes
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2024-10-08 16:04:16 +05:30
openshift-merge-bot[bot]
6d3ebe67f0 Merge pull request #24117 from containers/renovate/github.com-shirou-gopsutil-v4-4.x
fix(deps): update module github.com/shirou/gopsutil/v4 to v4.24.9
2024-10-08 10:22:52 +00:00
Ed Santiago
e7833d52cf 055-rm test: clean up a test, and document
There's an important reason why the healthcheck container in 055-rm
test uses 'sleep infinity' and not 'top. Document it.

And, the test itself wasn't actually working as intended. Make
it safer by confirming that the container actually enters
the "stopping" state.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-10-07 15:22:49 -06:00
Sergio Lopez
3cedd0c2b5 CI: remove skips for libkrun
Remove the skips introduced to work around #23296

Signed-off-by: Sergio Lopez <slp@redhat.com>
2024-10-07 19:41:20 +02:00