18132 Commits

Author SHA1 Message Date
6e64959a34 Merge pull request #17608 from edsantiago/rootless_bud_tests_in_cron
CI: new rootless buildah-bud tests (cron only)
2023-02-23 22:34:45 +01:00
5a08ddaecc CI: new rootless buildah-bud tests (cron only)
Run rootless bud tests as part of the nightly treadmill job.

Reason: #17480 could have been caught before release.

Also: refactored bot this and bud_test_task (the task which
I copypasted to form this one) to use *stdenvars; thanks
@cevich for catching that.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-02-23 10:27:01 -07:00
a3af0f6b92 Merge pull request #17615 from vrothberg/RUN-1788
sqlite: complete Pod methods
2023-02-23 16:33:39 +01:00
949b3acb82 Merge pull request #17589 from giuseppe/add-warning-rootless-system-service-cgroupv1
system: add warning when running rootless on cgroupv1
2023-02-23 14:25:19 +01:00
5d2d609be4 sqlite: fix volume lookups with partial names
Requires the trailing `%` to work correctly, see
        https://www.sqlitetutorial.net/sqlite-like/

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-23 13:56:58 +01:00
1cfb29d8ed Merge pull request #17602 from vyasgun/pr/context
docs: context is not optional for build
2023-02-23 13:48:36 +01:00
495314a16a sqlite: fix container lookups with partial IDs
Requires the trailing `%` to work correctly, see
	https://www.sqlitetutorial.net/sqlite-like/

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-23 13:47:32 +01:00
efe7aeb1da sqlite: fix LookupPod
To return the error message expected by the system tests.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-23 13:42:41 +01:00
19c2f37ba5 sqlite: fix pod create/rm
A number of fixes for pod creation and removal.

The important part is that matching partial IDs requires a trailing `%`
for SQL to interpret it as a wildcard.  More information at
	https://www.sqlitetutorial.net/sqlite-like/

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-23 13:38:17 +01:00
e32bea9378 sqlite: LookupContainer: update error message
As expected by the system tests.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-23 11:36:47 +01:00
565bb56454 sqlite: AddContainerExitCode: allow to replace
Allow to replace existing exit codes.  A container may be started and
stopped multiple times etc.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-23 11:30:46 +01:00
4b3b944733 system: add warning when running rootless on cgroupv1
when running rootless on cgroupv1, Podman+OCI runtime do not setup a
separate cgroup for the container.  Spawned containers will run in the
same cgroup as the podman system service process, thus will be killed
when the cgroup is destroyed, as it is the case when running as a
systemd service.

[NO NEW TESTS NEEDED]

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2170444

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-02-23 11:28:05 +01:00
1b1cdfa357 sqlite: fix AllContainers with state
The state has been unmarshalled into the config which surfaced in wrong
states.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-23 11:19:43 +01:00
afa0167d47 Merge pull request #17601 from ygalblum/quadlet-do-not-set-runtime
Quadlet - use the default runtime
2023-02-23 10:54:48 +01:00
21fcc9070f sqlite: fix "UPDATE TABLE" typos
"TABLE" should refer to the actual table.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-23 10:48:11 +01:00
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
0d75854c52 Quadlet - use the default runtime
Do not set the runtime when processing a .container file
Let Podman choose the runtime based on its configuration

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2023-02-23 09:29:39 +02:00
49d560e1b0 docs: context is not optional for build
[NO NEW TESTS NEEDED]

Closes: https://github.com/containers/podman/issues/17568
Signed-off-by: vyasgun <vyasgun20@gmail.com>
2023-02-23 09:18:51 +05:30
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