mgr/vol: make "snapshot getpath" cmd work with v1 and legacy#63127
mgr/vol: make "snapshot getpath" cmd work with v1 and legacy#63127rishabh-d-dave merged 4 commits intoceph:mainfrom
Conversation
390a884 to
2b785d2
Compare
2b785d2 to
222be9d
Compare
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Signed-off-by: Rishabh Dave <ridave@redhat.com>
|
jenkins test make check arm64 |
|
test_snap_schedules.py handcraft the snapshot path in _get_subvol_snapdir_path(). Suggest, changing that to use this new interface. |
222be9d to
b2213ec
Compare
@vshankar There must be more such instances where such improvements can be made, let's do that on a separate PR? |
How many are such instances? It should be a straight-forward usage of the new API, isn't it? |
@vshankar |
It's not entirely beyond the scope -- you get tests run for other uses. If its just test_volumes and test_snap_schedule, I suggest changing those to use the new interface. |
@vshankar The more we make such changes in the tests, the higher will be chance that QA might fail due to some error in making those changes. And that will make it longer to merge this PR. I would really prefer to avoid it in interest of time. |
I understand that and I also understand the push that's required to get stuff merged. But when things break (and that has happened before), a lot many things have to be redone. So, let's spend a bit more time in ensuring nothing obvious breaks. |
@vshankar |
|
@vshankar I've made the changes in |
Really? If you see: It first fetches the subvolume path and then for v2 version where the snapshots are taken a level up, |
Yes, so parent path of snapshot prefix directory is being derived ( Also,
Even for earlier version path derived is not snapshot path. Snapshot prefix directory is discovered and attached to it later. Overall, goal in both the cases is to find the path to the snapshot prefix directory and not path to a specific snapshot.
|
|
jenkins test make check |
|
jenkins test make check arm64 |
|
jenkins test api |
Ah! I see -- we need the snapshot name. I was thinking in terms of path to snapdir rather than paths to the exact snapshot. Makes sense. |
|
@vshankar Does rest of the PR look okay? |
vshankar
left a comment
There was a problem hiding this comment.
@rishabh-d-dave I'm seeing dup code from existing tests. Better to clean those up.
qa/tasks/cephfs/test_volumes.py
Outdated
| from .kernel_mount import KernelMount | ||
|
|
||
| if isinstance(self.mount_a, KernelMount): | ||
| return self.mount_a.client_config.get('snapdirname', '.snap') |
There was a problem hiding this comment.
why not use self.mount_a.snapdirname?
There was a problem hiding this comment.
It is available in KernelMount instances but not in FuseMount instances.
batrick
left a comment
There was a problem hiding this comment.
I guess since this only changes tests then the current code with v1 works?
... and legacy too (which gets upgraded to v1 anyway). But yeh, I have that question too :) |
legacy subvolumes. Signed-off-by: Rishabh Dave <ridave@redhat.com>
the path to a specific snapshot wherever possible. Signed-off-by: Rishabh Dave <ridave@redhat.com>
e7744d5 to
3e70066
Compare
Yes, wasn't that why we decided to switch from returning ENOTSUP to supporting it? |
|
jenkins test make check arm64 |
That was not the question @batrick asked. @batrick wanted to confirm if the only thing required is to add tests since the snapshot getpath operation is also supported by v1/legacy. |
Yes, only thing required is to add tests. That is, the current code for v1 and legacy already supports |
|
jenkins test make check |
1 similar comment
|
jenkins test make check |
If this is only adding tests then, do we need the extreme urgency of getting this merged? |
|
jenkins test make check |
|
jenkins test make check arm64 |
rishabh-d-dave
left a comment
There was a problem hiding this comment.
QA run was successful - https://tracker.ceph.com/projects/cephfs/wiki/QA_main_2025#rishabh-vols-snappath3
Requested changes were incorporated
Fixes: https://tracker.ceph.com/issues/70834
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