Project

General

Profile

Actions

Bug #46158

closed

pybind/mgr/volumes: Persist snapshot size on snapshot creation

Added by Kotresh Hiremath Ravishankar almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
High
Category:
Correctness/Safety
Target version:
% Done:

0%

Source:
Development
Tags:
Backport:
octopus,nautilus
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
mgr/volumes
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Due to issue [1], the subvolume snapshot info command returns incorrect snapshot size if it's requested after the corresponding subvolume is written. But this can be solved at mgr layer by persisting the snapshot size just after creation. Since [1] is harder to backport, this is more feasible.

[1] https://tracker.ceph.com/issues/24725

Actions #1

Updated by Kotresh Hiremath Ravishankar almost 4 years ago

  • Category set to Correctness/Safety
  • Component(FS) mgr/volumes added
Actions #2

Updated by Patrick Donnelly almost 4 years ago

  • Status changed from New to Triaged
  • Assignee set to Kotresh Hiremath Ravishankar
  • Priority changed from Normal to High
  • Target version set to v16.0.0
  • Source set to Development
Actions #3

Updated by Kotresh Hiremath Ravishankar almost 4 years ago

  • Status changed from Triaged to In Progress
Actions #4

Updated by Shyamsundar Ranganathan almost 4 years ago

The requirement was from ceph-csi to return a snapshot size.

On further discussion and looking at the CSI spec and current implementation in kubernetes and RBD integration in ceph-csi, here are reasons why this is not required for ceph-csi,

1. CSI protocol mentions size of a snapshot as an optional return parameter and further,
https://github.com/container-storage-interface/spec/blob/baa71a34651e5ee6cb983b39c03097d7aa384278/lib/go/csi/csi.pb.go#L3094-L3102
<snip>
// This is the complete size of the snapshot in bytes. The purpose of
// this field is to give CO guidance on how much space is needed to
// create a volume from this snapshot. The size of the volume MUST NOT
// be less than the size of the source snapshot. This field is
// OPTIONAL. If this field is not set, it indicates that this size is
// unknown. The value of this field MUST NOT be negative and a size of
// zero means it is unspecified.
</snip>

2. For RBD the size is currently reflected as the size of the parent image of the snapshot, we can do the same for CephFS subvolume snapshots keeping them consistent

3. Kubernetes on clone from a snapshot or clone from a volume (which will internally use a CephFS snapshot), validates that the clone subvolume size is at least as big as the source

4. ceph-csi currently does not honor the new-size of a clone, and if it requires to do so, will resize post a clone is successful

So overall, even if we return the current snapshot size based on rstats ceph-csi should retain the above behaviors as the CSI+k8s combination leverages the size stated.

For these reasons providing an alternative in prior releases for rstats is not required and this tracker can be closed.

Actions #5

Updated by Kotresh Hiremath Ravishankar almost 4 years ago

  • Status changed from In Progress to Closed

As per the reasons stated in comment https://tracker.ceph.com/issues/46158#note-4 , this tracker is being closed.

Actions

Also available in: Atom PDF