From 940d372de849e16a41285373f104644810fd967b Mon Sep 17 00:00:00 2001 From: Mayank <33252549+mynktl@users.noreply.github.com> Date: Wed, 29 May 2019 23:58:55 +0530 Subject: [PATCH] fix(restore): restore issue for multiple volumes (#18) Signed-off-by: mayank --- pkg/cstor/cstor.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/cstor/cstor.go b/pkg/cstor/cstor.go index ecd8e5ed..f19f936b 100644 --- a/pkg/cstor/cstor.go +++ b/pkg/cstor/cstor.go @@ -446,7 +446,7 @@ func (p *Plugin) CreateVolumeFromSnapshot(snapshotID, volumeType, volumeAZ strin if newVol.restoreStatus == v1alpha1.RSTCStorStatusDone { p.Log.Infof("Restore completed") - return volumeID, nil + return newVol.volname, nil } return "", errors.New("Failed to restore snapshot") @@ -563,7 +563,8 @@ func (p *Plugin) SetVolumeID(unstructuredPV runtime.Unstructured, volumeID strin return nil, errors.WithStack(err) } - // We will not update HostPath since CStor volume doesn't have one + pv.Name = volumeID + res, err := runtime.DefaultUnstructuredConverter.ToUnstructured(pv) if err != nil { return nil, errors.WithStack(err)