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

fix(reconciler/volume): disown replica from disowned volumes nexus #922

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

abhilashshetty04
Copy link
Contributor

While we disown a replica from volume we used to validate if the replica is owned by any nexus. In some cases involving Outage on volume target node we observed that the new nexus do get created after the volumeattachments are deleted from the node. However, we werent able to disown the Unknown replica from volume since it was still owned by old target.

Now we check if replica is owned by the current target of the volume rather then if it is owned by any target.

@abhilashshetty04 abhilashshetty04 force-pushed the volume_rebuild_fix branch 4 times, most recently from 87ad9d3 to 5c0e474 Compare January 22, 2025 19:33
While we disown a replica from volume we used to validate if the replica is owned by any nexus.
In some cases involving Outage on volume target node we observed that the new nexus do get created
after the volumeattachments are deleted from the node. however, we werent able to disown the
unknown replica from volume since it was still owned by old target.

Now we check if replica is owned by any of the current target of the volume rather then if it
is owned by any target.

Signed-off-by: Abhilash Shetty <[email protected]>
@tiagolobocastro tiagolobocastro changed the title fix(volume_reconciler): change replica disown logic fix(reconciler/volume): disown replica from disowned volumes nexus Jan 22, 2025
@abhilashshetty04
Copy link
Contributor Author

abhilashshetty04 commented Jan 23, 2025

@dsharma-dc , Before the disown_unused_replicas we run disown_unused_nexuses which will clear old nexus's owner id as the new nexus is already in the volume.state.target.

So we will receive only new nexus when we call from disown_unused_replicas

We can improve on docs i suppose. Its kind of race condition. Suppose we create new nexus and its published to the volume and reconciler already ran disown_unused_nexuses. So we will receive both nexuses in that scenario and the Unknown replica will not be removed. But in the next iteration we can guarantee that disown_unused_nexuses will be run before disown_unused_replicas and we get only active nexus of volume.

We have PR on develop. I will see how we can change docs in that.

@abhilashshetty04
Copy link
Contributor Author

bors merge

@bors-openebs-mayastor
Copy link

Build succeeded:

@bors-openebs-mayastor bors-openebs-mayastor bot merged commit d3c7da5 into release/2.7 Jan 23, 2025
6 checks passed
@bors-openebs-mayastor bors-openebs-mayastor bot deleted the volume_rebuild_fix branch January 23, 2025 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants