Repository navigation
Commit a32591c
committed
fix(linstor): constrain CSI provisioning to the scheduler's chosen node
Without --strict-topology, external-provisioner passes every topology
segment as `requisite` and only *prefers* the node the scheduler picked,
so when that node is out of space linstor-csi may legally provision the
volume somewhere else. For a node-pinned volume -- allowRemoteVolumeAccess
false, which is what the cluster-default `local` class uses -- the result
is a PV whose node affinity contradicts the pod's other volumes, and the
pod is then unschedulable forever:
pv "pvc-..." node affinity doesn't match node "srv1": no matching NodeSelectorTerms
It bites hardest on CDI imports, because an importer pod mounts two
volumes: the disk, and a ~21 GiB scratch volume CDI creates only AFTER
the pod is scheduled. The scheduler therefore sizes the node against the
disk alone, can place two importers where both disks plus both scratch
volumes do not fit, and the second scratch is placed elsewhere.
The failure shape is what makes it worth fixing rather than documenting:
nothing errors, the cluster looks healthy, and the DataVolume sits at
ImportScheduled indefinitely.
Reproduced and verified by measurement 2026-08-25 on a three-node
cluster. Forcing both importers onto one node with 45 GiB free -- enough
for two 20 GiB disks but not their two 21.2 GiB scratch volumes -- put
the scratch PV on a different node than its disk and hung the import with
no error anywhere. With the flag set, the same conditions leave the
scratch PVC Pending and the pod reporting the actionable "1 node(s) did
not have enough free storage"; freeing space let it bind and the import
completed on its own. A silent permanent deadlock becomes a legible,
self-correcting wait.
Note the scheduler was not working from stale data: CSIStorageCapacity
reported srv1 at 4.82 GiB against LINSTOR's 4.60 GiB and ZFS's 4.60G. It
had the right numbers and still could not prevent this, because the
scratch volume does not exist when the placement decision is made.
Verified for node-pinned volumes. For `replicated` the PV is remotely
accessible so the constraint is satisfiable wherever the pod lands; that
case is reasoned rather than measured, hence the switch.
The patch restates the whole argument list because `args` has no
patchMergeKey and a strategic merge replaces it, so a piraeus-operator
bump could silently drop a newly added upstream flag. A test pins the
argument count as a tripwire that forces a re-check.
Assisted-By: Claude <[email protected]>
Signed-off-by: Myasnikov Daniil <[email protected]>1 parent 467968b commit a32591c
4 files changed
Lines changed: 106 additions & 1 deletion
File tree
- docs/agents
- packages/system/linstor
- templates
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
86 | 110 | | |
87 | 111 | | |
88 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
36 | 66 | | |
37 | 67 | | |
38 | 68 | | |
| |||
0 commit comments