Include an explicit container state check. Otherwise the
containers/stats endpoint will return all-zero stats for a stopped
container even when in non-streaming mode, which breaks some consumers
of the API, particularly nomad's podman driver.
Implement the interface by just returning the number of host CPUs. A
bit more sophisticated would be to fetch the jail's cpuset, but it's not
very important for now.
Signed-off-by: Mark Johnston <mark.johnston@klarasystems.com>
On very slow systems it can be that it takes over 5s after the sleep
process was started and until the find_exec_pid_files function finds the
file. This was observed on a ppc64le machine by Red Hat QE.
Just making the sleep longer should fix that problem and it doesn't
really effect the total test time because we stop the container
afterwards so there is no extra delay added with this either.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This reverts commit f517e5216763f9e51729fa277e8e0045a484d950.
The issue #24219 has been fixed a long time ago and this no longer
flakes so we do not need to run with debug logs all the time.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
- Removal of a note in the build-context documentation about remote Podman client limitations
- Removal of skip statements for build-context tests in the test suite
Pull request #26628 adds support for --build-context for the remote client.
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
In explanation of chrootdirs option, leading / is dropped
from podman managed file path (/etc/hostname). So this PR
adds leading /.
Signed-off-by: Vanou Ishii <ishii.vanou@fujitsu.com>
For exec and attach use an upgrade request which the server responds
with HTTP 101 status. Since go 1.12 the Body can be casted to an
io.Writer and then use that to write to the server.
This does however not allow us to skip the ugly hack of overwriting
the default dialContext() because the ReadWriterCloser on the body
does not allow us to call CloseWrite() which is critical to correctly
close the stdin side. So we still have to extract the underlying
net.Conn for that.
Using the cast response.Body is important because the underlying http
lib reads from the socket to parse the header and response code of
course and it is possible that it read more content than needed that is
kept in its buffer but because we then only directly read from the
connection it was possible we miss the first few bytes of the message.
This should fix the issue and hopefully also some long standing
podman-remote missing output flakes in CI.
Fixes: #26951
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This reverts commit c12b1b32bc165766c1aa229ca05432c75cc74c3b.
The content contains incorrect information and misses a lot of details
from the previous page that must be restored.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
When `/proc/sys/fs/binfmt_misc` is not mounted, filepath.WalkDir may return
fs.ErrNotExist errors. These should be handled gracefully and return nil
instead of causing a panic.
Signed-off-by: Peiyuan Song <squallatf@gmail.com>
They require go 1.24 and now that we bumped it we can update them. Seem
easier to do it her eonce than having to wait for renovate to update
each individually.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Using golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize
+ some manual cleanup in libpod/lock/shm/shm_lock_test.go as it
generated an unused variable
+ restored one removed comment
Signed-off-by: Paul Holzinger <pholzing@redhat.com>