Commit bf23552
fix(controller): expand minor allocator over multi-volume RDs
A 2-volume RD consumes minors {base, base+1} — the .res renderer
emits volume k at base+k. The allocator only tracked the BASE minor
per Resource, so a fresh allocation on a node where a 2-volume
sibling was already running picked base+1 and drbdadm rejected the
new .res with `conflicting use of device-minor`.
Expand each Resource's recorded base to the full range based on the
parent RD's len(VolumeDefinitions). Cache the lookup per RD so
N-replica allocators don't load the same RD N times.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>1 parent 655deda commit bf23552
1 file changed
Lines changed: 48 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
519 | 519 | | |
520 | 520 | | |
521 | 521 | | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
522 | 529 | | |
523 | | - | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
524 | 571 | | |
525 | 572 | | |
526 | 573 | | |
| |||
0 commit comments