Skip to content

Commit

Permalink
Merge pull request #327 from portworx/pb-4943
Browse files Browse the repository at this point in the history
pb-4943: Added fix to return proper error message, if the kdmp backup fails in DataExportStageTransferInProgress stage.
  • Loading branch information
siva-portworx authored Dec 13, 2023
2 parents e8a1e0c + c23e283 commit ee7f3ad
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/controllers/dataexport/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,13 +376,19 @@ func (c *Controller) sync(ctx context.Context, in *kdmpapi.DataExport) (bool, er
}
return true, c.updateStatus(dataExport, data)
case kdmpapi.DataExportStageTransferInProgress:
var reason string
if dataExport.Status.Status == kdmpapi.DataExportStatusSuccessful {
reason = ""
} else {
reason = dataExport.Status.Reason
}
if dataExport.Status.Status == kdmpapi.DataExportStatusSuccessful ||
dataExport.Status.Status == kdmpapi.DataExportStatusFailed {
// set to the next stage
data := updateDataExportDetail{
stage: kdmpapi.DataExportStageCleanup,
status: dataExport.Status.Status,
reason: "",
reason: reason,
}
return false, c.updateStatus(dataExport, data)
}
Expand Down

0 comments on commit ee7f3ad

Please sign in to comment.