Feature #62892
mgr/snap_schedule: restore scheduling for subvols and groups
0%
Description
Tracker to hold discussions on restoring functionality to help users set snap-schedules for subvols and also for non-default group as well.
History
#1 Updated by Venky Shankar 2 months ago
- Category set to Administration/Usability
- Assignee set to Milind Changire
- Target version set to v19.0.0
- Backport set to reef,quincy
- Component(FS) mgr/snap_schedule added
Milind, assigning this you since you have previously worked with removing the interface out :)
Can you put out how the interface would look like so that we can get started with this?
#2 Updated by Milind Changire 2 months ago
Well, we'd need two arguments i.e. --subvol and --group
We already have the --subvol argument parsing and implementation available downstream.
We just need to pull that back in upstream.
- fetching the list of subvol groups and
- fetching the list of subvols for a particular subvol group
we already have this interface, but we'll have to enhance it to look at the given subvol group
With no --group argument, the default subvol group will be assumed for the --subvol argument.
e.g.
ceph fs snap-schedule add <path> <schedule> <start-time> [--fs <fs-name>] [--subvol <subvol-name> [--group <subvol-group-name>]]
Note: We have now made the --fs argument mandatory for multi-fs scenario
#3 Updated by Milind Changire 2 months ago
An issue with snap-schedule implementation is that although the subvol name is recorded in the DB, the group name is never recorded. So we either have to alter the DB schema and hence deal with DB schema versions or we combine the subvol and group name in a single string and store that composite value in the subvol field and deal with insertion, extraction and display of those fields.
#4 Updated by Venky Shankar about 2 months ago
Milind Changire wrote:
An issue with snap-schedule implementation is that although the subvol name is recorded in the DB, the group name is never recorded. So we either have to alter the DB schema and hence deal with DB schema versions or we combine the subvol and group name in a single string and store that composite value in the subvol field and deal with insertion, extraction and display of those fields.
That would be confusing. Let's maintain it as a separate column in the db. Can the db schema be upgraded on the fly for older db versions?
#5 Updated by Patrick Donnelly about 2 months ago
Venky Shankar wrote:
Milind Changire wrote:
An issue with snap-schedule implementation is that although the subvol name is recorded in the DB, the group name is never recorded. So we either have to alter the DB schema and hence deal with DB schema versions or we combine the subvol and group name in a single string and store that composite value in the subvol field and deal with insertion, extraction and display of those fields.
That would be confusing. Let's maintain it as a separate column in the db. Can the db schema be upgraded on the fly for older db versions?
Introducing schema versions is not that difficult. It's automated for the mgr module default db (in the .mgr pool). See:
I think copy/paste as needed (no need to refactor I think, not worth the effort).
#6 Updated by Milind Changire about 2 months ago
for snap-schedule, the --subvol and --group arguments are used only by the "fs snap-schedule status" and "fs snap-schedule add" commands
all other commands work with the absolute path
do I need to introduce the --subvol and --group arguments for the other commands as well ?
#7 Updated by Venky Shankar about 2 months ago
Milind Changire wrote:
for snap-schedule, the --subvol and --group arguments are used only by the "fs snap-schedule status" and "fs snap-schedule add" commands
all other commands work with the absolute path
do I need to introduce the --subvol and --group arguments for the other commands as well ?
Yes! If we are fixing it then may as well do a thorough fix.
#8 Updated by Milind Changire about 2 months ago
- Pull request ID set to 53999