Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VolumesnapshotContent RestoreSize is set to 0 for the snapshots created for volumesnapshotgroup #1002

Closed
Madhu-1 opened this issue Feb 8, 2024 · 4 comments · Fixed by #1011

Comments

@Madhu-1
Copy link
Contributor

Madhu-1 commented Feb 8, 2024

What happened:

The RestoreSize of each volumesnapshotcontent is set to 0 even though CSI responds back the size the VolumeGroupSnapshostCreate Response, This might be because the snapshotter create the VSC with empty status and its also reconciling the VSC and Doing GetVolumeSnapshot and updating the size

readyToUse, creationTime, size, groupSnapshotID, err = ctrl.handler.GetSnapshotStatus(content, snapshotterListCredentials)
if err != nil {
klog.Errorf("checkandUpdateContentStatusOperation: failed to call get snapshot status to check whether snapshot is ready to use %q", err)
return content, err
}
driverName = content.Spec.Driver
snapshotID = *content.Spec.Source.SnapshotHandle
klog.V(5).Infof("checkandUpdateContentStatusOperation: driver %s, snapshotId %s, creationTime %v, size %d, readyToUse %t, groupSnapshotID %s", driverName, snapshotID, creationTime, size, readyToUse, groupSnapshotID)
if creationTime.IsZero() {
creationTime = time.Now()
}
updatedContent, err := ctrl.updateSnapshotContentStatus(content, snapshotID, readyToUse, creationTime.UnixNano(), size, groupSnapshotID)

Not all CSI drivers implement ListSnapshots as it's not a mandatory RPC call.

What you expected to happen:

How to reproduce it:
The RestoreSize of each volumesnapshotcontent is set to the actual size returned in VolumeGroupSnapshostCreate Response

Anything else we need to know?:

Environment:

  • Driver version: 7.0.0
  • Kubernetes version (use kubectl version):
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:
@Madhu-1
Copy link
Contributor Author

Madhu-1 commented Feb 8, 2024

@xing-yang is this something that we can fix? i tried to fix it Madhu-1@9382f1a this way i am not sure if this is the correct approach or not, if yes i can make a PR from it.

@Madhu-1
Copy link
Contributor Author

Madhu-1 commented Feb 13, 2024

cc @nixpanic

@nixpanic
Copy link
Member

Calling the ListSnapshots CSI procedure should not be required. The RestoreSize of each snapshot is returned as part of the reply to the CreateGroupSnapshot CSI procedure (see repeated Snapshot snapshots = 2 in the spec).

@Madhu-1
Copy link
Contributor Author

Madhu-1 commented Feb 14, 2024

@nixpanic sent #1011 to fix it, PTAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants