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(cleanup.py): protect LinstorSR init against race condition #79

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

Wescoeur
Copy link
Member

@Wescoeur Wescoeur commented Jan 9, 2025

During LinstorSR init, only create the journaler to make should_preempt happy. The volume manager MUST always be created in a SR lock context. Otherwise, we can trigger major issues.

For example, a volume can be deleted from the KV-store by cleanup.py during a snapshot rollback. Very rare situation but which allowed this problem to be discovered.

During `LinstorSR` init, only create the journaler to make `should_preempt` happy.
The volume manager MUST always be created in a SR lock context. Otherwise,
we can trigger major issues.

For example, a volume can be deleted from the KV-store by `cleanup.py` during a
snapshot rollback. Very rare situation but which allowed this problem to be discovered.

Signed-off-by: Ronan Abhamon <[email protected]>
@Wescoeur Wescoeur requested a review from Nambrok January 9, 2025 13:46
@Wescoeur Wescoeur merged commit 2249fc3 into 3.2.3-8.3 Jan 9, 2025
5 checks passed
@Wescoeur Wescoeur deleted the ran-linstor-fix-race-condition-cleanup-8.3 branch January 9, 2025 16:41
Wescoeur added a commit that referenced this pull request Jan 29, 2025
During `LinstorSR` init, only create the journaler to make `should_preempt` happy.
The volume manager MUST always be created in a SR lock context. Otherwise,
we can trigger major issues.

For example, a volume can be deleted from the KV-store by `cleanup.py` during a
snapshot rollback. Very rare situation but which allowed this problem to be discovered.

Signed-off-by: Ronan Abhamon <[email protected]>
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.

2 participants