62 Commits

Author SHA1 Message Date
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
03aaa8d350 Fix an incorrect comment on NewSqliteState
Signed-off-by: Matt Heon <mheon@redhat.com>
2023-02-22 19:24:36 -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
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
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