Open ShyamsundarR opened 1 year ago
@BenamarMk isn't this fixed now?
@nirs I am not sure this issue is tracking the fix I added in this PR: https://github.com/RamenDR/ramen/pull/920. The issue that PR 920 addressed had nothing to do with this.
The observedGeneration is used to tell whether we are up-to-date or not. I am not sure if we want to fix anything here.
@BenamarMk I thought about 521f7b6c2c728b203ea8e97e3bc30d7b841c84df
@nirs No that one is resetting the peerready status to false at the start of an action switch.
The DRPC reconciler unconditionally moves the observed generation of PeerReady to the current generation, which causes it to report PeerReady as true from the older generation: https://github.com/RamenDR/ramen/blob/6924acd0689d5ad320598fe8f0a38be169db575a/controllers/drplacementcontrol_controller.go#L1012-L1017
This is why when Available is still false and the action is in progress, initially the status for PeerReady is moved to true for the current generation.
This needs a fix in ramen drpc reconciler.