Skip to content

Commit

Permalink
fix(restore): restore issue for multiple volumes (#18)
Browse files Browse the repository at this point in the history
Signed-off-by: mayank <mayank.patel@mayadata.io>
  • Loading branch information
mynktl authored and vishnuitta committed May 29, 2019
1 parent 4c052d3 commit 940d372
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/cstor/cstor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 940d372

Please sign in to comment.