linstor: do not use the same static ApiClient for all calls#9326
Conversation
The client.setBasePath() would overwrite the Linstor controller IP/host for all current client users. This is basically a race condition that triggered as soon as you had configured 2 different primary storages with different Linstor controllers.
|
@DaanHoogland |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.18 #9326 +/- ##
=========================================
Coverage 12.24% 12.24%
- Complexity 9295 9297 +2
=========================================
Files 4699 4699
Lines 414347 414347
Branches 50906 50845 -61
=========================================
+ Hits 50731 50741 +10
+ Misses 357311 357300 -11
- Partials 6305 6306 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
|
@blueorangutan package |
|
Merged based on the reviews, and tests on Linstor from the maintainer. |
|
@DaanHoogland just curious, when will this be merged to 4.19 branch? |
@rp- changes are merged to 4.19, please check. |
cool, they are there now, thanks |
* 4.18: linstor: deleteAsync fallback to volume UUID if path not set yet (apache#9325) linstor: do not use the same static ApiClient for all calls (apache#9326)
Description
This PR fixes a race condition with multiple Linstor primary storages and different controller IP's.
The client.setBasePath() would overwrite the Linstor controller IP/host for all current client users. This is basically a race condition that triggered as soon as you had configured 2 different primary storages with different Linstor controllers.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Basic operations on a Linstor cluster with 2 different linstor controllers.
How did you try to break this feature and the system with this change?