-
Notifications
You must be signed in to change notification settings - Fork 36
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
Conversation
Add support for auto-creating loopback backing for OSDs Signed-off-by: Peter Sabaini <[email protected]>
There was a problem hiding this 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 ?
Signed-off-by: Peter Sabaini <[email protected]>
3373ec6
to
df2e26c
Compare
Thanks! I've now added longer help text for clarity |
} | ||
|
||
// Convert the size to MB. | ||
switch strings.ToUpper(unit) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
Add support for auto-creating loopback backing for OSDs