Commit 31c760e
committed
fix(cleanup.py): protect LinstorSR init against race condition (#79)
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]>1 parent 44d8cf5 commit 31c760e
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3320 | 3320 | | |
3321 | 3321 | | |
3322 | 3322 | | |
3323 | | - | |
| 3323 | + | |
3324 | 3324 | | |
3325 | 3325 | | |
3326 | 3326 | | |
| |||
3355 | 3355 | | |
3356 | 3356 | | |
3357 | 3357 | | |
3358 | | - | |
| 3358 | + | |
3359 | 3359 | | |
3360 | 3360 | | |
3361 | 3361 | | |
| |||
3372 | 3372 | | |
3373 | 3373 | | |
3374 | 3374 | | |
| 3375 | + | |
| 3376 | + | |
| 3377 | + | |
3375 | 3378 | | |
3376 | 3379 | | |
3377 | 3380 | | |
| |||
0 commit comments