Skip to content

Commit

Permalink
fix: updates lvmvolumegroupnodestatus for vg
Browse files Browse the repository at this point in the history
Fixes a bug where the lvmvolumegroupnodestatus was not updated correctly
for an existing VG. When adding a new device and restarting the
vg-manager pod, the device is added to the LVM VG but is not updated in
the lvmvolumegroupnodestatus or the LVMCluster status.

Signed-off-by: N Balachandran <nibalach@redhat.com>
  • Loading branch information
nbalacha authored and openshift-cherrypick-robot committed Feb 16, 2022
1 parent a8533f9 commit 0103881
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/vgmanager/vgmanager_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,10 @@ func setStatus(status *lvmv1alpha1.VGStatus, instance *lvmv1alpha1.LVMVolumeGrou
found := false

vgStatuses := instance.Spec.LVMVGStatus
for _, vgStatus := range vgStatuses {
for i, vgStatus := range vgStatuses {
if vgStatus.Name == status.Name {
found = true
vgStatus.Status = status.Status
vgStatus.Reason = status.Reason
vgStatus.Devices = status.Devices
vgStatuses[i] = *status
break
}
}
Expand Down

0 comments on commit 0103881

Please sign in to comment.