Skip to content

Commit e8f49a7

Browse files
authored
Merge of #5972
2 parents e0b986a + c91235a commit e8f49a7

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

internal/controller/volumegroup/volumegroupreplicationcontent.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -207,16 +207,7 @@ func (r *ReconcileVGRContent) reconcileVGRContent(ctx context.Context, obj runti
207207

208208
reqName := vgrc.Name
209209
groupHandle := vgrc.Spec.VolumeGroupReplicationHandle
210-
volumeRefs := vgrc.Status.PersistentVolumeRefList
211-
volumeIds := make([]string, len(volumeRefs))
212-
for i := range volumeRefs {
213-
pv := &corev1.PersistentVolume{}
214-
err := r.client.Get(ctx, types.NamespacedName{Name: volumeRefs[i].Name}, pv)
215-
if err != nil {
216-
return fmt.Errorf("failed to get persistentvolume %s: %w", volumeRefs[i].Name, err)
217-
}
218-
volumeIds[i] = pv.Spec.CSI.VolumeHandle
219-
}
210+
volumeIds := vgrc.Spec.Source.VolumeHandles
220211

221212
if groupHandle == "" {
222213
return errors.New("volume group replication handle is empty")

0 commit comments

Comments
 (0)