20575 Commits

Author SHA1 Message Date
5d5facbd79 Quadlet - add support for KubeDownForce
Allow users to set --force for Stop command
Add doc and tests

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-10-17 14:43:01 +03:00
5853e2bee9 Merge pull request #20363 from ygalblum/quadlet-kube-oneshot-test
System Test - Quadlet kube oneshot
2023-10-17 10:53:40 +00:00
6ba67ba96c System Test - Quadlet kube oneshot
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-10-17 11:15:11 +03:00
206177c592 Merge pull request #20376 from edsantiago/buildah_tests
buildah-bud: test relative TMPDIR
2023-10-17 04:50:10 +00:00
ae707b58d8 Merge pull request #20338 from umohnani8/vendor-common
Update common and buildah vendor
2023-10-17 04:48:17 +00:00
acc7a94dfc Merge pull request #20235 from rhatdan/read-only
Fix handling of --read-only-tmpfs flag
2023-10-16 21:22:53 +00:00
dcb421bc5b buildah-bud: test relative TMPDIR
(buildah PR 5084). Should actually have been added as a bud.bats
test in that PR, but I didn't catch it in time.

Also, remove an obsolete bud-tests skip

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-10-16 14:11:35 -06:00
c8604081e8 Fix handling of --read-only-tmpfs flag
Fixes: https://github.com/containers/podman/issues/20225

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-10-16 14:18:55 -04:00
1b0be2f348 Vendor common and buildah main
Update the common and buildah vendor to pull in the
platform code move.

[NO NEW TESTS NEEDED]

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-10-16 13:35:29 -04:00
dabf6c83a7 Merge pull request #20367 from flouthoc/bump-and-test-buildah
buildah: bump to `v1.32.1-0.20231012130144-244170240d85` and test builds with relative `TMPDIR`
2023-10-16 14:44:18 +00:00
091d83d3c9 Merge pull request #20360 from containers/renovate/github.com-vbauerster-mpb-v8-8.x
fix(deps): update module github.com/vbauerster/mpb/v8 to v8.6.2
2023-10-16 12:57:30 +00:00
5db3b753af remote,build: wire unsetlabels
Signed-off-by: Aditya R <arajan@redhat.com>
2023-10-16 15:34:02 +05:30
331e47acb1 test: build with TMPDIR as relative
Test edge-case described here: https://github.com/containers/buildah/pull/5084
Test case in: RHEL-2598

Signed-off-by: Aditya R <arajan@redhat.com>
2023-10-16 14:02:31 +05:30
6cf3dd4931 docs: add unsetlabel
Signed-off-by: Aditya R <arajan@redhat.com>
2023-10-16 14:02:21 +05:30
64ff149324 vendor: bump buildah to v1.32.1-0.20231012130144-244170240d85
Signed-off-by: Aditya R <arajan@redhat.com>
2023-10-16 11:55:53 +05:30
74ed1d6e70 fix(deps): update module github.com/vbauerster/mpb/v8 to v8.6.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-14 05:10:56 +00:00
b5fec41f26 Merge pull request #20333 from baude/showinfo
Show client info even if remote connection fails
2023-10-13 21:52:47 +00:00
aa0e96e781 Merge pull request #20274 from ashley-cui/cleanup
Machine: Teardown on init failure
2023-10-13 14:22:46 +00:00
29f5c563e4 Show client info even if remote connection fails
When people report issues, we often ask for the result of `podman info`.
However, if the problem is the remote connection, it will error out with
no information at all.  This PR at least will report client information
before disclosing the connection error.  For example on Windows:

> .\bin\windows\podman.exe info
client:
  OS: windows/amd64
  provider: hyperv
  version: 4.8.0-dev
  host: null

Satisfies: RUN-1720

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-10-13 08:53:56 -05:00
3e86bece98 Merge pull request #20354 from containers/renovate/github.com-containers-libhvee-digest
fix(deps): update github.com/containers/libhvee digest to e51be96
2023-10-13 06:32:04 +00:00
52112fc5c1 fix(deps): update github.com/containers/libhvee digest to e51be96
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-13 03:19:39 +00:00
5afa949a43 Merge pull request #20322 from jakecorrenti/set-lock
Implement SetLock for all virt providers
2023-10-12 23:15:40 +00:00
6e40a5f9c6 Merge pull request #20348 from rhatdan/codespell
Run codespell
2023-10-12 22:39:26 +00:00
e4ef271376 Merge pull request #20347 from Luap99/healthcheck-event
healthcheck: make sure to always show health_status events
2023-10-12 18:15:58 +00:00
cb53bcf23f Run codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-10-12 12:45:44 -04:00
fb87f0a7bb Merge pull request #20337 from ygalblum/quadlet-kube-oneshot
Quadlet - support oneshot .kube files
2023-10-12 16:27:13 +00:00
987dc2b8bb SetLock for all virt providers
Implements a shared `GetLock` function for virtualization providers. Returns
a pointer to a lockfile used for serializing write operations.

[NO NEW TESTS NEEDED]

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2023-10-12 12:06:31 -04:00
61e0b64b91 Machine: Teardown on init failure
If init fails, or if a SIGINT is sent during init, podman machine should remove all files and configs
created during the init. This includes config jsons, image files, ssh
id's, and system connections. On Windows, the VM instances are also
unregistered.

Signed-off-by: Ashley Cui <acui@redhat.com>
2023-10-12 09:26:06 -04:00
99a14332ef healthcheck: make sure to always show health_status events
This fixes a regression caused by commit 7e6e267329, unfortunately this
was not caught during review as for some reason this works fine rootless
and only fails as root.

Because we set the systemd log level to notice in order to hide the unit
started/stopped messages to prevent spamming the journal the issue is
that this now also causes systemd to ignore the events we write to
journald as we also send them as info level.

To fix this we simply send health_status events now on notice level. I
decided against sending all events on notice as I think info is fine for
them. Whenever the notice level is right is of course debatable but
given it may contain the unhealthy message I think having this a notice
should be ok.

The main reason this made it through testing is because we do not rely
on the systemd unit to fire healthchecks in the tests as this is flaky.
There is one test were we rely on it though and I added a check there
to make sure events are displayed correctly when trigger via systemd.

Fixes #20342

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-12 15:02:32 +02:00
7b84b55daa Apply suggestions from code review
Co-authored-by: Valentin Rothberg <vrothberg@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-10-12 07:45:41 -04:00
8de7c48df5 Merge pull request #20340 from baude/rtd
[CI:DOCS]rtd: implement v2 build file
2023-10-11 20:16:48 +00:00
ca518888e7 [CI:DOCS]rtd: implement v2 build file
readthedocs has moved to a new build configuration and our builds are
failing because we have exceeded the grace time.  this pr puts in
compliance with their build system and should allow automatic builds of
our documentation to resume

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-10-11 14:35:32 -05:00
702f155288 Quadlet - support oneshot .kube files
Allow users to manually set the Service Type
Add test
Update README

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-10-11 18:56:29 +03:00
e5a099df69 Merge pull request #20177 from cevich/podman-machine-hyperv
Podman machine hyperv
2023-10-11 15:15:54 +00:00
d437ca8fdc Merge pull request #20328 from vrothberg/RUN-1936
api: add `compatMode` parameter to libpod's pull endpoint
2023-10-11 13:48:13 +00:00
3dcd6af6e8 Merge pull request #20329 from Luap99/deadlock
libpod: fix deadlock while parallel container create
2023-10-11 13:13:02 +00:00
cdab561094 Merge pull request #20286 from containers/renovate/golang.org-x-net-0.x
fix(deps): update module golang.org/x/net to v0.17.0
2023-10-11 11:03:35 +00:00
3cc9db8626 libpod: fix deadlock while parallel container create
When containers are created with a named volume it can deadlock because
the create logic tried to lock all volumes in a loop, this is fine if it
only ever creates a single container at any given time. However because
we multiple containers can be created at the same time they can cause a
deadlock between the volumes. This is because the order of the loop is
not stable, in fact it is based on the order of how the volumes were
specified on the cli.

So if you create two containers at the same time with
`-v vol1:/dir2 -v vol2:/dir2` and the other one with
`-v vol2:/dir2 -v vol1:/dir1` then there is chance for a deadlock.

Now one solution could be to order the volumes to prevent the issue but
the reason for holding the lock is dubious. The goal was to prevent the
volume from being removed in the meantime. However that could still
have happend before we acquired the lock so it didn't protect against
that.

Both boltdb and sqlite already prevent us from adding a container with
volumes that do not exists due their internal consistency checks.
Sqlite even uses FOREIGN KEY relationships so the schema will prevent us
from doing anything wrong.

The create code currently first checks if the volume exists and if not
creates it. I have checked that the db will guarantee that this will not
work:
Boltdb: `no volume with name test2 found in database when adding container xxx: no such volume`
Sqlite: `adding container volume test2 to database: FOREIGN KEY constraint failed`

Keep in mind that this error is normally not seen, only if the volume is
removed between the volume exists check and adding the container in the
db this messages will be seen wich is an acceptable race and a
pre-existing condition anyway.

[NO NEW TESTS NEEDED] Race condition, hard to test in CI.

Fixes #20313

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-11 11:40:35 +02:00
706b550801 Merge pull request #20323 from containers/renovate/github.com-cpuguy83-go-md2man-v2-2.x
fix(deps): update module github.com/cpuguy83/go-md2man/v2 to v2.0.3
2023-10-11 09:34:14 +00:00
2301320f67 fix(deps): update module golang.org/x/net to v0.17.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-11 09:25:08 +00:00
8b46e852ef api: add compatMode paramenter to libpod's pull endpoint
Add a new `compatMode` parameter to libpod's pull endpoint. If set, the
streamed JSON payload is identical to the one of the Docker compat
endpoint and allows for a smooth integration into existing tooling such
as podman-py and Podman Desktop, some of which already have code for
rendering the compat progress data.

We may add a libpod-specific parameter in the future which will stream
differnt progress data.

Fixes: issues.redhat.com/browse/RUN-1936?
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-10-11 10:58:05 +02:00
76fec12274 api: break out compat image pull
Break out the code for pulling images via the compat API. The goal is to
make this code shareable between the compat and libpod API to allow for
a "compat mode" in the libpod pull endpoint.

[NO NEW TESTS NEEDED] as it should not change behavior.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-10-11 10:14:14 +02:00
40f8976536 fix(deps): update module github.com/cpuguy83/go-md2man/v2 to v2.0.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-10 19:11:10 +00:00
27ca6d4870 Merge pull request #20321 from containers/renovate/github.com-nxadm-tail-1.x
fix(deps): update module github.com/nxadm/tail to v1.4.11
2023-10-10 19:10:25 +00:00
fd514b4982 Merge pull request #20318 from Luap99/db-backend
use sqlite as default database
2023-10-10 17:28:11 +00:00
29ae516006 use sqlite as default database
Use sqlite as default but for upgrades it will still use boltdb to avoid
breaking anyone. This is done by checking if the boltdb file already
exists and if it does then we have to use it.

I added a e2e test to check the new logic and removed the system test
for it, the problem with the system test is that we share the storage
dir there so all following commands without --db-backend would try to
use boltdb as a single --db-backend boltdb command will create the file
and then all folllwing commands will use it because of the backwards
compat. In e2e tests each test uses their own --root so it is not an
issue there.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-10 17:11:28 +02:00
8a52e638e6 vendor latest c/common
Includes the default db backend changes.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-10 17:08:04 +02:00
acd0a93c39 fix(deps): update module github.com/nxadm/tail to v1.4.11
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-10 14:26:48 +00:00
040a4e4b1e Merge pull request #20232 from umohnani8/ctr-create
Check for image with /libpod/containers/create
2023-10-09 20:17:19 +00:00
8615b165c8 Merge pull request #20299 from giuseppe/fix-flake-ENOENT
container: always check if mountpoint is mounted
2023-10-09 20:14:40 +00:00