Commit 1a1f8ff
committed
fix(linstor): pre-flight check destination is a LINSTOR satellite before live migration
LinstorDataMotionStrategy.copyAsync would call createResource on the
destination pool's controller without first verifying that the
destination KVM host is registered as a LINSTOR satellite there. Two
failure modes:
1. The resource group's auto-placement filter happens to match a
different node (a registered satellite that is NOT the migration
destination), and the resource is silently created on the wrong
node. The subsequent migrate then fails because the destination
KVM host has no DRBD device for the resource.
2. The auto-placement filter has no candidates and the LINSTOR API
returns an opaque error. The operator has to correlate the
migration failure with an unrelated controller log entry to
understand what happened.
This change adds verifyDestinationIsLinstorSatellite() called at the
top of copyAsync. For each LINSTOR-typed destination pool it:
- fetches the controller's node list via LinstorUtil.getLinstorNodeNames
- throws CloudRuntimeException with a clear actionable message
(lists known satellites) if destHost.getName() is missing from
that list
- silently skips on transient controller errors so a network blip
against the controller doesn't block an otherwise valid migration
Non-LINSTOR destination pools in the volumeDataStoreMap are skipped
(mixed-storage migrations are unaffected).1 parent 6f4445c commit 1a1f8ff
1 file changed
Lines changed: 61 additions & 0 deletions
File tree
- plugins/storage/volume/linstor/src/main/java/org/apache/cloudstack/storage/motion
Lines changed: 61 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
317 | 369 | | |
318 | 370 | | |
319 | 371 | | |
| |||
323 | 375 | | |
324 | 376 | | |
325 | 377 | | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
326 | 387 | | |
327 | 388 | | |
328 | 389 | | |
| |||
0 commit comments