18115 Commits

Author SHA1 Message Date
3f96b0ef28 sqlite: SaveVolume: fix syntax error updating the volumes table
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-23 10:35:48 +01:00
7c11f7e174 sqlite: exit code: allow -1
The value of -1 is used when we do not _yet_ know the exit code of the
container.  Otherwise, the DB checks would error.  There's probably a
smarter than allowing -1 but for now, that will do the trick and let the
tests progress.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-23 10:35:48 +01:00
e74f7bcaf3 sqlite: fix typo when removing exec sessions
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-23 10:35:48 +01:00
560805ac4c sqlite: AllContainers: fix inner join
The base table was missing, so we caused a syntax error.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-23 10:35:48 +01:00
8c64c4370f sqlite: move migration after table creation
Otherwise we'll fail immediately as the schema version is returned as 0.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-23 10:35:48 +01:00
eeabe975ea sqlite: implement pod methods
[NO NEW TESTS NEEDED] - the sqlite backend is still in development and
is not enabled by default.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-23 10:35:41 +01:00
3796e22761 Merge pull request #17586 from mheon/add_sql_state
Add initial SQLite-backed state implementation
2023-02-23 09:11:05 +01:00
03aaa8d350 Fix an incorrect comment on NewSqliteState
Signed-off-by: Matt Heon <mheon@redhat.com>
2023-02-22 19:24:36 -05:00
1eccb010db Merge pull request #17597 from baude/machinerefactor2
Machine refactor for QEMU/AppleHV
2023-02-22 19:45:18 +01:00
5012042a55 Merge pull request #17604 from lsm5/spec-fixes
[CI:BUILD] spec.rpkg: trim dependency list
2023-02-22 19:39:58 +01:00
7fba1db31a Merge pull request #17526 from danishprakash/fix-kube-secret
kube: rm secret on down, print secret on play
2023-02-22 19:34:18 +01:00
efbc35601f Merge pull request #17305 from cevich/swap_ubuntu_debian
Replace Ubuntu -> Debian SID
2023-02-22 19:31:45 +01:00
eb228f2644 Add support for containers.conf database setting
Signed-off-by: Matt Heon <mheon@redhat.com>
2023-02-22 12:59:01 -05:00
59a54f32dc Add support for volume operations to SQLite state
Signed-off-by: Matt Heon <mheon@redhat.com>
2023-02-22 11:00:50 -05:00
c0b92bdbc7 Implement exec session handling in SQL database
Signed-off-by: Matt Heon <mheon@redhat.com>
2023-02-22 11:00:50 -05:00
627a5b73bf Various fixes from code review
Signed-off-by: Matt Heon <mheon@redhat.com>
2023-02-22 11:00:50 -05:00
c4fe0af2aa Remove --namespace flag from Podman root
Signed-off-by: Matt Heon <mheon@redhat.com>
2023-02-22 11:00:50 -05:00
89d0ccd195 Get E2E tests to pass
Signed-off-by: Matt Heon <mheon@redhat.com>
2023-02-22 11:00:50 -05:00
97499a70aa Implement network disconnect for SQLite state
Signed-off-by: Matt Heon <mheon@redhat.com>
2023-02-22 11:00:50 -05:00
939a4ccef4 Implement Network Connect/Modify for SQLite state
Signed-off-by: Matt Heon <mheon@redhat.com>
2023-02-22 11:00:50 -05:00
8ab18d8482 Fix various lint issues
Signed-off-by: Matt Heon <mheon@redhat.com>
2023-02-22 11:00:50 -05:00
b4c4f9c93d Some further work on SQLite state
- Added a mechanism to check schema version and migrate
  (no migrations yet since schema hasn't changed yet).
- Added pod support to AddContainer, and unified AddContainer and
  RemoveContainer between containers and pods.
- Fixed newly-added GetPodName and GetCtrName in BoltDB so they
  only return pod/container names.

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-02-22 11:00:50 -05:00
5c2a0670fc Remove concept of Namespaces from BoltDB
This has been broken since we added Volumes - so, Podman v0.12.1
(so, around 5 years). I have no evidence anyone is using it in
the wild. It doesn't really function as expected. And it's a lot
of extraneous code and tests for the database.

Rip it out entirely, we can re-add once BoltDB is gone if there
is a requirement to do so.

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-02-22 11:00:50 -05:00
1b968c6074 Add initial SQLite-backed state implementation
This contains the implementation of (most) container functions,
with stubs for all pod and volume functions. Presently accessed
via environment variable only for testing purposes.

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-02-22 11:00:50 -05:00
93e7cc119a Cirrus: Support runc testing on debian VMs
Also remove disused `gitlab` test setup.  This test was disabled a
while ago and is unlikely to ever be revived.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-22 10:55:13 -05:00
81f116c59c Skip all pasta tests
A horrible timeout-flake exists in the version presently in CI VM images
`c20230221t162829z-f37f36d12`.  Since the PR for adding the 2023-02-21
images is more urgently needed (#17305) than a pasta fix, skip all pasta
tests while waiting for a fix.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-22 10:55:12 -05:00
642e9ddb8d Skip buildah-bud test
Test is completely broken, see buildah issue 4396.

Thanks to @edsantiago for the patch.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-22 10:44:03 -05:00
10382d0bca Skip buildx test with VFS podman storage driver
Ref: https://github.com/containers/podman/issues/17520

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-22 10:44:03 -05:00
dd51b62b7a Skip 'podman kube --network' test for rootless CGv1
Test emits nasty warning message:
`Resource limits are not supported and ignored on cgroups V1 rootless
systems`

Ref: issue #17582

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-22 10:43:19 -05:00
197529f084 Skip tests which fail with CGv1 & runc
* Skip play-kube test when runc is in use #17436
* Skip uid/gidmapping idmapped-volume test #17433

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-22 10:35:03 -05:00
d71c341b94 Merge pull request #17603 from edsantiago/bats_cleanup
Logs follow-until tests: loosen checks
2023-02-22 16:32:01 +01:00
5b4f248a84 Skip rootless CGv1 quadlet tests due to issue
Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-22 10:31:18 -05:00
e19922d090 Makefile: Define SHELL
When undefined make defaults to `/bin/sh` which is *NOT* the same on all
platforms.  For example, on Fedora it's a symlink to `/bin/bash` but on
Debian, it's a symlink to `/bin/dash`.  Remove any/all ambiguity by
declaring the shell to be bash forever and evermore.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-22 10:31:18 -05:00
43eb35a772 Machine refactor for QEMU/AppleHV
in preparation for adding hyper as a machine option, several common
functions needed to be moved specifically from qemu to a common area in
pkg/machine.  this usually involved functions and variables related to
using fcos as a machine image as well as its compression, artifact, and
image format.

[NO NEW TESTS NEEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-02-22 09:00:24 -06:00
e838ad86b8 machine refactoring preparations for hyperv
before we can support hyperv as a virtualization option for podman
machine, several areas in machine will require cleanup.  this is the
first pass of these changes to keep the review burden low.  changes
include:

  * convert artifact, format (image format) and compression to enums
    with string methods
  * rename Provider interface to VirtProvider
  * change Provider implementation in QEMU to QEMUVirt
  * change Provider implementation in WSL to WSLVirt

as mentioned earlier, there will be several more of these refactoring
PRs because assumptions were made about associations of platforms and
virt providers as well as compression and image formats.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-02-22 08:21:07 -06:00
b4471c6ed6 [CI:BUILD] spec.rpkg: trim dependency list
The `containers-common-extra` subpackage of `containers-common` handles
all the dependencies common to podman and buildah. So, it's best to
remove those from podman's spec.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-02-22 19:29:06 +05:30
d5a82485a1 Merge pull request #17577 from giuseppe/idmapping-mounts-always-direct-mapping
libpod: always use direct mapping for idmapped mounts
2023-02-22 14:53:33 +01:00
12153da837 Logs follow-until tests: loosen checks
...in hopes of fixing a flake with podman-remote. It's still
possible that there's a real problem with logs under remote,
and this will just sweep that under the rug.

Also, fix a nasty-red test warning (add cleanup), refactor
uses of $(pause_image), and improve a few test assertions.

Closes: #17286

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-02-22 06:24:51 -07:00
38c91945a6 Merge pull request #17578 from Luap99/netavark-dns
netavark: only use aardvark ip as nameserver
2023-02-22 14:04:12 +01:00
44bd6dd1fc Merge pull request #17594 from Luap99/compat-network-create
compat API: network create return 409 for duplicate
2023-02-21 22:47:30 +01:00
1a4c83b48b Merge pull request #17596 from cevich/bump_docs
[CI:DOCS] Windows/Mac docs link update
2023-02-21 20:28:17 +01:00
7d17ec07fc [CI:DOCS] Windows/Mac docs link update
Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-21 12:04:56 -05:00
4b4b423b6c compat API: network create return 409 for duplicate
If the name already exists and CheckDuplicate is set we need to return
409, if CheckDuplicate is not set we return the network without error.

Fixes #17585

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-02-21 16:55:27 +01:00
36db47df98 Merge pull request #17588 from ygalblum/quadlet-logdriver
Quadlet: Add support for LogDriver key in container and kube units
2023-02-21 16:24:03 +01:00
ea66c7bfd2 Merge pull request #17591 from vrothberg/vendor-common
vendor c/common@852ca05a1f
2023-02-21 16:00:40 +01:00
40f21da0c6 Apply suggestions to man page
Change podman to Podman
Add a period at the end of all sentences

Co-authored-by: Valentin Rothberg <vrothberg@redhat.com>
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-02-21 15:37:58 +02:00
adacd3b127 vendor c/common@852ca05a1f
Also force an update of c/image to prevent a downgrade.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-21 14:06:42 +01:00
6a3757b73a Quadlet: Add support for LogDriver key in container and kube units
Allow the user to set the log driver while keeping the default of passthrough

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-02-21 11:56:35 +02:00
bac20d1917 Merge pull request #17584 from baude/machinerefactor1
machine refactoring preparations for hyperv
2023-02-20 22:24:41 +01:00
ebb45b5bdd machine refactoring preparations for hyperv
before we can support hyperv as a virtualization option for podman
machine, several areas in machine will require cleanup.  this is the
first pass of these changes to keep the review burden low.  changes
include:

  * convert artifact, format (image format) and compression to enums
    with string methods
  * rename Provider interface to VirtProvider
  * change Provider implementation in QEMU to QEMUVirt
  * change Provider implementation in WSL to WSLVirt

as mentioned earlier, there will be several more of these refactoring
PRs because assumptions were made about associations of platforms and
virt providers as well as compression and image formats.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-02-20 13:43:49 -06:00