@@ -152,15 +152,6 @@ func (c *StashController) applyBackupSessionReconciliationLogic(backupSession *a
152
152
} else if phase == api_v1beta1 .BackupSessionRunning {
153
153
log .Infof ("Skipping processing BackupSession %s/%s. Reason: phase is %q." , backupSession .Namespace , backupSession .Name , backupSession .Status .Phase )
154
154
return nil
155
- } else if phase == api_v1beta1 .BackupSessionSkipped {
156
- log .Infof ("Skipping processing BackupSession %s/%s. Reason: phase is %q." , backupSession .Namespace , backupSession .Name , backupSession .Status .Phase )
157
- return nil
158
- }
159
-
160
- // skip if backup invoker is paused
161
- if invoker .Paused {
162
- log .Infof ("Skipping processing BackupSession %s/%s. Reason: %s is paused." , backupSession .Namespace , backupSession .Name , invoker .ObjectRef .Kind )
163
- return c .setBackupSessionSkipped (backupSession , fmt .Sprintf ("backup invoker %s %s/%s is paused" , invoker .ObjectRef .Kind , invoker .ObjectRef .Namespace , invoker .ObjectRef .Name ))
164
155
}
165
156
166
157
// if preBackup hook exist, then execute preBackupHook
@@ -427,29 +418,6 @@ func (c *StashController) setBackupSessionFailed(invoker apis.Invoker, backupSes
427
418
return errors .NewAggregate ([]error {backupErr , err })
428
419
}
429
420
430
- func (c * StashController ) setBackupSessionSkipped (backupSession * api_v1beta1.BackupSession , reason string ) error {
431
- // set BackupSession phase to "Skipped"
432
- _ , err := stash_util .UpdateBackupSessionStatus (c .stashClient .StashV1beta1 (), backupSession , func (in * api_v1beta1.BackupSessionStatus ) * api_v1beta1.BackupSessionStatus {
433
- in .Phase = api_v1beta1 .BackupSessionSkipped
434
- in .Targets = backupSession .Status .Targets
435
- return in
436
- })
437
- if err != nil {
438
- return err
439
- }
440
-
441
- // write skip event
442
- _ , err = eventer .CreateEvent (
443
- c .kubeClient ,
444
- eventer .EventSourceBackupSessionController ,
445
- backupSession ,
446
- core .EventTypeWarning ,
447
- eventer .EventReasonBackupSessionSkipped ,
448
- reason ,
449
- )
450
- return err
451
- }
452
-
453
421
func (c * StashController ) setTargetPhaseRunning (target * api_v1beta1.BackupTarget , driver api_v1beta1.Snapshotter , backupSession * api_v1beta1.BackupSession ) (* api_v1beta1.BackupSession , error ) {
454
422
// find out the total number of hosts in target that will be backed up in this backup session
455
423
totalHosts , err := c .getTotalHosts (target , backupSession .Namespace , driver )
0 commit comments