Commit 709bbc5
committed
<fix>[expon]: fix vhost installPath overwrite and test cleanup
Fix CBD KvmCbdNodeServer overwriting vhost volume installPath
and add Expon/Xinfini storage API simulators for integration
test.
1. Why is this change necessary?
KvmCbdNodeServer.convertPathIfNeeded unconditionally returned
the original installPath for non-CBD protocols, causing
convertAndSetPathIfNeeded to overwrite the /var/run/vhost path
that KvmVhostNodeServer had already set. This made the
ExponPrimaryStorageCase test fail on installPath assertion.
Additionally, vol2 was not cleaned up in testClean, causing
a ConstraintViolationException during env.delete.
2. How does it address the problem?
- Changed convertPathIfNeeded to return null for non-CBD
protocols so the setter is skipped
- Added vol2 cleanup in testClean to prevent FK violation
- Added Expon API simulators in ExternalPrimaryStorageSpec
- Updated ExponStorageController and SDK for test support
- Added ExternalPrimaryStorageFactory null host guard
- Added XinfiniPrimaryStorageCase integration test
3. Are there any side effects?
None. The CBD fix only affects non-CBD protocol volumes
which should not have been modified by CBD code.
# Summary of changes (by module):
- cbd: fix convertPathIfNeeded to skip non-CBD protocols
- expon: add scheme support for ExponStorageController
- expon/sdk: update ExponClient and ExponConnectConfig
- storage: add null host check in ExternalPSFactory
- test: fix vol2 cleanup and update test assertions
- test: add XinfiniPrimaryStorageCase
- testlib: add Expon/Xinfini API simulators
Related: ZSTAC-82153
Change-Id: I14f8d5c9155dccf2803566d133813ca5675feb761 parent a1b38d2 commit 709bbc5
12 files changed
Lines changed: 1923 additions & 39 deletions
File tree
- plugin
- cbd/src/main/java/org/zstack/cbd/kvm
- expon/src/main/java/org/zstack/expon
- sdk
- storage/src/main/java/org/zstack/storage/addon/primary
- testlib/src/main/java/org/zstack/testlib
- test/src/test/groovy/org/zstack/test/integration/storage
- primary
- addon
- expon
- xinfini
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
| 237 | + | |
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
| 242 | + | |
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
251 | 253 | | |
252 | 254 | | |
253 | 255 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
125 | 130 | | |
126 | 131 | | |
127 | 132 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
| 214 | + | |
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
| 265 | + | |
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
42 | 48 | | |
43 | 49 | | |
44 | 50 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
429 | 435 | | |
430 | 436 | | |
431 | 437 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
Lines changed: 38 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
74 | | - | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | 175 | | |
180 | 176 | | |
181 | 177 | | |
| |||
207 | 203 | | |
208 | 204 | | |
209 | 205 | | |
210 | | - | |
211 | 206 | | |
212 | 207 | | |
213 | 208 | | |
| |||
283 | 278 | | |
284 | 279 | | |
285 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
286 | 296 | | |
287 | 297 | | |
288 | 298 | | |
| |||
307 | 317 | | |
308 | 318 | | |
309 | 319 | | |
310 | | - | |
| 320 | + | |
311 | 321 | | |
312 | 322 | | |
313 | 323 | | |
| |||
338 | 348 | | |
339 | 349 | | |
340 | 350 | | |
341 | | - | |
| 351 | + | |
342 | 352 | | |
343 | 353 | | |
344 | 354 | | |
345 | 355 | | |
346 | 356 | | |
347 | 357 | | |
348 | 358 | | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
369 | 367 | | |
370 | | - | |
371 | 368 | | |
372 | 369 | | |
373 | 370 | | |
| |||
376 | 373 | | |
377 | 374 | | |
378 | 375 | | |
379 | | - | |
380 | | - | |
| 376 | + | |
381 | 377 | | |
382 | 378 | | |
383 | 379 | | |
| |||
683 | 679 | | |
684 | 680 | | |
685 | 681 | | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
686 | 687 | | |
687 | 688 | | |
| 689 | + | |
| 690 | + | |
688 | 691 | | |
689 | 692 | | |
690 | 693 | | |
| |||
757 | 760 | | |
758 | 761 | | |
759 | 762 | | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
760 | 766 | | |
761 | 767 | | |
762 | 768 | | |
| |||
775 | 781 | | |
776 | 782 | | |
777 | 783 | | |
778 | | - | |
779 | | - | |
780 | 784 | | |
781 | 785 | | |
782 | 786 | | |
| |||
0 commit comments