mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-26 18:04:31 +00:00
data mover ms node agent resume
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
This commit is contained in:
@@ -130,7 +130,7 @@ func (d *DataDownloadBuilder) CompletionTimestamp(completionTimestamp *metav1.Ti
|
|||||||
return d
|
return d
|
||||||
}
|
}
|
||||||
|
|
||||||
// Labels sets the DataDownload's Progress.
|
// Progress sets the DataDownload's Progress.
|
||||||
func (d *DataDownloadBuilder) Progress(progress shared.DataMoveOperationProgress) *DataDownloadBuilder {
|
func (d *DataDownloadBuilder) Progress(progress shared.DataMoveOperationProgress) *DataDownloadBuilder {
|
||||||
d.object.Status.Progress = progress
|
d.object.Status.Progress = progress
|
||||||
return d
|
return d
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ func (d *DataUploadBuilder) Labels(labels map[string]string) *DataUploadBuilder
|
|||||||
return d
|
return d
|
||||||
}
|
}
|
||||||
|
|
||||||
// Labels sets the DataUpload's Progress.
|
// Progress sets the DataUpload's Progress.
|
||||||
func (d *DataUploadBuilder) Progress(progress shared.DataMoveOperationProgress) *DataUploadBuilder {
|
func (d *DataUploadBuilder) Progress(progress shared.DataMoveOperationProgress) *DataUploadBuilder {
|
||||||
d.object.Status.Progress = progress
|
d.object.Status.Progress = progress
|
||||||
return d
|
return d
|
||||||
|
|||||||
@@ -312,6 +312,8 @@ func (s *nodeAgentServer) run() {
|
|||||||
if err := dataDownloadReconciler.AttemptDataDownloadResume(s.ctx, s.mgr.GetClient(), s.logger.WithField("node", s.nodeName), s.namespace); err != nil {
|
if err := dataDownloadReconciler.AttemptDataDownloadResume(s.ctx, s.mgr.GetClient(), s.logger.WithField("node", s.nodeName), s.namespace); err != nil {
|
||||||
s.logger.WithError(errors.WithStack(err)).Error("failed to attempt data download resume")
|
s.logger.WithError(errors.WithStack(err)).Error("failed to attempt data download resume")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s.logger.Info("Attempt complete to resume dataUploads and dataDownloads")
|
||||||
}()
|
}()
|
||||||
|
|
||||||
s.logger.Info("Controllers starting...")
|
s.logger.Info("Controllers starting...")
|
||||||
|
|||||||
@@ -864,7 +864,7 @@ func (r *DataDownloadReconciler) resumeCancellableDataPath(ctx context.Context,
|
|||||||
if err := asyncBR.StartRestore(dd.Spec.SnapshotID, datapath.AccessPoint{
|
if err := asyncBR.StartRestore(dd.Spec.SnapshotID, datapath.AccessPoint{
|
||||||
ByPath: res.ByPod.VolumeName,
|
ByPath: res.ByPod.VolumeName,
|
||||||
}, nil); err != nil {
|
}, nil); err != nil {
|
||||||
return errors.Wrapf(err, "error to resume asyncBR watche for dd %s", dd.Name)
|
return errors.Wrapf(err, "error to resume asyncBR watcher for dd %s", dd.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
resumeComplete = true
|
resumeComplete = true
|
||||||
|
|||||||
@@ -1135,7 +1135,7 @@ func TestResumeCancellableRestore(t *testing.T) {
|
|||||||
mockStart: true,
|
mockStart: true,
|
||||||
mockClose: true,
|
mockClose: true,
|
||||||
startWatcherErr: errors.New("fake-start-watcher-error"),
|
startWatcherErr: errors.New("fake-start-watcher-error"),
|
||||||
expectedError: fmt.Sprintf("error to resume asyncBR watche for dd %s: fake-start-watcher-error", dataDownloadName),
|
expectedError: fmt.Sprintf("error to resume asyncBR watcher for dd %s: fake-start-watcher-error", dataDownloadName),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "succeed",
|
name: "succeed",
|
||||||
|
|||||||
@@ -968,7 +968,7 @@ func (r *DataUploadReconciler) resumeCancellableDataPath(ctx context.Context, du
|
|||||||
if err := asyncBR.StartBackup(datapath.AccessPoint{
|
if err := asyncBR.StartBackup(datapath.AccessPoint{
|
||||||
ByPath: res.ByPod.VolumeName,
|
ByPath: res.ByPod.VolumeName,
|
||||||
}, du.Spec.DataMoverConfig, nil); err != nil {
|
}, du.Spec.DataMoverConfig, nil); err != nil {
|
||||||
return errors.Wrapf(err, "error to resume asyncBR watche for du %s", du.Name)
|
return errors.Wrapf(err, "error to resume asyncBR watcher for du %s", du.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
resumeComplete = true
|
resumeComplete = true
|
||||||
|
|||||||
@@ -1218,7 +1218,7 @@ func TestResumeCancellableBackup(t *testing.T) {
|
|||||||
mockStart: true,
|
mockStart: true,
|
||||||
mockClose: true,
|
mockClose: true,
|
||||||
startWatcherErr: errors.New("fake-start-watcher-error"),
|
startWatcherErr: errors.New("fake-start-watcher-error"),
|
||||||
expectedError: fmt.Sprintf("error to resume asyncBR watche for du %s: fake-start-watcher-error", dataUploadName),
|
expectedError: fmt.Sprintf("error to resume asyncBR watcher for du %s: fake-start-watcher-error", dataUploadName),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "succeed",
|
name: "succeed",
|
||||||
|
|||||||
Reference in New Issue
Block a user