Commit Graph

22922 Commits

Author SHA1 Message Date
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
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
Paul Holzinger fad1f757cc
test/system: fix podman --image-volume to allow tmpfs storage
The test check the the default volume is not on tmpfs, however what it
should really check that the volume is on our container storage fs. It
is possible that users run the storage on top of tmpfs so this test
always failed there.

The better check is to compare the fs from the graphroot and the volume.
Unfortunately, for unknown reasons stat -f -c %T returns UNKNOWN and not
the actual fs. I have no idea why, to work around that we now parse
/proc/mounts manually for the fs. Not nice but at least it works
correctly.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-01 12:51:33 +02:00
openshift-merge-bot[bot] 672c6c8702
Merge pull request #23133 from Luap99/device-validation
specgen: parse devices even with privileged set
2024-07-01 10:47:11 +00:00
Paul Holzinger e810b340ef
CI: mount tmpfs for container storage
Try to speed up the CI tests by using tmpfs as container storage.
This is important for system tests, other tests setup their own --root
already on tmpfs so it should not effect them.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-01 12:45:03 +02:00
openshift-merge-bot[bot] 94ebb12bcf
Merge pull request #23126 from baude/checkmem
Error when machine memory exceeds system memory
2024-07-01 10:05:14 +00:00
Paul Holzinger 9814ed40c7
docs: --network remove missing leading sentence
This senetence does not add any value and instead confuses users as it
suggest that the name is somhow special and related to bridge networks
which is not the case. Using either the name or id is fine as described
in the sentence before.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-01 11:46:34 +02:00
Paul Holzinger 83863a6863
specgen: parse devices even with privileged set
When a users asks for specific devices we should still add them and not
ignore them just because privileged adds all of them.

Most notably if you set --device /dev/null:/dev/test you expect
/dev/test in the container, however as we ignored them this was not the
case. Another side effect is that the input was not validated at at all.
This leads to confusion as descriped in the issue.

Fixes #23132

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-01 11:46:34 +02:00
Giuseppe Scrivano 5e156c424f
vendor: update c/storage
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-07-01 11:35:45 +02:00
openshift-merge-bot[bot] 8650348bc9
Merge pull request #23119 from lsm5/packit-rhel-centos-separation
[skip-ci] Packit: split rhel and centos-stream jobs
2024-07-01 09:29:30 +00:00
openshift-merge-bot[bot] f3a4f07637
Merge pull request #23130 from cfergeau/gvproxy-logs
machine: Always use --log-file with gvproxy
2024-07-01 09:26:46 +00:00
openshift-merge-bot[bot] 5cc57427f3
Merge pull request #23135 from breca/main
feat(quadlet): log option handling
2024-07-01 07:58:43 +00:00
Brett Calliss 22b57d3230 feat(quadlet): log option handling
I found that Quadlet didn't currently have support for log options.
This merge allows Quadlet to handle log options and correctly
pass those values through to `podman run` for Container and Kube
types.

Syntactically consistent with existing parameters:

```ini
[Container]
Image=localhost/imagename
LogOpt=path=/var/log/container/mycontainer.json
LogOpt=size=10mb
```

Signed-off-by: Brett Calliss <brett@obligatory.email>
2024-06-30 18:21:47 +10:00
openshift-merge-bot[bot] 045413b286
Merge pull request #23131 from edsantiago/build-each-commit-only-on-prs
CI: Build-Each-Commit test: run only on PRs
2024-06-28 17:41:29 +00:00
Brent Baude 786ea01a64 Error when machine memory exceeds system memory
Close loophole that would allow you to assign more memory than the
system has to a podman machine

Fixes: #18206

Signed-off-by: Brent Baude <bbaude@redhat.com>
2024-06-28 10:02:11 -05:00
Christophe Fergeau 0d0418a5bf machine: Always use --log-file with gvproxy
The logs are not verbose if `--debug` is not set, and very useful to
have if gvproxy exits unexpectedly.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
2024-06-28 16:05:21 +02:00
Ed Santiago c9e3458c99 CI: Build-Each-Commit test: run only on PRs
Followup to #23081, which broke this test on nightly cron.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-06-28 05:58:24 -06:00
openshift-merge-bot[bot] c86386ed06
Merge pull request #23112 from cevich/remove_useless_comment
[CI:DOCS] Minor: Remove unhelpful comment
2024-06-28 11:46:59 +00:00
openshift-merge-bot[bot] fb97c741cb
Merge pull request #23125 from cevich/sensitive_names
Clearly indicate names w/ URLencoded duplicates
2024-06-27 21:19:16 +00:00
Brent Baude d2ca2058c6 Small fixes for testing libkrun
This PR is a couple of small fixes so that our CI would be capable of running the machine test suite on the libkrun provider.

RUN-2172

Signed-off-by: Brent Baude <bbaude@redhat.com>
2024-06-27 13:41:39 -05:00
Ashley Cui 069eace84b Podman machine resets all providers
Podman machine reset now removes and resets machines from all providers availabe on the platform.

On windows, if the user is does not have admin privs, machine will only reset WSL, but will emit a warning that it is unable to remove hyperV machines without elevated privs.

Signed-off-by: Ashley Cui <acui@redhat.com>
2024-06-27 13:14:29 -04:00
Chris Evich e58e715583
Clearly indicate names w/ URLencoded duplicates
Previously it was easy for a maintainer to change a Cirrus-CI task name
w/o realizing it would (later) cause a downstream task or the `artifacts`
task to fail.  This is due to duplication of task names in URLencoded
format.  Worse, `artifacts` task failures are inconsequential in PRs,
and not all tasks are executed for every PR context (i.e. due to `skip`
or `only_if` exclusions).  So induced name change failures may not be
noticed until after a PR merges.

Improve the visibility of the situation by adding comments to all
consequential names.  That is, task names where there is a URLencoded
duplicate reference elsewhere.

Signed-off-by: Chris Evich <cevich@redhat.com>
2024-06-27 11:57:32 -04:00
openshift-merge-bot[bot] d367d55d33
Merge pull request #23118 from Luap99/machine-flake
apple virtiofs: fix racy mount setup
2024-06-27 15:41:55 +00:00
openshift-merge-bot[bot] b91d0faf6e
Merge pull request #22922 from BlackHole1/improve-windows
refactor(machine,wsl): improve operations of Windows API
2024-06-27 12:49:35 +00:00
Lokesh Mandvekar 926e6dd0aa
[skip-ci] Packit: split rhel and centos-stream jobs
This allows centos stream builds to run for outside contributors without
write access to the repos.

This commit also include centos-stream-9 build jobs so we can compare
both centos-stream-9 and rhel-9 builds if required. This will also be
useful when we want to run tests on both centos stream and rhel envs
using their respective builds.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-06-27 08:36:13 -04:00
Paul Holzinger fdb736d282
apple virtiofs: fix racy mount setup
One problem on FCOS is that the root directory is immutable, as such in
order to mount arbitrary paths from the host we must make it mutable
again and create these dir on boot in order to be able to mount there.

The current logic was racy as it used one unit for each path and they
all did chattr -i /; mkdir -p $path; chattr -i / and systemd can run
these units in parallel. That means it was possible for another unit to
make / immutable before the unit could do the mkdir. I pointed this out
on the original PR[1] but we never followed up on it...

Now this here changes several things. First have one unit that does the
chattr -i / (immutable-root-off.service), it is hooked into
remote-fs-pre.target which means it is executed before the network
mounts (virtiofs) are done.

Then we have another unit that does chattr +i /
(immutable-root-on.service) which turn the immutable root back on after
remote-fs.target which means all mount are done at this point.

Additionally the automount unit is removed because it does not add any
value for us and it was borken anyway as it used the virtiofs tag as
path so systemd just ignored it.

[1] https://github.com/containers/podman/pull/20612#discussion_r1384846241

Fixes #22569

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-06-27 14:24:07 +02:00