-
Notifications
You must be signed in to change notification settings - Fork 257
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
rbd: add mirroring support for nautilus #714
Conversation
Because this is a "backwards" looking feature I think the doc comment approach is best. I'd rather not make changes to the tooling to support a ceph release that's already deprecated. I appreciate that you use nautilus and want to use go-ceph, and that makes me quite pleased, but looking at the changes... Gee that's a lot of net new stuff for a release I had planned on dropping support for. In the meantime there's some CI errors related to your patches that need looking into (make check). |
4760455
to
5f6a6ea
Compare
CI should be fixed now - the one remaining failing test is a flaky test in I get your concerns about adding a big chunk of Nautilus-specific code, and that you want to discuss it with the other maintainers. If you need some time to decide, no rush! I will say that although Nautilus is EOL, it is only 3 years old, and it remains in decently widespread use - and some organizations are still on even earlier versions! As an example, just a few days ago someone submitted a large patch to to the Mimic branch of the ceph_exporter tool. My company (DigitalOcean) is moving towards Octopus and eventually Pacific, but it will be at least a year before all of our clusters are fully switched over; upgrading is slow when you are running many clusters, and large ones, as we are (a problem that I suspect other organizations that are heavy users of Ceph are also running into). In the meantime, me and my team are happy to be responsible for maintaining any Nautilus-specific code (and happy to work out any logistics with you on how best to get Nautilus-related bugs and requests routed to us). |
The documentation would not show up anyway AFAIK, because the doc generator doesn't set any tags. So I would also prefer that this doesn't go in the preview section but is completely "hidden" and disappears automatically whenever we have to delete the nautilus files, because something breaks. I don't mind adding "hidden" support for features of old versions, but I think it should not show up in docs or the api status. It must be "zero-cost" for the management of the current, supported versions. So as long as all the code stays in "nautilus-guarded" files, I'm ok. And of cause, no guarantees, it comes "as-is". |
Great, so it sounds like we'll take this (modulo review feedback, updates, etc) given that the majority of the maintenance costs will fall on @Sanford137 et al. At some point in the future we'll remove nautilus support but not until after the digital ocean team confirms it's no longer a must have. It would be nice to have an approximate date, emphasis on approximate, so that we can update issue #648 |
This pull request now has conflicts with the target branch. Could you please resolve conflicts and force push the corrected changes? 🙏 |
6cf32e3
to
6dc159b
Compare
I'm happy to hear you've decided to go ahead with the patch! I think I've addressed all of your feedback, let me know if there is anything else that needs fixing up. |
6dc159b
to
a0311d1
Compare
cd18fb5
to
c515cf3
Compare
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.
partial review
c515cf3
to
e54102f
Compare
Is there a way for me to re-run a test failure that I think is a flake? Also, would you like me to close conversations once I've addressed the comment? This page is getting a bit unwieldy, but I don't want to accidentally close anything that you still want to talk about. |
I don't know if you can see the re-run jobs button on the page https://github.com/ceph/go-ceph/actions/runs/2629992092 (and the like). As an admin I'm not sure what standard contributors see.
I've done it now. Usually I was something like 1 day for the original author of the sub-thread to close it and if it goes past that time I usually feel free to close them. It's not hard to reopen ("unresolve") one so I personally don't think its much of an issue. |
I cannot see the re-run button - will just ask for now! |
7913da9
to
4e3ff39
Compare
Does this need any other changes before it's ready to merge? |
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.
I have one small but necessary change to make. The Go code looks good to me at this point.
4e3ff39
to
f528855
Compare
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.
LGTM, thanks!
@ansiwen PTAL when you have a moment. Thanks! |
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.
Finished review. Just some small things, then it's good to go!
rbd/mirror_nautilus.go
Outdated
// Implements: | ||
// int rbd_mirror_image_disable(rbd_image_t image, bool force) | ||
func (image *Image) MirrorDisable(force bool) error { | ||
ret := C.rbd_mirror_image_disable(C.rbd_image_t(image.image), C.bool(force)) |
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.
dito
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.
Done!
rbd/mirror_nautilus.go
Outdated
// Implements: | ||
// int rbd_mirror_image_promote(rbd_image_t image, bool force) | ||
func (image *Image) MirrorPromote(force bool) error { | ||
ret := C.rbd_mirror_image_promote(C.rbd_image_t(image.image), C.bool(force)) |
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.
dito
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.
Done!
rbd/mirror_nautilus.go
Outdated
// Implements: | ||
// int rbd_mirror_image_demote(rbd_image_t image) | ||
func (image *Image) MirrorDemote() error { | ||
ret := C.rbd_mirror_image_demote(C.rbd_image_t(image.image)) |
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.
dito
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.
Done!
rbd/mirror_nautilus.go
Outdated
// Implements: | ||
// int rbd_mirror_image_resync(rbd_image_t image) | ||
func (image *Image) MirrorResync() error { | ||
ret := C.rbd_mirror_image_resync(C.rbd_image_t(image.image)) |
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.
dito
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.
Done!
f528855
to
ded821f
Compare
Pull request has been modified.
The librbd API for mirroring-related operations changed substantially between Nautilus and Octopus. Due to this, go-ceph had previously only implemented mirroring functionality if built against Octopus client libraries. This patch implements equivalent functionality for use with Nautilus clients. Signed-off-by: Sanford Miller <[email protected]>
ded821f
to
416b46d
Compare
Ready for another look! |
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.
LGTM, thanks!
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.
LGTM, thanks!
I've implemented mirroring support that is compatible with Nautilus clusters. It's a fairly different API from the one exposed for Octopus, since the underlying librbd interface changed so much between them.
It needs to be clear in the documentation that these methods are only available when using the
nautilus
build tag. One way to do that is just mention it in the documentation comments for all of them (not very DRY, but simple), another is to add a new section to the API docs, similar to the existing "preview" section, which would box off those methods into their own category. What approach would you like to take?Checklist
//go:build ceph_preview