RamenDR / ramen

Apache License 2.0
74 stars 57 forks source link

Update PeerReady during relocate only post peer reports a ready state, it remains true initially and then moves to false currently #715

Open ShyamsundarR opened 1 year ago

ShyamsundarR commented 1 year ago

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.

nirs commented 1 year ago

@BenamarMk isn't this fixed now?

BenamarMk commented 1 year ago

@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.

nirs commented 1 year ago

@BenamarMk I thought about 521f7b6c2c728b203ea8e97e3bc30d7b841c84df

BenamarMk commented 1 year ago

@nirs No that one is resetting the peerready status to false at the start of an action switch.