Skip to content

Commit

Permalink
Propagate VR condition .Message
Browse files Browse the repository at this point in the history
When 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 return now the message from the condition.

We don't set yet the protected pvc message when the VR Validated
condition is not met.

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
  • Loading branch information
nirs committed Nov 5, 2024
1 parent c496fe9 commit 6ecc66a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/controller/vrg_volrep.go
Original file line number Diff line number Diff line change
Expand Up @@ -1620,7 +1620,12 @@ func isVRConditionMet(volRep *volrep.VolumeReplication,
return false, errorMsg
}

return volRepCondition.Status == desiredStatus, ""
if volRepCondition.Status != desiredStatus {
// csi-addons > 0.10.0 returns defailed error message
return false, volRepCondition.Message
}

return true, ""
}

// Disabling unparam linter as currently every invokation of this
Expand Down

0 comments on commit 6ecc66a

Please sign in to comment.