Skip to content

Commit

Permalink
fix(region): remove delete expired snapshot after auto snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
wanyaoqi committed Jan 20, 2025
1 parent 5067703 commit 0cbf9fa
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions pkg/compute/models/disks.go
Original file line number Diff line number Diff line change
Expand Up @@ -2716,7 +2716,6 @@ func (manager *SDiskManager) AutoDiskSnapshot(ctx context.Context, userCred mccl
log.Infof("CronJob AutoDiskSnapshot: No disk need create snapshot")
return
}
now := time.Now()
for i := 0; i < len(spds); i++ {
var (
disk = manager.FetchDiskById(spds[i].DiskId)
Expand All @@ -2733,7 +2732,6 @@ func (manager *SDiskManager) AutoDiskSnapshot(ctx context.Context, userCred mccl
goto onFail
}

disk.CleanOverduedSnapshots(ctx, userCred, snapshotPolicy, now)
db.OpsLog.LogEvent(disk, db.ACT_DISK_AUTO_SNAPSHOT, "disk auto snapshot "+snapshotName, userCred)
snapshotPolicy.ExecuteNotify(ctx, userCred, disk.GetName())
continue
Expand Down

0 comments on commit 0cbf9fa

Please sign in to comment.