-
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
API for quiesceing io on a subvolume. #958
Conversation
API update does not work since the PR in Ceph is in progress. |
You can either mark the dependency in the PR description or convert it to draft until its ready. We may also do both for better clarity. |
|
Thanks Anoop, I have added dependency in the PR description, can it be reviewed even if it is a draft PR? |
Draft PR indicate a work in progress code and generally doesn't call for reviews unless explicitly asked for. Similarly in this case you may have to make changes unless and until the underlying ceph support is finalized and merged. But from the looks of things it(ceph support) is almost complete. Thus I'll leave it up to you to decide. |
@manishym You could very well look into fixing the failure for CI check. Try running |
Hi @manishym I hope you don't mind but as a project admin I can convert your PR to draft, so I did it. The check errors seem similar to some errors I'm seeing on another project and I wonder if they were possibly triggered by the recent golang release. It might be good to run the check without your change and see if they occur on the head of master branch. If so, it could be good practice to try and submit a PR that just fixes those :-) |
I have fixed linting errors in my code. There are more issues because of revive 1.3.7, which I will fix in another PR. |
Converting to draft, since api changed in Ceph. |
aa6da79
to
47ba76e
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.
Sorry for the delay in direct feedback, I've been very busy lately.
I'd like you to start off by putting all the new APIs in a separate file. Go build tags work entirely on a file basis and go generally encourages more files over big files anyway. Call the new file quiesce.go
or something like that and new tests will be put in quiesce_test.go
. Then on both files we will need a set of build tags that exclude them from building on anything but main.
Does that make sense? Feel free to ask q's for clarification if needed. :-)
@Mergifyio rebase |
❌ Unable to rebase: user
|
@phlogistonjohn The ceph PR is merged. Do we need to wait till it is back ported to squid? |
We don't have to. However we could remove fs_quiesce_reef_test.go altogether and have the following build tag with an issue created to properly manage
If backport gets into squid branch add and remove @phlogistonjohn What do you think? |
I thought @nixpanic wanted the "negative" test case. Do I mis{remember,understand}? |
@Mergifyio rebase |
✅ Branch has been successfully rebased |
It is true, but it will not work because !squid test fails on main, since main has API, I can't remove ceph_preview from the api implementation, since it is preview. So can't actually run the negative test until API becomes stable. |
94030b9
to
71c8f7b
Compare
@anoopcs9 @phlogistonjohn Can you please merge this. I have disabled test on squid, it runs only on main. |
It's a bit complicated. Going forward we have to run the tests on Also is that the case that @nixpanic is in agreement here to have only one test file as @phlogistonjohn also wanted to have a clarity on this? |
My preference is to have a expected-to-fail test for We'll use this API in Ceph-CSI, and users tend to mix Ceph-CSI versions with almost any Ceph version. An error returned by this new API in case of older Ceph version could then be handled/reported differently than other errors. |
@anoopcs9 Before feature is merged in squid, the tag should be |
Since this feature itself is only available on ceph_preview, how does the build tag work for pre squid? In other words, what should be the build tag on cephfs/admin/fs_quiesce.go, as of now it is ceph_preview, since it is a new api. If I put ceph_preview || !squid, it would mean the api is no longer preview right? I need help understanding how to add a api which is both preview and works on all releases? |
The build-tag is important for the client application that calls the API. A Ceph client of any version can connect to a Ceph cluster running a different version. Because this is a Ceph Mgr extension, the Ceph client version is not really important here, it is only sending JSON, no cgo with linking to particular shared libraries that may or may not have certain symbols. I think the implementation in go-ceph does not need to depend on the Ceph version (but it could, just technically it is not needed). To me it is more important that the new API returns known errors when a Ceph version does not implement the quiesce functionality. That means only the tests depend on the Ceph version, so the two variations of If others prefer to have the new API excluded in pre-squid versions, I don't really mind. |
Every new API should be in ceph_preview right? |
cephfs has new quiesce feature for cephfs volume. This change add the feature to go-ceph. Signed-off-by: Manish <[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.
Thanks! Looks good to me.
@anoopcs9 I have addressed all the comments. Can you please let me know if there is something else needed to merge this? |
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!
Checklist
//go:build ceph_preview
make api-update
to record new APIsNew or infrequent contributors may want to review the go-ceph Developer's Guide including the section on how we track API Status and the API Stability Plan.
The go-ceph project uses mergify. View the mergify command guide for information on how to interact with mergify. Add a comment with
@Mergifyio
rebase
to rebase your PR when github indicates that the PR is out of date with the base branch.fixes #955
Depends on ceph/ceph#54485