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

ceph-disk,osd: add support for crush device classes #14436

Merged
merged 3 commits into from Apr 18, 2017

Conversation

Projects
None yet
3 participants
@ghost

ghost commented Apr 10, 2017

@ghost ghost added core feature labels Apr 10, 2017

@ghost

This comment has been minimized.

ghost commented Apr 10, 2017

@liewegas could you please take a quick look at ecf934e ? It's passing tests and I'll split it into two commits for clarity. Unless you see something obviously wrong with it at first glance ;-)

@liewegas

This comment has been minimized.

Member

liewegas commented Apr 10, 2017

lgtm!

@liewegas

This comment has been minimized.

Member

liewegas commented Apr 10, 2017

The fallback to 'osd create' for both commands is sort of weird at first blush but makes sense since the crush location update (and/or device class) might be disabled.

mon: set-device-class implicitly creates OSD
If the OSD does not exist in the crushmap, it is implicitly created.

Signed-off-by: Loic Dachary <loic@dachary.org>

@ghost ghost changed the title from DNM: ceph-disk support for device class to ceph-disk support for device class Apr 10, 2017

@ghost ghost changed the title from ceph-disk support for device class to ceph-disk,osd: add support for crush device classes Apr 10, 2017

@ghost ghost requested a review from liewegas Apr 10, 2017

@ghost

This comment has been minimized.

ghost commented Apr 10, 2017

@liewegas thanks for the quick review :-) I split the commit in three for clarity and rebased after @yuriw merged the pull request it depended on. It should be ready for your final review.

@@ -1922,6 +1922,10 @@ def parser():
help='unique OSD uuid to assign this disk to',
)
parser.add_argument(
'--crush-class',

This comment has been minimized.

@liewegas

liewegas Apr 10, 2017

Member

should this be --crush-device-class maybe?

This comment has been minimized.

@ghost

ghost Apr 10, 2017

We already have ceph osd crush class {ls,rm,create} and it looked vaguely consistent to have --crush-class. But if it feels weird I can change it.

This comment has been minimized.

@ghost

ghost Apr 10, 2017

maybe we should change osd crush set-device-class to osd crush set-class so they all look the same ?

This comment has been minimized.

@ghost

ghost Apr 10, 2017

In the context CrushWrapper we use device but in the mon we use osd. In the context of ceph osd crush repeating device or even crush is redundant and we can just have set-class instead. I used set-device-class initially because the CrushWrapper function has the same name but in retrospect I think it was not a good idea.

This comment has been minimized.

@liewegas

liewegas Apr 10, 2017

Member

Ok I buy that argument. Let's go with it!

@@ -3021,6 +3021,43 @@ int OSD::shutdown()
return r;
}
int OSD::mon_cmd_maybe_osd_create(string &cmd) {

This comment has been minimized.

@liewegas

liewegas Apr 10, 2017

Member

nit: newline before {

This comment has been minimized.

@ghost

ghost Apr 10, 2017

oops, fixed and repushed

osd: split mon_cmd_maybe_osd_create out of update_crush_location
Signed-off-by: Loic Dachary <loic@dachary.org>
@ghost

This comment has been minimized.

ghost commented Apr 10, 2017

@liewegas I added b17989e to s/set-device-class/set-class/ and have crush-class when the OSD is implied or in context and class when both the OSD and crush are implied. It feels consistent to me right now but ...

@liewegas

This comment has been minimized.

Member

liewegas commented Apr 10, 2017

I think it's consistent, but I worry that we have both "type" and "class" and the user can be easily confused. If we refer to them as "bucket type" and "device class" throughout then they will be less likely to be mixed up...

@ghost

This comment has been minimized.

ghost commented Apr 10, 2017

that's sensible. Shall we change ceph osd crush class {rm,ls,create} to ceph osd crush device-class {rm,ls,create} then ?

@liewegas

This comment has been minimized.

Member

liewegas commented Apr 10, 2017

@ghost

This comment has been minimized.

ghost commented Apr 10, 2017

/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/erasure-code/test-erasure-eio.sh:85return 1
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/erasure-code/test-erasure-eio.sh:11return 1
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/erasure-code/test-erasure-eio.sh:17return 1
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/erasure-code/test-erasure-eio.sh:26return 1
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/erasure-code/test-erasure-eio.sh:39return 1

jenkins test this please

@ghost

This comment has been minimized.

ghost commented Apr 11, 2017

@liewegas I prefer class and crush_class over device_class :-)

@liewegas

This comment has been minimized.

Member

liewegas commented Apr 11, 2017

@ghost ghost added needs-qa and removed needs-qa labels Apr 11, 2017

ceph-disk,osd: add support for crush device classes
Fixes: http://tracker.ceph.com/issues/19513

Signed-off-by: Loic Dachary <loic@dachary.org>
@ghost

This comment has been minimized.

ghost commented Apr 11, 2017

repushed after renaming crush_class into crush_device_class

@ghost ghost added the needs-qa label Apr 12, 2017

@ghost

This comment has been minimized.

ghost commented Apr 12, 2017

@liewegas I think I addressed your remarks. Did I forget something ?

@yuriw

This comment has been minimized.

Contributor

yuriw commented Apr 18, 2017

@liewegas pls merge

@liewegas liewegas merged commit 8ded80f into ceph:master Apr 18, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment