Skip to content

Commit

Permalink
final refactoring
Browse files Browse the repository at this point in the history
Signed-off-by: Viktor Kramarenko <[email protected]>
  • Loading branch information
ViktorKram committed Oct 2, 2024
1 parent 3611d4f commit bbdce23
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func reconcileBlockDeviceLabels(ctx context.Context, cl client.Client, log logge
continue
}

if !checkIfLVGInProgress(&lvg) {
if checkIfLVGInProgress(&lvg) {
log.Warning(fmt.Sprintf("[reconcileBlockDeviceLabels] the LVMVolumeGroup %s is in a progress, retry later...", lvg.Name))
shouldRetry = true
continue
Expand Down Expand Up @@ -167,12 +167,12 @@ func checkIfLVGInProgress(newLVG *v1alpha1.LVMVolumeGroup) bool {
for _, c := range newLVG.Status.Conditions {
if c.Type == internal.TypeVGConfigurationApplied {
if c.Reason == internal.ReasonUpdating || c.Reason == internal.ReasonCreating {
return false
return true
}
}
}

return true
return false
}

func shouldTriggerLVGUpdateIfMatches(log logger.Logger, lvg *v1alpha1.LVMVolumeGroup, blockDevice *v1alpha1.BlockDevice, usedBdNames map[string]struct{}) bool {
Expand Down

0 comments on commit bbdce23

Please sign in to comment.