Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support OSD file backing #261

Merged
merged 2 commits into from
Nov 23, 2023
Merged

Support OSD file backing #261

merged 2 commits into from
Nov 23, 2023

Conversation

sabaini
Copy link
Collaborator

@sabaini sabaini commented Nov 20, 2023

Add support for auto-creating loopback backing for OSDs

Add support for auto-creating loopback backing for OSDs

Signed-off-by: Peter Sabaini <[email protected]>
Copy link
Contributor

@UtkarshBhatthere UtkarshBhatthere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a very quick review, LGTM in general, just a small nit and the CLI changes seem missing ?

microceph/ceph/osd.go Outdated Show resolved Hide resolved
Signed-off-by: Peter Sabaini <[email protected]>
@sabaini
Copy link
Collaborator Author

sabaini commented Nov 22, 2023

Did a very quick review, LGTM in general, just a small nit and the CLI changes seem missing ?

Thanks! I've now added longer help text for clarity

}

// Convert the size to MB.
switch strings.ToUpper(unit) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this catch invalid units as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The regexp should take care of that -- it matches only M, G or T. Anything else won't match and cause an "illegal spec" error

// AddOSD adds an OSD to the cluster, given the data, WAL and DB devices and their respective
// flags for wiping and encrypting.
func AddOSD(s *state.State, data types.DiskParameter, wal *types.DiskParameter, db *types.DiskParameter) error {
logger.Debugf("Adding OSD %s", data.Path)

var err error

// sanity: loopback file and WAL/DB are mutually exclusive
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a Ceph limitation? or something we don't support due to complexity in implementing it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My reasoning was that having loop files and using separate WAL/DB devices are orthogonal use cases, and we'd complicate implementation but also user interface surface without much benefit

@sabaini sabaini merged commit 5723d89 into canonical:main Nov 23, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants