Fix BSL controller to avoid invoking init() on all BSLs regardless of ValidationFrequency (#2992)
Signed-off-by: Bett, Antony <antony.bett@dell.com>pull/3006/head
parent
c6aa54a009
commit
35d25c81ec
|
@ -0,0 +1 @@
|
|||
Fix BSL controller to avoid invoking init() on all BSLs regardless of ValidationFrequency
|
|
@ -77,14 +77,14 @@ func (r *BackupStorageLocationReconciler) Reconcile(req ctrl.Request) (ctrl.Resu
|
|||
defaultFound = true
|
||||
}
|
||||
|
||||
backupStore, err := r.NewBackupStore(location, pluginManager, log)
|
||||
if err != nil {
|
||||
log.WithError(err).Error("Error getting a backup store")
|
||||
if !storage.IsReadyToValidate(location.Spec.ValidationFrequency, location.Status.LastValidationTime, r.DefaultBackupLocationInfo, log) {
|
||||
log.Debug("Backup location not ready to be validated")
|
||||
continue
|
||||
}
|
||||
|
||||
if !storage.IsReadyToValidate(location.Spec.ValidationFrequency, location.Status.LastValidationTime, r.DefaultBackupLocationInfo, log) {
|
||||
log.Debug("Backup location not ready to be validated")
|
||||
backupStore, err := r.NewBackupStore(location, pluginManager, log)
|
||||
if err != nil {
|
||||
log.WithError(err).Error("Error getting a backup store")
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue