Skip to content

Refactor ceph-provider API and controllers #833

Description

@gonzolino

Summary

The current controllers (in internal/controllers package) of the ceph-provider have become complicated over time.

Main reason for this is that the API types (Image and Snapshot) do not strictly represent RBD images and snapshots (e.g. snapshots also maintain os-images in ceph under the hood), making the controller code complex with various interactions with ceph.

To allow for simplification of the controller code, we propose to add a new API type Volume. Incoming IRI Volumes will be translated directly to this new Volume type. A new volume controller will manage Image and Snapshot resources based on the volume type (data volume, OS base image, VM image, volume restored from snapshot). The image and snapshot controllers can then focus on the low-level management of RBD images and snapshots, while the volume controller handles high-level resource management without interacting with ceph directly.

Basic example

🚧 TODO

Motivation

Adjusting controller code in the current state is complicated and error-prone. Also, reviews are difficulr and take a long time. It is hard to understand changes to the controller behavior without manual tests.

Simplifying the current architecture should ease future development and make the code easier to understand and debug.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/storageStorage solutions and related concerns.enhancementNew feature or request

Type

Projects

  • Status
    No status
  • Status
    In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions