mirror of
https://github.com/kastenhq/kubestr.git
synced 2024-12-14 11:57:56 +00:00
Leftovervsc (#44)
* Added image option to fio command * order change of delete
This commit is contained in:
parent
9cbe60d92c
commit
72cca45db3
1 changed files with 3 additions and 3 deletions
|
@ -499,13 +499,13 @@ func (c *snapshotCreate) CreateFromSourceCheck(ctx context.Context, snapshotter
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
targetSnapClassName := clonePrefix + args.VolumeSnapshotClass
|
targetSnapClassName := clonePrefix + args.VolumeSnapshotClass
|
||||||
|
defer func() {
|
||||||
|
_ = c.dynCli.Resource(v1alpha1.VolSnapClassGVR).Delete(ctx, targetSnapClassName, metav1.DeleteOptions{})
|
||||||
|
}()
|
||||||
err := snapshotter.CloneVolumeSnapshotClass(args.VolumeSnapshotClass, targetSnapClassName, kansnapshot.DeletionPolicyRetain, nil)
|
err := snapshotter.CloneVolumeSnapshotClass(args.VolumeSnapshotClass, targetSnapClassName, kansnapshot.DeletionPolicyRetain, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrapf(err, "Failed to create a VolumeSnapshotClass to use to restore the snapshot")
|
return errors.Wrapf(err, "Failed to create a VolumeSnapshotClass to use to restore the snapshot")
|
||||||
}
|
}
|
||||||
defer func() {
|
|
||||||
_ = c.dynCli.Resource(v1alpha1.VolSnapClassGVR).Delete(ctx, targetSnapClassName, metav1.DeleteOptions{})
|
|
||||||
}()
|
|
||||||
|
|
||||||
snapSrc, err := snapshotter.GetSource(ctx, args.SnapshotName, args.Namespace)
|
snapSrc, err := snapshotter.GetSource(ctx, args.SnapshotName, args.Namespace)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue