mgr/vol: improve readability and tell readers why return value is zero#63554
mgr/vol: improve readability and tell readers why return value is zero#63554rishabh-d-dave wants to merge 1 commit intoceph:mainfrom
Conversation
Fixes: https://tracker.ceph.com/issues/71469 Signed-off-by: Rishabh Dave <ridave@redhat.com>
84b1f27 to
b998714
Compare
|
jenkins test make check arm64 |
|
jenkins test api |
| ve = VolumeException(ve.errno, ve.error_str + " (use --force to override)") | ||
| ret = self.volume_exception_to_retval(ve) | ||
| elif not (ve.errno == -errno.ENOENT and force): | ||
| elif ve.errno == -errno.ENOENT and force: |
There was a problem hiding this comment.
Do we really need to do it this way? Isn't it clear already with how the check looks now?
There was a problem hiding this comment.
I think it should be immediately evident to reader that it is by choice that subvolume rm is not idempotent BUT subvolume rm --force is. And the comment added below this line ensures that. And change this in line helps adding comment specifically for this case. Plus, having an explicit else also improve readability. Ofcourse readability is subjective and but being explicit for such cases is better IMO.
There was a problem hiding this comment.
@vshankar The QA run was successful. Can we mark this thread as resolved and merge this PR?
There was a problem hiding this comment.
As I said before, I don't find this change compelling. The bigger point is that this is not a good use of your time. And since this change was put to test even after I initially opposed it, I really do not have any further comments. Sorry!
There was a problem hiding this comment.
Cool, thanks for the reply. It was unclear that you wanted this PR closed. I put it to test it ddn't cost anything extra to put this to test along with other PRs.
|
This PR is under test in https://tracker.ceph.com/issues/71663. |
A large number of jobs failed to an unrelated error, deferring QA run until it is fixed. |
|
This PR is under test in https://tracker.ceph.com/issues/71703. |
|
QA run was successful - https://tracker.ceph.com/projects/cephfs/wiki/QA_main_2025#wip-rishabh-testing-20250617173904 |
|
Closing this PR since this change isn't compelling. |
Fixes: https://tracker.ceph.com/issues/71469
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job Definition