Skip to content

Commit

Permalink
[controller] Fix a block device extension (#75)
Browse files Browse the repository at this point in the history
Signed-off-by: Viktor Kramarenko <[email protected]>
  • Loading branch information
ViktorKram authored Jul 17, 2024
1 parent 53e0e70 commit d998917
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions images/agent/pkg/controller/lvm_volume_group_watcher_func.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ func shouldReconcileUpdateEvent(log logger.Logger, oldLVG, newLVG *v1alpha1.LvmV
return true
}

for _, n := range newLVG.Status.Nodes {
for _, d := range n.Devices {
if !utils.AreSizesEqualWithinDelta(d.PVSize, d.DevSize, internal.ResizeDelta) {
log.Debug(fmt.Sprintf("[shouldLVGWatcherReconcileUpdateEvent] update event should be reconciled as the LVMVolumeGroup %s PV size is different to device size", newLVG.Name))
return true
}
}
}

return false
}

Expand Down

0 comments on commit d998917

Please sign in to comment.