Commit Graph

24069 Commits

Author SHA1 Message Date
Farya L. Maerten
2597eeae70 Add key to control if a container can get started by its pod
By default today, the container is always started if its pod is also
started. This prevents to create custom with systemd where containers in
a pod could be started through their `[Install]` section.

We add a key `StartWithPod=`, enabled by default, that enables one to
disable that behavior.

This prevents the pod service from changing the state of the container
service.

Fixes #24401

Signed-off-by: Farya L. Maerten <me@ltow.me>
2024-11-05 08:39:23 +01:00
Daniel J Walsh
c6be5a6684 Honor users requests in quadlet files
Fixes: https://github.com/containers/podman/issues/24322

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-11-04 15:08:26 -05:00
openshift-merge-bot[bot]
df41725d61 Merge pull request #24461 from edsantiago/stop-trap-timeout
CI: systests: workaround for parallel podman-stop flake
2024-11-04 18:56:59 +00:00
openshift-merge-bot[bot]
0f25d9ee15 Merge pull request #24406 from Luap99/event-api-response
fix API issue about missing the status code in the events and logs endpoints
2024-11-04 18:54:14 +00:00
openshift-merge-bot[bot]
2da164c9f2 Merge pull request #24459 from arixmkii/contrib-le
Fix inconsistent line ending in win-installer project
2024-11-04 18:48:44 +00:00
Ed Santiago
2c01264568 CI: systests: workaround for parallel podman-stop flake
Just bump up a timeout when running parallel, because of high load.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-11-04 10:45:14 -07:00
openshift-merge-bot[bot]
2279a77303 Merge pull request #24403 from Luap99/tools-vendor
go.mod vendor: ensure we never have the toolchain directive set
2024-11-04 17:15:12 +00:00
Arthur Sengileyev
528b085438 Fix inconsistent line ending in win-installer project
Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
2024-11-04 16:56:20 +02:00
openshift-merge-bot[bot]
63b577e03e Merge pull request #24450 from containers/renovate/github.com-opencontainers-runc-1.x
fix(deps): update module github.com/opencontainers/runc to v1.2.1
2024-11-04 11:56:08 +00:00
openshift-merge-bot[bot]
9b8b2bf684 Merge pull request #24449 from ygalblum/quadlet-mount-image
Quadlet - support image file based mount in container file
2024-11-04 10:20:33 +00:00
renovate[bot]
5ae5ab8c26 fix(deps): update module github.com/opencontainers/runc to v1.2.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-02 00:04:36 +00:00
openshift-merge-bot[bot]
7567cc1fcd Merge pull request #24421 from Luap99/podman-clean-transient
make podman-clean-transient.service work as user
2024-11-01 22:34:10 +00:00
openshift-merge-bot[bot]
a109f22eec Merge pull request #24431 from ntrrgc/2024-10-31-doc-interactive
doc: explain --interactive in more detail
2024-11-01 22:31:26 +00:00
Ygal Blum
dbfc8cccda Quadlet - support image file based mount in container file
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2024-11-01 16:20:23 -04:00
Paul Holzinger
e6d987882e API: container logs flush status code
API clients expect the status code quickly otherwise they can time out.
If we do not flush we may not write the header immediately and only when
futher logs are send.

Fixes #23712

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-11-01 18:54:13 +01:00
Paul Holzinger
768ad8653a rework event code to improve API errors
One of the problems with the Events() API was that you had to call it in
a new goroutine. This meant the the error returned by it had to be read
back via a second channel. This cuased other bugs in the past but here
the biggest problem is that basic errors such as invalid since/until
options were not directly returned to the caller.
It meant in the API we were not able to write http code 200 quickly
because we always waited for the first event or error from the
channels. This in turn made some clients not happy as they assume the
server hangs on time out if no such events are generated.

To fix this we resturcture the entire event flow. First we spawn the
goroutine inside the eventer Read() function so not all the callers have
to. Then we can return the basic error quickly without the goroutine.
The caller then checks the error like any normal function and the API
can use this one to decide which status code to return.
Second we now return errors/event in one channel then the callers can
decide to ignore or log them which makes it a bit more clear.

Fixes c46884aa93 ("podman events: check for an error after we finish reading events")
Fixes #23712

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-11-01 18:54:13 +01:00
Paul Holzinger
e3abf5c9e8 events: remove memory eventer
This type is unsused, undocumented and basically broken. If this would
be used anywhere it will just deadlock after writing 100+ events without
reading as the channel will just be full.

It was added in commit 8da5f3f733 but never used there nor is there any
justification why this was added in the commit message or PR comments.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-11-01 18:53:09 +01:00
Paul Holzinger
6348778348 libpod: log file use Wait() over event API
Using the internal Wait() API over the events API as this is much more
efficient. Reading events will need to read a lot of data otherwise.

For the function here it should work fine and it is even better as it
does not depend on the event logger at all.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-11-01 18:53:08 +01:00
openshift-merge-bot[bot]
af34b2db47 Merge pull request #24441 from containers/renovate/golang.org-x-exp-digest
fix(deps): update golang.org/x/exp digest to f66d83c
2024-11-01 16:03:41 +00:00
openshift-merge-bot[bot]
a1a2b223cb Merge pull request #24446 from containers/renovate/github.com-shirou-gopsutil-v4-4.x
fix(deps): update module github.com/shirou/gopsutil/v4 to v4.24.10
2024-11-01 14:16:27 +00:00
openshift-merge-bot[bot]
3cd247090f Merge pull request #24440 from containers/renovate/github.com-opencontainers-runtime-tools-digest
fix(deps): update github.com/opencontainers/runtime-tools digest to 6c9570a
2024-11-01 13:18:40 +00:00
openshift-merge-bot[bot]
496e7ca024 Merge pull request #24381 from t4chib4ne/kube-play-wait-interval
stop podman kube play --wait from using 100% CPU
2024-11-01 12:51:09 +00:00
Paul Holzinger
0acd192b59 Makefile: vendor target should always remove toolchain
We never want the toolchain as the default is to use the same as the go
version. So the only purpose of toolchain is to force a newer compiler
than necessary which we do not want as we are getting build by many
different distributions and block builds that would otherwise work fine
is just not helpful to anyone.

Also update the go.mod comments remind people that there should be no
toolchain. The make vendor target with the toolchain will now guarantee
this so the CI will fail otherwise.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-11-01 13:23:01 +01:00
Paul Holzinger
ef20e75a77 cirrus: check consitent vendoring in test/tools
Ensure nobody modifies files directly there.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-11-01 13:23:01 +01:00
Paul Holzinger
f4ad93d5f6 test/tools/go.mod: remove toolchain
Like our main go.mod we never want to force a specific toolchain.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-11-01 13:23:01 +01:00
openshift-merge-bot[bot]
d40ff2a0de Merge pull request #24438 from containers/renovate/github.com-linuxkit-virtsock-digest
fix(deps): update github.com/linuxkit/virtsock digest to cb6a20c
2024-11-01 11:39:49 +00:00
renovate[bot]
3f15f710ce fix(deps): update module github.com/shirou/gopsutil/v4 to v4.24.10
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-01 11:10:49 +00:00
openshift-merge-bot[bot]
fbeae58474 Merge pull request #24443 from containers/renovate/github.com-onsi-gomega-1.x
fix(deps): update module github.com/onsi/gomega to v1.35.1
2024-11-01 11:09:24 +00:00
renovate[bot]
d8311353b9 fix(deps): update module github.com/onsi/gomega to v1.35.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-01 09:09:55 +00:00
Alicia Boya García
37c8e10031 doc: explain --interactive in more detail
Clarifies the behavior of --interactive in both attached and unattached
scenarios.

Adds a caveat and explanation for --interactive being hungry as
described in https://github.com/containers/podman/issues/24370.

Signed-off-by: Alicia Boya García <aboya@igalia.com>
2024-11-01 08:23:08 +01:00
renovate[bot]
cd1b6b7121 fix(deps): update golang.org/x/exp digest to f66d83c
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-01 07:00:20 +00:00
renovate[bot]
2dff79bd2c fix(deps): update github.com/opencontainers/runtime-tools digest to 6c9570a
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-01 03:27:02 +00:00
renovate[bot]
5722304613 fix(deps): update github.com/linuxkit/virtsock digest to cb6a20c
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-01 02:37:51 +00:00
openshift-merge-bot[bot]
de990415a2 Merge pull request #24423 from Luap99/debug-23913
Instrument cleanup tracer to log weird volume removal flake
2024-10-31 11:58:12 +00:00
Maximilian Hueter
314dece926 add default polling interval to Container.Wait
Signed-off-by: Maximilian Hueter <maximilian.hueter@icloud.com>
2024-10-30 20:00:52 +01:00
Paul Holzinger
d633824a95 Instrument cleanup tracer to log weird volume removal flake
Debug for #23913, I though if we have no idea which process is nuking
the volume then we need to figure this out. As there is no reproducer
we can (ab)use the cleanup tracer. Simply trace all unlink syscalls to
see which process deletes our special named volume. Given the volume
name is used as path on the fs and is deleted on volume rm we should
know exactly which process deleted it the next time hopefully.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-30 18:50:07 +01:00
Paul Holzinger
6b8e8cbbf7 make podman-clean-transient.service work as user
In the user session there is no boot-complete.target so the Requires=
fails. We do not need it and I am not sure if we need it for the root
unit either but I deicded to keep it there to not change anything and
for the user session we patch it out.

I patched this in the Makefile, while we could try to define two
different source files for that it would make the Makefile logic even
more complicated. In particular as this file is a .in we would need to
add it to PODMAN_GENERATED_UNIT_FILES and then somehow fix the loop. To
much work IMO so the sed trick to patch the user file is simpler.

Fixes #23790

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-30 18:19:36 +01:00
openshift-merge-bot[bot]
f139bc17b3 Merge pull request #24407 from Luap99/readthedocs
readthedocs: build extra formats
2024-10-30 14:50:11 +00:00
openshift-merge-bot[bot]
5751154e54 Merge pull request #23847 from afbjorklund/ssh-config-main
Add support for ssh_config for connection
2024-10-30 14:41:55 +00:00
openshift-merge-bot[bot]
c8238a999f Merge pull request #24417 from Luap99/pasta2
libpod: use pasta Setup() over Setup2()
2024-10-30 14:39:11 +00:00
openshift-merge-bot[bot]
c3abb8d7f0 Merge pull request #24409 from Luap99/machine-doc
docs: fix broken example
2024-10-30 14:36:24 +00:00
openshift-merge-bot[bot]
9156eae143 Merge pull request #24404 from Luap99/machine-debug
pkg/machine/e2e: remove debug
2024-10-30 14:33:43 +00:00
Anders F Björklund
b455f94ca8 Add default remote socket path if empty
Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2024-10-30 14:44:44 +01:00
Anders F Björklund
48a8a9c22c Use current user if no user specified
Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2024-10-30 14:44:44 +01:00
Anders F Björklund
e523734ab6 Add support for ssh_config for connection
Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2024-10-30 14:44:44 +01:00
openshift-merge-bot[bot]
daf0b52b74 Merge pull request #24414 from containers/renovate/github.com-onsi-ginkgo-v2-2.x
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.21.0
2024-10-30 13:22:09 +00:00
Paul Holzinger
c98538db7d libpod: use pasta Setup() over Setup2()
Setup2() calls Setup() so they are both the same thing, the idea was to
keep Setup2() around in c/common for a bit to avoid breaking changes
during our regular vendoring. Now just use Setup() so we can get rid of
Setup2() in c/common.

a7415c3eab

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-30 13:35:56 +01:00
renovate[bot]
c7ff3b75cb fix(deps): update module github.com/onsi/ginkgo/v2 to v2.21.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-30 12:17:30 +00:00
openshift-merge-bot[bot]
db6e837d82 Merge pull request #24415 from containers/renovate/github.com-onsi-gomega-1.x
fix(deps): update module github.com/onsi/gomega to v1.35.0
2024-10-30 11:23:55 +00:00
renovate[bot]
5a1bc6126e fix(deps): update module github.com/onsi/gomega to v1.35.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-30 01:56:51 +00:00