RamenDR / ramen

Apache License 2.0
70 stars 51 forks source link

filter with default VRC annotation if multiple VRCs detected #1476

Open Rakshith-R opened 1 week ago

Rakshith-R commented 1 week ago

This commit modifies selectVolumeReplicationClass() to filter VRCs list with default VRC annotation replication.storage.openshift.io/volume-replication-class: true if multiple VRCs are matched. This makes sure we select the default VRC when multiple VRCs of same schedule and provisioner but a special default annotated VRC is present in the cluster.

Rakshith-R commented 4 days ago

(related) We can add the check for v.vrcUpdated inside the function updateReplicationClassList and fix the invocation from this function as well updatePVCList to reduce cognitive complexity of this function.

This just helped me a lot just slipping past the function line count limit.

The pr is now ready for review. Added only env tests for now.

Rakshith-R commented 4 days ago

I only looked at the filtering part, but see also comments from previous version that are not addressed by the current version.

https://github.com/RamenDR/ramen/pull/1476#issuecomment-2205723050 https://github.com/RamenDR/ramen/pull/1476#discussion_r1664046795

I think these should answer most of the comments which were given towards the prev(draft) version. Changes in [test/addons/rbd-mirror/start file are no longer part of this pr.