Commit 24baa83
fix(rest): eager-place only on clone; bare restore stays an empty shell
PR #153 changed the bare snapshot-restore handler to synchronously
stamp a replica on EVERY snapshot node. That fixed the clone verb (a
one-shot CSI op with no follow-up autoplace) but regressed the staged
cross-node restore workflow: the e2e restore lanes place the
data-bearing replica on a snapshot node first, wait UpToDate, then add
a cross-node replica that SyncTargets it. With both snapshot nodes
already eagerly placed, place_count was satisfied and the cross-node
replica was never created (stuck Connecting / no devicePath).
Split the placement policy by caller. The clone path (cloneWithData)
eager-places on the snapshot nodes in the source pool. The bare
restore handler leaves an empty shell when no --node-name is given, so
the operator / linstor-csi drives placement — exactly the pre-#153 /
upstream restore-then-scale-out contract. Explicit node lists are
still stamped verbatim on both paths.
Cross-backend protection is unaffected: the placer's restore-source
backend pin keeps the operator's follow-up autoplace on the source
backend, and the REST autoplace handler still constrains a
no-node-list autoplace of a restore-marked RD to the snapshot nodes.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>1 parent 11632d1 commit 24baa83
3 files changed
Lines changed: 110 additions & 44 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
230 | 234 | | |
231 | 235 | | |
232 | 236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
311 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
312 | 316 | | |
313 | 317 | | |
314 | 318 | | |
| |||
411 | 415 | | |
412 | 416 | | |
413 | 417 | | |
414 | | - | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
415 | 441 | | |
416 | 442 | | |
417 | 443 | | |
| |||
464 | 490 | | |
465 | 491 | | |
466 | 492 | | |
467 | | - | |
| 493 | + | |
468 | 494 | | |
469 | 495 | | |
470 | 496 | | |
| |||
502 | 528 | | |
503 | 529 | | |
504 | 530 | | |
505 | | - | |
| 531 | + | |
506 | 532 | | |
507 | 533 | | |
508 | 534 | | |
509 | | - | |
510 | | - | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
511 | 552 | | |
512 | | - | |
513 | | - | |
| 553 | + | |
514 | 554 | | |
515 | 555 | | |
516 | 556 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | | - | |
297 | | - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
298 | 301 | | |
299 | 302 | | |
300 | 303 | | |
301 | 304 | | |
302 | 305 | | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
312 | 309 | | |
313 | 310 | | |
314 | | - | |
315 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
316 | 317 | | |
317 | 318 | | |
318 | 319 | | |
| |||
330 | 331 | | |
331 | 332 | | |
332 | 333 | | |
333 | | - | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
334 | 344 | | |
335 | 345 | | |
336 | 346 | | |
| |||
922 | 932 | | |
923 | 933 | | |
924 | 934 | | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
925 | 941 | | |
926 | 942 | | |
927 | 943 | | |
928 | 944 | | |
929 | 945 | | |
930 | | - | |
931 | | - | |
932 | | - | |
| 946 | + | |
| 947 | + | |
933 | 948 | | |
934 | 949 | | |
935 | | - | |
936 | | - | |
937 | | - | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
942 | | - | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
943 | 958 | | |
944 | | - | |
945 | | - | |
| 959 | + | |
| 960 | + | |
946 | 961 | | |
947 | | - | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
948 | 965 | | |
949 | | - | |
950 | | - | |
951 | | - | |
952 | | - | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
953 | 973 | | |
954 | 974 | | |
955 | | - | |
956 | | - | |
957 | | - | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
958 | 980 | | |
959 | 981 | | |
960 | 982 | | |
| |||
0 commit comments