Project

General

Profile

Actions

Feature #62892

open

mgr/snap_schedule: restore scheduling for subvols and groups

Added by Milind Changire 8 months ago. Updated 4 months ago.

Status:
Pending Backport
Priority:
Normal
Category:
Administration/Usability
Target version:
% Done:

0%

Source:
Tags:
backport_processed
Backport:
reef,quincy
Reviewed:
Affected Versions:
Component(FS):
mgr/snap_schedule
Labels (FS):
Pull request ID:

Description

Tracker to hold discussions on restoring functionality to help users set snap-schedules for subvols and also for non-default group as well.


Related issues 2 (2 open0 closed)

Copied to CephFS - Backport #64033: quincy: mgr/snap_schedule: restore scheduling for subvols and groupsIn ProgressMilind ChangireActions
Copied to CephFS - Backport #64034: reef: mgr/snap_schedule: restore scheduling for subvols and groupsIn ProgressMilind ChangireActions
Actions #1

Updated by Venky Shankar 7 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?

Actions #2

Updated by Milind Changire 7 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.

As far as --group argument parsing and implementation goes, we'll have to pass that argument to the mgr/volumes plugin for:
  1. fetching the list of subvol groups and
  2. 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

Actions #3

Updated by Milind Changire 7 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.

Actions #4

Updated by Venky Shankar 7 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?

Actions #5

Updated by Patrick Donnelly 7 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:

https://github.com/ceph/ceph/blob/f9626b596907707d03e7544681d3b58c8c30abd9/src/pybind/mgr/mgr_module.py#L1203-L1232

I think copy/paste as needed (no need to refactor I think, not worth the effort).

Actions #6

Updated by Milind Changire 7 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 ?

Actions #7

Updated by Venky Shankar 7 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.

Actions #8

Updated by Milind Changire 7 months ago

  • Pull request ID set to 53999
Actions #9

Updated by Milind Changire 4 months ago

  • Status changed from New to Fix Under Review
Actions #10

Updated by Milind Changire 4 months ago

  • Status changed from Fix Under Review to Pending Backport
Actions #11

Updated by Backport Bot 4 months ago

  • Copied to Backport #64033: quincy: mgr/snap_schedule: restore scheduling for subvols and groups added
Actions #12

Updated by Backport Bot 4 months ago

  • Copied to Backport #64034: reef: mgr/snap_schedule: restore scheduling for subvols and groups added
Actions #13

Updated by Backport Bot 4 months ago

  • Tags set to backport_processed
Actions

Also available in: Atom PDF