You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(drbd): peer hosts render upstream's placeholder, not local disk
The .res-file renderer copied the local node's `Volume.Disk` into
every `on <node> { … }` block. That worked when both sides happened
to use the same backing path (LVM with the same VG name, etc.) but
broke the moment paths differed — e.g. FILE_THIN, where each
satellite's `losetup --find` lands on a different /dev/loopN.
Mirror upstream LINSTOR's ConfFileBuilder:
- local diskful host → real backing-disk path
- local OR peer diskless host → `disk none`
- peer diskful host → `disk /dev/drbd/this/is/not/used`
drbd never reads the peer-side `disk` field, but the parser
requires a stable non-empty / non-`none` token; using the peer's
real path would clash when the peer is mid-conversion from
diskless. The constant placeholder is what upstream emits and
what drbd users have indexed off for years.
To carry the per-peer diskless signal end-to-end:
- dispatcher.addPeerEntries now stamps
`peer.<name>.diskless=true` on the drbd_options bag when the
peer Resource carries the DISKLESS flag.
- satellite reconciler's host-list builder reads that key and
sets the new drbd.Host{IsLocal, Diskless} fields.
- drbd.writeOnBlock consumes the flags to pick the right `disk`
via a small `diskField` helper.
New TestBuildPeerDisks pins the precedence so a regression here
is a unit-test failure rather than a multi-node DRBD setup that
silently refuses to come up.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
0 commit comments