Skip to content

Commit

Permalink
fix(backup, cstor): fetching correct snap name in case of base backup…
Browse files Browse the repository at this point in the history
… failure (openebs-archive#1622)

Signed-off-by: mayank <mayank.patel@mayadata.io>
  • Loading branch information
mynktl authored Mar 4, 2020
1 parent f254609 commit 3c21a6b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/cstor-pool-mgmt/volumereplica/volumereplica.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ func CreateVolumeRestore(rst *apis.CStorRestore) error {
"rname", rst.Spec.VolumeName,
)
} else {
alertlog.Logger.Errorw("",
alertlog.Logger.Infow("",
"eventcode", "cstor.volume.restore.success",
"msg", "Successfully restored CStor volume",
"rname", rst.Spec.VolumeName,
Expand Down
6 changes: 3 additions & 3 deletions cmd/maya-apiserver/app/server/backup_endpoint_v1alpha1.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,8 @@ func getLastBackupSnap(openebsClient *versioned.Clientset, bkp *v1alpha1.CStorBa
Labels: bkp.Labels,
},
Spec: v1alpha1.CStorBackupSpec{
BackupName: bkp.Spec.BackupName,
VolumeName: bkp.Spec.VolumeName,
PrevSnapName: bkp.Spec.SnapName,
BackupName: bkp.Spec.BackupName,
VolumeName: bkp.Spec.VolumeName,
},
}

Expand All @@ -231,6 +230,7 @@ func getLastBackupSnap(openebsClient *versioned.Clientset, bkp *v1alpha1.CStorBa
klog.Infof("LastBackup resource created for backup:%s volume:%s", bk.Spec.BackupName, bk.Spec.VolumeName)
return "", nil
}

return b.Spec.PrevSnapName, nil
}

Expand Down

0 comments on commit 3c21a6b

Please sign in to comment.