Skip to content

Commit 80c0474

Browse files
Nikhil-Ladhamergify[bot]
authored andcommitted
Revert "rbd: fetch the volumeIds from VGRContent's status for omap data"
This reverts commit e62e083. The commit needs to be reverted as on further testing it was found that fetching the omap data from status could mean that we would trigger a modify operation during promotion of a group which could lead to inconsistency. Signed-off-by: Nikhil-Ladha <nikhilladha1999@gmail.com>
1 parent cba25cb commit 80c0474

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)