Commit Graph

22897 Commits

Author SHA1 Message Date
Matt Heon 830e550073 Ignore result of EvalSymlinks on ENOENT
When the path does not exist, filepath.EvalSymlinks returns an
empty string - so we can't just ignore ENOENT, we have to discard
the result if an ENOENT is returned.

Should fix Jira issue RHEL-37948

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-07-11 09:39:56 -04: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
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
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
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
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
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
Paul Holzinger 67df6d60c3
cirrus: fix broken macos artifacts URL
The task got renamed but didn't fix the URL for the machine test task
only the artifacts task url was fixed.

Fixes 439fe90208 ("Minor: Rename the OSX Cross task")

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-06-27 14:24:07 +02:00
openshift-merge-bot[bot] 6abdda6d7b
Merge pull request #23116 from Luap99/top-compile
libpod/container_top_linux.c: fix missing header
2024-06-27 11:49:01 +00:00
Paul Holzinger 6db8ff7f7b
libpod/container_top_linux.c: fix missing header
As this file uses open it needs to include fcntl.h.
This should fix the build error seen on epel9[1], not sure why it works
on the other platforms.

[1] https://download.copr.fedorainfracloud.org/results/packit/containers-podman-23113/epel-9-aarch64/07672197-podman/builder-live.log.gz

Fixes 65ed96585d ("podman top: join the container userns")

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-06-27 10:50:17 +02:00
Chris Evich 905e7ae070
Minor: Remove unhelpful comment
Likely a copy-paste error, it doesn't apply here.

Signed-off-by: Chris Evich <cevich@redhat.com>
2024-06-26 14:54:17 -04:00
openshift-merge-bot[bot] fda0f8123b
Merge pull request #23098 from Luap99/CI-bail
cirrus: remove redundant skip logic and lower int timeout
2024-06-26 18:38:06 +00:00
openshift-merge-bot[bot] 341fbfea66
Merge pull request #23110 from lsm5/rpm-misc
[skip-ci] Remove conditionals from changelog
2024-06-26 17:29:22 +00:00
openshift-merge-bot[bot] eff706af6f
Merge pull request #23105 from cevich/rename_osx_cross
[CI:BUILD] Minor: Rename the OSX Cross task
2024-06-26 17:26:39 +00:00
openshift-merge-bot[bot] ab02fe292f
Merge pull request #23086 from cevich/lint_in_parallel
Run linting in parallel with building
2024-06-26 17:23:56 +00:00
Chris Evich 439fe90208
Minor: Rename the OSX Cross task
For a long time, this task has not been cross-compiling, it's building
natively on a Mac.  Avoid any possible confusion by renaming the task.

Signed-off-by: Chris Evich <cevich@redhat.com>
2024-06-26 10:49:00 -04:00
openshift-merge-bot[bot] d386cd0b29
Merge pull request #23096 from Luap99/top-userns
podman top: join the container userns
2024-06-26 13:13:40 +00:00
Lokesh Mandvekar 02b922ebfc
[skip-ci] Remove conditionals from changelog
All our active envs except centos stream 9 support autochangelog and the
only place we're building rpms via packit on centos stream 9 is on COPR
where we don't really care about changelogs.

Commit also removes a couple of unnecessary slashes from install paths.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-06-26 08:38:11 -04:00
Paul Holzinger 65ed96585d
podman top: join the container userns
When we execute ps(1) in the container and the container uses a userns
with a different id mapping the user id field will be wrong.

To fix this we must join the userns in such case.

Fixes #22293

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-06-26 11:10:56 +02:00
openshift-merge-bot[bot] 5e27243935
Merge pull request #23103 from Luap99/build-platform
build API: accept platform comma separated
2024-06-25 22:06:07 +00:00
Chris Evich 6c75a10875
Run linting in parallel with building
Linting code changes with golangci-lint is a very slow and resource
intensive process.  However, it does not depend on compiling anything.
This means it may run in parallel with the build tasks for
a modest perceived runtime duration improvement.

Additionally, the former validation make targets that **do** require a
build execute faster than CI is able to provision a VM, simply tack them
onto the end of all build operations.

Signed-off-by: Chris Evich <cevich@redhat.com>
2024-06-25 14:27:56 -04:00
Chris Evich 7ff4bbae26
Fix missing Makefile target dependency
This was likely hidden by the CI system.  Fix it.

Signed-off-by: Chris Evich <cevich@redhat.com>
2024-06-25 14:12:55 -04:00
openshift-merge-bot[bot] 242fdb51a2
Merge pull request #23101 from edsantiago/exitwitherror-yetmore
ExitWithError() - more upgrades from Exit()
2024-06-25 18:01:40 +00:00
openshift-merge-bot[bot] 4220ee02f7
Merge pull request #23081 from edsantiago/logformatter-base-sha
CI: logformatter: link to correct PR base
2024-06-25 17:55:01 +00:00
openshift-merge-bot[bot] 4ba26b15f1
Merge pull request #23099 from Luap99/remove-12624
test/e2e: remove podman system service tests
2024-06-25 17:49:07 +00:00
openshift-merge-bot[bot] 781d5dd154
Merge pull request #23097 from Luap99/machine-stop
pkg/machine/apple: machine stop timeout
2024-06-25 17:35:21 +00:00
openshift-merge-bot[bot] 577ebe7998
Merge pull request #23095 from lsm5/rpm-machine-subpackage
[skip-ci] RPM: create podman-machine subpackage
2024-06-25 17:32:40 +00:00
openshift-merge-bot[bot] ff395915be
Merge pull request #23091 from containers/renovate/github.com-crc-org-crc-v2-2.x
Update module github.com/crc-org/crc/v2 to v2.38.0
2024-06-25 17:22:02 +00:00
Paul Holzinger a3d5842746
build API: accept platform comma separated
The docker API uses only a single arg for platform and multiple
platforms are given as comma separated list.

Fixes #22071

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-06-25 18:48:59 +02:00
Lokesh Mandvekar 180cc6f863
[skip-ci] RPM: create podman-machine subpackage
This subpackage will fetch dependencies for podman machine and create a
symlink /usr/libexecdir/podman/virtiofsd -> ../virtiofsd .

Co-authored-by: Colin Walters <walters@verbum.org>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-06-25 12:08:37 -04:00