There are more useful checks such as nilness that are not enabled by
default. However fieldalignment and shadow produce a lot of warnings
that are not real issues, i.e. we shadow "err" as variable all the time,
so they get disabled.
see https://golangci-lint.run/docs/linters/configuration/#govet
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
The netavark mention is not needed as we only support it now. Then
update it for the new route type syntax which was not documented in
commit daaf8b62ba.
Also add an example and a note that containers with CAP_NET_ADMIN can
alter routes still.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
With netavark v2 we require true not 1.
This was correctly changed in commit bb02e49080 but then reverted in
commit 7612af4c0e again as it did not properly rebase and solve the
conflicts.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Bump bundled krunkit to 1.3.2, which comes with libkrun 1.19.4.
This version of libkrun includes a fix in virtio-fs on macOS for
libkrun/libkrun#769 that potentially impacts podman users.
Signed-off-by: Sergio Lopez <slp@redhat.com>
When running `make validatepr` from a git worktree, $(CURDIR)/.git is a file
pointing to the parent git dir outside the bind mount. Mount that dir at its
own path so git inside the container can resolve and not throw ownership errors.
Signed-off-by: Danish Prakash <contact@danishpraka.sh>
The current systemd service to mount /etc/containers is not working
right. The Before=podman.socket causes a ordering conflict which causes
the socket to be disabled and thus all podman remote connections fail.
The problem is the unit is wanted by the default.target while the socket
is wanted by sockets.target which can be before the default.target is
triggered. That means that the Before= line cannot be fulfilled and
sometimes systemd thus seems to not start the socket. It is unclear to
me why this is racy as it is sometimes also works.
This was reported by Vladimir Lazar from the PD team, our CI did not
caught this as we use rootless machines by default and the problem only
happens for the rootful socket so we do not see connection failures.
To fix this add at least one rootful socket check.
We do however have a different CI flake that was also caused by the
incorrect mount dependencies. The mount could happen after sshd or other
programs run. So to fix this we must hook the podman-mnt-config.service
into the local-fs.target which runs much earlier and is used for all the
mounts.
Fixes: #29003
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Bump bundled krunkit to 1.3.1, which comes with libkrun 1.19.3.
This version of krunkit makes HTTP parsing on the rest-uri more
robust to ensure it only acts on the right request.
It also enables a new permission semantics mode in libkrun that's
closer to the user expectations on macOS.
Fixes: #21402Fixes: #29084
Signed-off-by: Sergio Lopez <slp@redhat.com>
It was removed, with the hardcoded image reference.
So cache was always off, even for the default image.
Fixes: #29090
Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
We renamed the variant in machine-os to podman-machine-os so it is not
coreos:
a5c8fbcfc6
Now the main issue with this is the code runs inside the VM, which means
updates from 6.0.0 to the next one still will be broken and needs the os
apply command until this can work again. Of course a new init will also
work with the new image.
Fixes: #29085
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
In remote mode `podman events --format json` could print the literal "null"
instead of an event object. The remote client converts each event received
from the server with ConvertToLibpodEvent, which returned nil when it could
not parse the server result (an unknown status or type, or an invalid
containerExitCode). The tunnel forwarded that nil as an event with no error
set, so the CLI marshalled a nil event and printed "null".
Return a descriptive error from ConvertToLibpodEvent and send it on the event
channel, which the CLI already handles, instead of forwarding a nil event.
Signed-off-by: ROKUMATE <rohitkumawat0110@gmail.com>
I do not understand this condition in the code, not passing the log file
to the runtime when run with log level debug makes no sense. It means we
do not get the proper error message from the runtime so debug logging
shows a much worse error:
"container create failed (no logs from conmon)..."
When the actual error is the command is not in $PATH for example. So to
fix this just remove the log level check. Also not the support json flag
condition is done inside execOCILog().
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
First check for errors and assert them via gomega to make the test fails
which called this.
Then stop calling this for each test spec, most will never access this
so stop reading the file over and over. Callers should just call the
function directly.
Then remove the arch field from it, that is not related to the OS file.
Callers should just access runtime.GOARCH directly.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
If the scanner fails to read the file we should return an error to the
user and not make assumptions on the returned value here.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
When the command output is logged we do not need an extra pipe and
scanner to read the output line by line, we can just log it directly via
a writer.
Now this of course does loose the line by line parsing of the scanner
but IMO this is better as it is simpler and less code to worry about.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
The healthcheck log could be corrupted if the
process was interrupted mid-write. It could
lead to Podman crashing.
Write the log files atomically and diferentiate
between corrupted log and different errors in
consumers of readFromFileHealthCheckLog().
Add a system test for a corrupted log file.
Change incorrect log permissions to 0o600.
Fixes: https://redhat.atlassian.net/browse/RHEL-178222
Signed-off-by: Marek Simek <msimek@redhat.com>
The versions should be kept in sync to avoid build errors on readthedocs
later, so add a note to remind people to update them.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
I forgot to update the docs here when I reworked the build process. Link
to the new location and explain how users can download the file, see
https://github.com/podman-container-tools/podman/discussions/29035
Now because the file is served on the same domain there should also be
no longer any issue with CORS so remove the old picture.
Fixes: c2ffe88ce0 ("build the swagger.yml on readthedocs")
Signed-off-by: Paul Holzinger <pholzing@redhat.com>