@@ -37,7 +37,6 @@ import (
37
37
informers "github.com/heptio/velero/pkg/generated/informers/externalversions/velero/v1"
38
38
listers "github.com/heptio/velero/pkg/generated/listers/velero/v1"
39
39
"github.com/heptio/velero/pkg/restic"
40
- veleroexec "github.com/heptio/velero/pkg/util/exec"
41
40
"github.com/heptio/velero/pkg/util/filesystem"
42
41
"github.com/heptio/velero/pkg/util/kube"
43
42
)
@@ -228,7 +227,7 @@ func (c *podVolumeBackupController) processBackup(req *velerov1api.PodVolumeBack
228
227
229
228
var stdout , stderr string
230
229
231
- if stdout , stderr , err = veleroexec . RunCommand (resticCmd .Cmd ()); err != nil {
230
+ if stdout , stderr , err = c . RunBackupCommand (resticCmd .Cmd (), req ); err != nil {
232
231
log .WithError (errors .WithStack (err )).Errorf ("Error running command=%s, stdout=%s, stderr=%s" , resticCmd .String (), stdout , stderr )
233
232
return c .fail (req , fmt .Sprintf ("error running restic backup, stderr=%s: %s" , stderr , err .Error ()), log )
234
233
}
@@ -243,6 +242,7 @@ func (c *podVolumeBackupController) processBackup(req *velerov1api.PodVolumeBack
243
242
// update status to Completed with path & snapshot id
244
243
req , err = c .patchPodVolumeBackup (req , func (r * velerov1api.PodVolumeBackup ) {
245
244
r .Status .Path = path
245
+ r .Status .Progress = "100%"
246
246
r .Status .SnapshotID = snapshotID
247
247
r .Status .Phase = velerov1api .PodVolumeBackupPhaseCompleted
248
248
})
0 commit comments