Commit Graph

21445 Commits

Author SHA1 Message Date
Brent Baude 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
Ygal Blum 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
openshift-ci[bot] e5a099df69
Merge pull request #20177 from cevich/podman-machine-hyperv
Podman machine hyperv
2023-10-11 15:15:54 +00:00
openshift-ci[bot] 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
openshift-ci[bot] 3dcd6af6e8
Merge pull request #20329 from Luap99/deadlock
libpod: fix deadlock while parallel container create
2023-10-11 13:13:02 +00:00
openshift-ci[bot] 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
Paul Holzinger 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
openshift-ci[bot] 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
renovate[bot] 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
Valentin Rothberg 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
Valentin Rothberg 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
renovate[bot] 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
openshift-ci[bot] 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
openshift-ci[bot] fd514b4982
Merge pull request #20318 from Luap99/db-backend
use sqlite as default database
2023-10-10 17:28:11 +00:00
Paul Holzinger 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
Paul Holzinger 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
renovate[bot] 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
openshift-ci[bot] 040a4e4b1e
Merge pull request #20232 from umohnani8/ctr-create
Check for image with /libpod/containers/create
2023-10-09 20:17:19 +00:00
openshift-ci[bot] 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
Urvashi Mohnani d18369ee88 Check for image with /libpod/containers/create
The libpod containers create endpoint wasn't checking whether
the image existed before creating the container. If the image
doesn't exist, it should return a 404 status code but it was
failing and returning a 500 status code.
This fix matches the behavior of the compat endpoint.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-10-09 13:07:24 -04:00
Giuseppe Scrivano 8ac2aa7938
container: always check if mountpoint is mounted
when running as a service, the c.state.Mounted flag could get out of
sync if the container is cleaned up through the cleanup process.

To avoid this, always check if the mountpoint is really present before
skipping the mount.

[NO NEW TESTS NEEDED]

Closes: https://github.com/containers/podman/issues/17042

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-10-09 17:20:22 +02:00
openshift-ci[bot] d90fdfc639
Merge pull request #20311 from containers/renovate/github.com-onsi-ginkgo-v2-2.x
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.13.0
2023-10-09 14:54:01 +00:00
renovate[bot] 787b1b25c7
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.13.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-09 13:26:51 +00:00
openshift-ci[bot] b2c5418fb7
Merge pull request #20288 from albnnc/fix/do-not-ignore-external-containerfiles
fix: don't ignore containerfiles outside of build context
2023-10-09 13:25:29 +00:00
Giuseppe Scrivano 9beb3a9720
vendor: update c/storage
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-10-09 13:31:55 +02:00
openshift-ci[bot] 0dba5acd85
Merge pull request #20308 from giuseppe/drop-debug-msg
api: drop debug statement
2023-10-09 11:05:46 +00:00
openshift-ci[bot] 6e7e87503c
Merge pull request #20253 from ygalblum/quadlet-command-args
Quadlet - add support for global arguments
2023-10-09 09:01:36 +00:00
Giuseppe Scrivano 36bf905181
api: drop debug statement
remove what seems to be a debugging artifact.

[NO NEW TESTS NEEDED]

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-10-09 10:27:39 +02:00
Ygal Blum d321d427dc Quadlet - add support for global arguments
Add support for adding podman level arguments before subcommand
Add specific key for Containers Conf Modules
Global arguments are added for both start and stop commands
Adjust testing environment
Add tests
Add to man page

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-10-08 10:14:06 +03:00
openshift-ci[bot] e9d6ffa8f0
Merge pull request #20252 from vrothberg/privileged
containers.conf: add `privileged` field to containers table
2023-10-07 11:34:45 +00:00
openshift-ci[bot] b7f708a942
Merge pull request #20290 from containers/renovate/golang.org-x-tools-0.x
fix(deps): update module golang.org/x/tools to v0.14.0
2023-10-07 11:29:36 +00:00
openshift-ci[bot] 745cfb57dc
Merge pull request #20283 from containers/renovate/github.com-containers-libhvee-digest
fix(deps): update github.com/containers/libhvee digest to fcf1cc2
2023-10-07 11:27:02 +00:00
Aleksei Kosyrev 732cec794e Add system test
Signed-off-by: Aleksei Kosyrev <albnnc@gmail.com>
2023-10-07 10:55:51 +03:00
renovate[bot] 10aa390684
fix(deps): update module golang.org/x/tools to v0.14.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-06 14:03:02 +00:00
Aleksei Kosyrev 3fdb6ee2df Don't ignore containerfiles outside of build context
[NO NEW TESTS NEEDED]

Signed-off-by: Aleksei Kosyrev <albnnc@gmail.com>
2023-10-06 16:00:13 +03:00
renovate[bot] b3209dc5d6
fix(deps): update github.com/containers/libhvee digest to fcf1cc2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-06 11:08:10 +00:00
openshift-ci[bot] f4348bab66
Merge pull request #20279 from containers/renovate/golang.org-x-term-0.x
fix(deps): update module golang.org/x/term to v0.13.0
2023-10-06 11:04:52 +00:00
renovate[bot] eda2758206
fix(deps): update module golang.org/x/term to v0.13.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-06 07:29:25 +00:00
openshift-ci[bot] d36c90868f
Merge pull request #20277 from containers/renovate/golang.org-x-sys-0.x
Update module golang.org/x/sys to v0.13.0
2023-10-06 07:27:33 +00:00
openshift-ci[bot] b8084274cd
Merge pull request #20273 from giuseppe/bump-storage
vendor: bump c/storage
2023-10-06 06:26:03 +00:00
openshift-ci[bot] a7390a4083
Merge pull request #20276 from ashley-cui/rel
[CI:DOCS] Add updating version on podman.io to release process
2023-10-05 21:23:22 +00:00
renovate[bot] da6c86dfcb
Update module golang.org/x/sys to v0.13.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-05 21:21:40 +00:00
Ashley Cui 1c07800971 [CI:DOCS] Add updating version on podman.io to release process
Signed-off-by: Ashley Cui <acui@redhat.com>
2023-10-05 14:48:04 -04:00
Valentin Rothberg 362eca6691 containers.conf: add `privileged` field to containers table
As requested in containers/podman/issues/20000, add a `privileged` field
to the containers table in containers.conf.  I was hesitant to add such
a field at first (for security reasons) but I understand that such a
field can come in handy when using modules - certain workloads require a
privileged container.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-10-05 20:14:18 +02:00
Chris Evich 6cb10425d4
Implement secrets/credential scanning
As an effort to catch potential secrets and/or credential leaks, add a
github-actions workflow which is untouchable in a PR context.
To additionally guard against accidents, also check recent branch
history.  This is especially important on newly created
release-branches, which may begin with content from who-knows-where.

Finally, since the new workflow bypasses PR-level changes to the scanner
config and base-line.  Add a Cirrus-CI invocation of the scanning tool
to help catch tool-breaking changes from being merged.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-10-05 11:16:19 -04:00
openshift-ci[bot] ecef03d81c
Merge pull request #20271 from containers/renovate/golang.org-x-sync-0.x
Update module golang.org/x/sync to v0.4.0
2023-10-05 15:11:14 +00:00
Chris Evich 106abd13be
Cirrus: Execute Windows podman-machine e2e tests
Also, de-duplicate power-shell variables and functions as they're
beginning to sprawl.  This does not completely address all duplicates,
mainly those involved in the podman-machine CI workflow.  So,
nothing under `contrib/win-installer` has been touched.

[NO NEW TESTS NEEDED]

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-10-05 10:45:17 -04:00
Giuseppe Scrivano 338e4f5901
vendor: bump c/storage
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-10-05 15:31:49 +02:00
renovate[bot] 8807243cc8
Update module golang.org/x/sync to v0.4.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-05 12:39:37 +00:00
openshift-ci[bot] 158b11a10d
Merge pull request #20245 from jakecorrenti/qemu-wrapper
Create Qemu command wrapper
2023-10-05 12:38:30 +00:00