Commit d83787d
fix(stand): register Node CRDs + use LOOPFILE so DRBD has block dev
Two issues blocked multi-replica DRBD scenarios on the dev stand:
1) blockstor Node CRDs were never created. The satellite's c-r
ResourceReconciler lists Node CRDs to resolve peer addresses
for the .res file's `on <node> { address ... }` blocks — with
an empty Node list, peer addresses fell through to 0.0.0.0 and
drbdadm could never establish the replication connection.
install-blockstor.sh now iterates k8s worker nodes and creates
one blockstor Node CRD per worker with NetInterfaces.Address
taken from the k8s InternalIP.
2) The "stand" pool used providerKind: FILE_THIN which hands back
a raw file path (`/var/lib/blockstor-pool/<rd>_<vol>.img`).
drbdmeta rejects that with `not a block device`. Switch to
LOOPFILE — same backing files, same dir, but the provider
wraps each one with `losetup --find --show` so the .res file
gets a /dev/loopN that DRBD can attach. losetup --find uses
/dev/loop-control under the hood, so this scales to ~hundreds
of loops without hardcoding numbers.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>1 parent 4755934 commit d83787d
2 files changed
Lines changed: 22 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
66 | 85 | | |
0 commit comments