Commit Graph

22946 Commits

Author SHA1 Message Date
openshift-merge-bot[bot] dad2d17e1c
Merge pull request #23223 from baude/libkrundoc
add libkrun test docs
2024-07-09 14:45:51 +00:00
openshift-merge-bot[bot] baafdbb151
Merge pull request #23230 from Luap99/cirrus-source-h
cirrus: check for header files in source code check
2024-07-09 13:56:22 +00:00
Brent Baude 6f6e0e7126 add libkrun test docs
add how to run the machine tests on macos with libkrun to the quick test readme.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2024-07-09 08:54:09 -05:00
openshift-merge-bot[bot] 0b9cc50c4a
Merge pull request #23229 from Luap99/machine-debug
pkg/machine/e2e: run debug command only for macos
2024-07-09 13:53:37 +00:00
openshift-merge-bot[bot] 6221e63cb0
Merge pull request #22985 from lambinoo/fix-hang-boot-podman
Fix hang boot podman
2024-07-09 12:58:36 +00:00
Paul Holzinger 4b7aaafb2d
cirrus: check for header files in source code check
When we check if source code was changed also include header files.
There is only one header file currently but that can change and it may
be possible that changes in this file can break things so make sure it
is considered source code so that all tests are triggered.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-09 13:34:40 +02:00
Paul Holzinger 336c45f68e
pkg/machine/e2e: run debug command only for macos
The commands only make sense on macos so do not clutter the logs on
linux/windows with the output.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-09 13:14:42 +02:00
Farya L. Maerten c819c7a973 create runtime's worker queue before queuing any job
It seems that if some background tasks are queued in libpod's Runtime before the worker's channel is set up (eg. in the refresh phase), they are not executed later on, but the workerGroup's counter is still ticked up. This leads podman to hang when the imageEngine is shutdown, since it waits for the workerGroup to be done.

fixes containers/podman#22984

Signed-off-by: Farya Maerten <me@ltow.me>
2024-07-09 11:15:29 +02:00
openshift-merge-bot[bot] abf0350529
Merge pull request #23206 from Luap99/rootless-reexec-userns
pkg/rootless: simplify reexec for container code
2024-07-08 18:35:19 +00:00
openshift-merge-bot[bot] 464a79921c
Merge pull request #23220 from Luap99/test-tools-danger
cirrus: add missing test/tools to danger files
2024-07-08 15:25:02 +00:00
Paul Holzinger a2c83cb0fd
SetupRootless(): only reexec when needed
We should never try to reexxec when we are already root with
CAP_SYS_ADMIN. The code contained a bug when --cgroups=disabled is used
as it tried to perfom a reexec even when it was not needed.

Fixes: 900e29549a ("libpod: do not move podman with --cgroups=disabled")

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-08 13:39:15 +02:00
Paul Holzinger 3350cd3eed
pkg/rootless: simplify reexec for container code
The code currently tried to avoid joining the userns from conmon
directly and rather joined to only read the pid file and then send this
back to use so we could join the userns. From the comment this was done
because we could not read the pid file. However this is no longer true
as of commit 49eb5af301 and file is no always owned by the real user.

This means we can just remove this special logic and join the namespace
directly there. A test has been added to check the rejoin logic with a
custom uidmapping.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-08 13:28:31 +02:00
openshift-merge-bot[bot] d68a41fc32
Merge pull request #23205 from containers/renovate/golang.org-x-net-0.x
fix(deps): update module golang.org/x/net to v0.27.0
2024-07-08 09:46:43 +00:00
Paul Holzinger 049942db04
cirrus: add missing test/tools to danger files
This directory contains important tools such as ginkgo as such updates
there should run through all testing and not skip anything.

Technically we do not need to run system tests as it doesn't use any
tool from there but that
a) might change in the future and
b) would make the only_if rules much more complicated if we try to
   exclude it and
c) updates in test/tools are rare and/or automated so it does not cause
   inconveniences to run all anyway

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-08 10:58:19 +02:00
openshift-merge-bot[bot] c276b28696
Merge pull request #23218 from containers/renovate/golang.org-x-tools-0.x
fix(deps): update module golang.org/x/tools to v0.23.0
2024-07-08 08:50:50 +00:00
renovate[bot] 1d9ac9a203
fix(deps): update module golang.org/x/tools to v0.23.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-07 21:23:48 +00:00
openshift-merge-bot[bot] c5841b0003
Merge pull request #22408 from lsm5/wix-bump
Windows Installer: bump wix to v5
2024-07-05 20:33:59 +00:00
Lokesh Mandvekar e2ff5d4e5d
Windows Installer: switch to wix5
The chocolatey tool that was fetching us wix v3 can no longer be used to
fetch wix v4+ so we had to switch to dotnet to fetch the latest wix.

This commit builds the installer with wix v5.
wix v5 is installed via the `dotnet` tool in the windows image itself
at https://github.com/containers/automation_images/pull/354.

Going forward, the `dotnet` tool will also be used to build the installer.

In the process, the wix v3 files were converted to wix v4+ using `wix
convert` followed by manual modifications along with switch to wixproj
builds with dotnet.

The GitHub Action to upload windows installer now builds the installer
using winmake.ps1.

Contributions from Mario Loriedo:
- bundle setup update to wix5
- updates to build and release process scripts
Ref: https://github.com/lsm5/podman/pull/3

- small fixes to windows installer theme
Ref: https://github.com/lsm5/podman/pull/4

- Better win-installer sidebar logo
Ref: https://github.com/lsm5/podman/pull/5

Resolves: RUN-2055

Co-authored-by: Mario Loriedo <mario.loriedo@gmail.com>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-07-05 15:28:19 -04:00
openshift-merge-bot[bot] 74cfb3ce5f
Merge pull request #23162 from Luap99/machine-hang
pkg/machine/e2e: improve timeout handling
2024-07-05 19:27:58 +00:00
openshift-merge-bot[bot] c476c3afde
Merge pull request #23203 from Luap99/systemd-ctr-leak
libpod: first delete container then cidfile
2024-07-05 14:41:59 +00:00
renovate[bot] f90060bff3
fix(deps): update module golang.org/x/net to v0.27.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-05 14:35:37 +00:00
Paul Holzinger 5e3d821814
pkg/machine/e2e: print tests timings at the end
Makes it easier to see which tests are slow.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-05 15:28:33 +02:00
Paul Holzinger 527c0f0bfa
pkg/machine/e2e: run debug commands after init
To debug the slow machine init command. Let's see the disk image size.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-05 15:28:33 +02:00
Paul Holzinger ada4e1a8c1
pkg/machine/e2e: improve timeout handling
In case of timeouts actually log the command again and make sure to send
SIGABRT to the process as go will create a useful stack strace where we
can see where things are hanging. It also kill the process unlike the
default Eventually().Should(Exit()) call the leaves the process around.

The output will be captured by default in the log so we just see the
stack trace there.

And while at it bump the timout up to 10 mins, we are hitting hard
flakes in CI where machine init takes longer than 5 mins for unknown
reasons but this seems to be good enough.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-05 15:28:33 +02:00
openshift-merge-bot[bot] cf98506546
Merge pull request #23166 from containers/renovate/setuptools-70.x
chore(deps): update dependency setuptools to ~=70.2.0
2024-07-05 10:06:59 +00:00
openshift-merge-bot[bot] 64f440d31f
Merge pull request #23200 from containers/renovate/golang.org-x-term-0.x
fix(deps): update module golang.org/x/term to v0.22.0
2024-07-05 09:20:14 +00:00
Paul Holzinger 62956ac192
libpod: first delete container then cidfile
I am seeing a weird flake in my parallel system test PR. The issue is
that system units generated by podman systemd generate leave a container
in the Removing state behind.

As far as I can tell the porblems seems to be that the cleanup process
is killed while it tries to remove the container from the db. Because
the cidfile was removed before the ExecStopPost=podman rm ... process no
longer had access to the cidfile and reported no error because it runs
with --ignore.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-05 10:27:42 +02:00
openshift-merge-bot[bot] 46840fa854
Merge pull request #23170 from Luap99/events
podman events: fix error race
2024-07-05 07:02:47 +00:00
renovate[bot] ea86582f6c
fix(deps): update module golang.org/x/term to v0.22.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-04 22:17:33 +00:00
openshift-merge-bot[bot] 0358325f9b
Merge pull request #23174 from Luap99/cirrus-skips
cirrus.yml: automatic skips based on source
2024-07-04 17:26:00 +00:00
openshift-merge-bot[bot] a1edfefc72
Merge pull request #23190 from containers/renovate/github.com-containers-ocicrypt-1.x
fix(deps): update module github.com/containers/ocicrypt to v1.2.0
2024-07-04 13:12:53 +00:00
openshift-merge-bot[bot] 666ed8f0dc
Merge pull request #23189 from edsantiago/system-test-tweaks
System test fixes
2024-07-04 13:04:36 +00:00
openshift-merge-bot[bot] d1a258b232
Merge pull request #22831 from Luap99/system-tmpfs
CI: mount tmpfs for container storage
2024-07-04 13:01:50 +00:00
Ed Santiago a181b7bc61 System test fixes
- fix test name to reflect that it's not pasta-only
   (followup from #21563)

 - in one podman-update test run in OpenQA, defer assertion
   failures so we can gather better data on regressions.
   This would've been helpful in diagnosing bz2281805.

 - add an error-message check to one test that needed it
   (found by accident)

 - add distro-integration test tag to a handful of new tests,
   so they run in OpenQA. Found via 'git diff 33891e8 test/system'
   and scanning for '^\+@test '. I only added tests that IMO
   have some risk of interacting poorly with kernel or systemd
   updates, e.g. quadlet, modules, tmpfs+noswap.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-07-04 06:13:02 -06:00
Paul Holzinger 55ad0d6e0e
cirrus.yml: automatic skips based on source
As we want to get rid of the special titles convert the existing skips
to the only_if condition, this makes it more readable as we do not need
to negate so much.

Then add similar conditions for all test tasks, this removes the need to
a special title such as CI:DOCS as the logic is smart enough to only
docs changes when no source code was changed.

Update the documentation for the new logic and no longer point
contributors to the CI:DOCS title as it is gone now.

There is a bunch of duplication in the rules as yaml doesn't allow us to
share only parts of a string. To prevent unwanted drift a test case in
contrib/cirrus/cirrus_yaml_test.py is added to ensure all conditions
follow the same base ruleset.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-04 11:32:36 +02:00
renovate[bot] 2c2da039de
fix(deps): update module github.com/containers/ocicrypt to v1.2.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-04 02:02:06 +00:00
openshift-merge-bot[bot] 189d862d54
Merge pull request #23159 from containers/renovate/go-github.com/gorilla/schema-vulnerability
fix(deps): update module github.com/gorilla/schema to v1.4.1 [security]
2024-07-03 13:46:02 +00:00
openshift-merge-bot[bot] b3dab682b1
Merge pull request #22972 from BlackHole1/improve-error
refactor(build): improve err when file specified by -f does not exist
2024-07-03 12:59:16 +00:00
Paul Holzinger d00e68e550
podman events: fix error race
The events code makes use of two channels, one for the events and one
for the resulting error. Then in the main file we have a loop reading
from both channels that should exit on first error it gets.

However in case the event channel is closed before the error channel
cotains the error it could caused an early exit as it looked like all
events were done. Commit c46884aa93 fixed that somewhat by checking for
an error in the error channel before exiting. This however was still
racy as it added a default case in the select which means the channel
check is non blocking. Thus the error was not yet send into the channel.

To fix this we should make it a blocking read to wait for the error in
the channel. Also the err != nil check can be removed as we either
return err or nil anyway.

And as last step make sure the error channel is closed, that prevents us
from blocking forever in case the main select already processed the nil
error.

Fixes #23165

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-03 11:21:30 +02:00
openshift-merge-bot[bot] b5bfd7233b
Merge pull request #23157 from cevich/update_non-beta_civm
Update CI VM images
2024-07-03 09:05:32 +00:00
renovate[bot] b6f151ad1c
chore(deps): update dependency setuptools to ~=70.2.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-02 18:40:18 +00:00
openshift-merge-bot[bot] c279ce0a86
Merge pull request #23113 from containers/renovate/github.com-openshift-imagebuilder-1.x
Update module github.com/openshift/imagebuilder to v1.2.11
2024-07-02 18:39:18 +00:00
openshift-merge-bot[bot] 3b07ae4557
Merge pull request #23123 from baude/libkruntest
Small fixes for testing libkrun
2024-07-02 13:28:27 +00:00
openshift-merge-bot[bot] f5d50a68bc
Merge pull request #23154 from Luap99/machine-test-connection
pkg/machine/e2e: fix broken cleanup
2024-07-02 12:14:10 +00:00
renovate[bot] 1c704157c2
fix(deps): update module github.com/gorilla/schema to v1.4.1 [security]
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-01 23:11:04 +00:00
openshift-merge-bot[bot] 3a41bccf7d
Merge pull request #22941 from ashley-cui/machreset
Podman machine resets all providers
2024-07-01 19:24:18 +00:00
Chris Evich 5c41eb6df8
Update CI VM images
Specifically, the included Debian image should not fail all networking
tests.

Signed-off-by: Chris Evich <cevich@redhat.com>
2024-07-01 13:21:19 -04:00
openshift-merge-bot[bot] fc08f1aeac
Merge pull request #23151 from giuseppe/vendor-storage
vendor: update c/storage
2024-07-01 12:34:34 +00:00
Paul Holzinger 3c0176b2d0
pkg/machine/e2e: fix broken cleanup
Currently all podman machine rm errors in AfterEach were ignored.
This means some leaked and caused issues later on, see #22844.

To fix it first rework the logic to only remove machines when needed at
the place were they are created using DeferCleanup(), however
DeferCleanup() does not work well together with AfterEach() as it always
run AfterEach() before DeferCleanup(). As AfterEach() deletes the dir
the podman machine rm call can not be done afterwards.

As such migrate all cleanup to use DeferCleanup() and while I have to
touch this fix the code to remove the per file duplciation and define
the setup/cleanup once in the global scope.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-01 14:23:11 +02:00
Paul Holzinger f84f4a9cce
pkg/machine/e2e: use tmp file for connections
On linux and macos the connections are stored under the home dir by
default so it is not a problem there but on windows we first check
the APPDATA env and use this dir as config storage. This has the problem
that it is not cleaned up after each test as such connections might leak
into the following test causing failues there.

Fixes #22844

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-01 13:04:03 +02:00