Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syncing latest changes from upstream main for ramen #386

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Commits on Nov 1, 2024

  1. Fix VRG resource updates causing RDSpec list alternation

    Fix an issue where the VRG resource was frequently updated, causing the RDSpec
    to alternate between an empty and non-empty list. This behavior directly impacted
    failover and relocation. If the list was empty during these actions, PVC restore
    was skipped, leading to incomplete recovery.
    
    Signed-off-by: Benamar Mekhissi <[email protected]>
    Benamar Mekhissi authored and ShyamsundarR committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    a974756 View commit details
    Browse the repository at this point in the history
  2. Update function to return last operation result and error

    This commit modifies the utility function that creates the ManifestWork to return
    an additional value indicating the last operation result alongside the error. The
    result can be one of three values: created, updated, or none. This change is
    needed to track whether the ManifestWork resource was newly created, updated, or
    left unchanged.
    
    Signed-off-by: Benamar Mekhissi <[email protected]>
    Benamar Mekhissi authored and ShyamsundarR committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    c46cc59 View commit details
    Browse the repository at this point in the history
  3. Unit test to validate RDSpec changes

    Signed-off-by: Benamar Mekhissi <[email protected]>
    Benamar Mekhissi authored and ShyamsundarR committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    fcf6be9 View commit details
    Browse the repository at this point in the history
  4. Fix rare issue with missing PVsRestored condition in ProtectedPVC.

    In certain edge cases, ProtectedPVCs may fail to add the PVsRestored condition
    permanently, causing the relocate process to get stuck in the WaitForReadiness
    progression.
    
    Signed-off-by: Benamar Mekhissi <[email protected]>
    Benamar Mekhissi authored and ShyamsundarR committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    d7f0b8f View commit details
    Browse the repository at this point in the history
  5. Rename a function and fix error msgs

    Signed-off-by: Benamar Mekhissi <[email protected]>
    Benamar Mekhissi authored and ShyamsundarR committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    aae3695 View commit details
    Browse the repository at this point in the history
  6. Optimize VRG ManifestWork Handling to Prevent Redundant Updates

    When ensuring the VRG ManifestWork, the process now begins by retrieving the VRG
    from an existing ManifestWork, if available, and updating it as needed. If the
    ManifestWork does not exist, it will be created. This update-instead-of-create
    approach avoids overwriting other fields unintentionally and ensures consistency
    by always starting from a base VRG state.
    
    Signed-off-by: Benamar Mekhissi <[email protected]>
    Benamar Mekhissi authored and ShyamsundarR committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    b05e435 View commit details
    Browse the repository at this point in the history
  7. Define a constant for VRClass param schedulingInterval

    Signed-off-by: Shyamsundar Ranganathan <[email protected]>
    ShyamsundarR authored and BenamarMk committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    e561914 View commit details
    Browse the repository at this point in the history
  8. Implement methods to findAllPeers to update DRPolicy peer status

    Changes in this commit include the implementation to generate peer
    information per pair of clusters, given the various classes across
    the clusters in a DRPolicy.
    
    The methods to fetch the required classes from the clusters or to
    update the DRPolicy status is yet to be implemented.
    
    Signed-off-by: Shyamsundar Ranganathan <[email protected]>
    ShyamsundarR authored and BenamarMk committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    a01306b View commit details
    Browse the repository at this point in the history
  9. Add unit test cases for findAllPeers implementation

    Signed-off-by: Shyamsundar Ranganathan <[email protected]>
    ShyamsundarR authored and BenamarMk committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    f47cf35 View commit details
    Browse the repository at this point in the history
  10. Add functionality to getClusterClasses in peerClass update feature

    This commit adds:
    - Inspecting each DRCluster in the DRPolicy for related ManagedCluster
    claims for various storage related classes
    - Creating an MCV for such claims to fetch the corresponding class
    - Updating classLists with the information fetched per cluster
    - Pruning MCVs for classes that are no longer claimed
    - Deleting MCVs when DRCluster is deleted
    - Adding a watch for ManagedCluster and MCV in the DRPolicy reconciler
    
    Signed-off-by: Shyamsundar Ranganathan <[email protected]>
    ShyamsundarR authored and BenamarMk committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    86bb3d8 View commit details
    Browse the repository at this point in the history
  11. Add clusterIDs to peerClass values

    Each entry in peerClasses denotes a relationship for a StorageClass
    that has the same name across EXACTLY 2 clusters. This allows to
    create multiple peer pairs to represent a cross sync or async
    relationship. It also enables to represent more than 2 clusters
    in a DRPolicy (in the future).
    
    It is the value of the metadata.uid of the kube-system namespace,
    and hence serves to isolate cluster identity to this ID rather than
    its name on the hub cluster.
    
    Signed-off-by: Shyamsundar Ranganathan <[email protected]>
    ShyamsundarR authored and BenamarMk committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    5739351 View commit details
    Browse the repository at this point in the history
  12. Update PeerClass in DRPolicy status for Sync and Async peers

    Updation also prunes no longer existing peers from the policy status, and adds
    new peers to the policy as required.
    
    Signed-off-by: Shyamsundar Ranganathan <[email protected]>
    ShyamsundarR authored and BenamarMk committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    7ed13ca View commit details
    Browse the repository at this point in the history
  13. Rename peerList structure to peerInfo instead

    Signed-off-by: Shyamsundar Ranganathan <[email protected]>
    ShyamsundarR authored and BenamarMk committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    904f492 View commit details
    Browse the repository at this point in the history
  14. Simplify labels and annotation addtion in getResourceFromManagedCluster

    Signed-off-by: Shyamsundar Ranganathan <[email protected]>
    ShyamsundarR authored and BenamarMk committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    c93fd21 View commit details
    Browse the repository at this point in the history
  15. Simplify isAsyncVSClassPeer using a subroutine for repeted loops

    Signed-off-by: Shyamsundar Ranganathan <[email protected]>
    ShyamsundarR authored and BenamarMk committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    618ab18 View commit details
    Browse the repository at this point in the history