Skip to content

Commit

Permalink
Remove redundancy code block left by #5388. (#5483)
Browse files Browse the repository at this point in the history
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
  • Loading branch information
blackpiglet authored Oct 27, 2022
1 parent 5f43361 commit 150570f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
1 change: 1 addition & 0 deletions changelogs/unreleased/5483-blackpiglet
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove redundancy code block left by #5388.
11 changes: 0 additions & 11 deletions pkg/controller/backup_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -663,17 +663,6 @@ func (c *backupController) runBackup(backup *pkgbackup.Request) error {
selector := label.NewSelectorForBackup(backup.Name)
vscList := &snapshotv1api.VolumeSnapshotContentList{}

if c.volumeSnapshotLister != nil {
tmpVSs, err := c.volumeSnapshotLister.List(selector)
if err != nil {
backupLog.Error(err)
}

for _, vs := range tmpVSs {
volumeSnapshots = append(volumeSnapshots, *vs)
}
}

volumeSnapshots, err = c.waitVolumeSnapshotReadyToUse(context.Background(), backup.Spec.CSISnapshotTimeout.Duration, backup.Name)
if err != nil {
backupLog.Errorf("fail to wait VolumeSnapshot change to Ready: %s", err.Error())
Expand Down

0 comments on commit 150570f

Please sign in to comment.