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

Propagate VR condition error message to protected pvc conditions #1639

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Nov 5, 2024

  1. Test vr status with a message

    Using development build of csi-addons adding .Message to the all
    conditions.
    
    Signed-off-by: Nir Soffer <[email protected]>
    nirs committed Nov 5, 2024
    Configuration menu
    Copy the full SHA
    c496fe9 View commit details
    Browse the repository at this point in the history
  2. Propagate VR conditions .Message

    When a VR condition is not met, we set the protected PVC condition
    message using the error message returned from isVRConditionMet(). When
    using csi-addons > 0.10.0, we use now the message from the condition
    instead of the default message.
    
    Since the Validated condition is not reported by older version of
    csi-addons, and we must wait until the Validated condition status is
    known when VRG is deleted, isVRConditionMet() returns now also the state
    of the condition, which can be:
    
    - missing: condition not found
    - stale: observed generation does not match object generation
    - unknown: the special "Unknown" value
    - known: status is True or False
    
    When we validate the Validate condition we have these cases:
    
    - Condition is missing: continue to next condition.
    
    - Condition is met: continue to the next condition.
    
    - Condition not met and its status is False. This VR will never
      complete and it is safe to delete since replication will never start.
      If VRG is deleted, we return true since the VR reached the designed
      state. Otherwise we return false. In this case we updated the
      protected pvc condition with the message from the VR condition.
    
    - Condition is not met and is stale or unnown: we need to check again
      later. There is no point to check the completed condition since a VR
      cannot complete without validation.In this case we updated the
      protected pvc condition with the message generated by
      isVRConditionMet() for stale or unknown conditions.
    
    Signed-off-by: Nir Soffer <[email protected]>
    nirs committed Nov 5, 2024
    Configuration menu
    Copy the full SHA
    2f93dcf View commit details
    Browse the repository at this point in the history