Commit 33b5b25
committed
fix: ignore volumes in wave calculation without provisioning
The waves are used in the volume manager to order provisioning of
volumes on disk (allocating a partition, etc.), so that system volumes
are done first, and only then user volumes are allocated.
The wave calculation logic had a bug though with volumes which don't
have provisioning instructions (they can be only located), e.g. the
`IMAGECACHE-ISO` volume which is only located, but never provisioned.
Such volume (if the ISO is missing) will always stay in `missing`
status, which is fine, but it shouldn't block the provisioning of the
next waves.
Moreover, if `.provisioning` is not set, reading wave from it doesn't
make sense, as it will always be zero (unset).
Also sort the volume configs accordingly, volumes without provisioning
instructions should be always processed first, they don't block others.
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>1 parent a163925 commit 33b5b25
3 files changed
Lines changed: 26 additions & 2 deletions
File tree
- internal/app/machined/pkg/controllers/block
- internal/volumes
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
27 | 39 | | |
28 | 40 | | |
29 | 41 | | |
| |||
35 | 47 | | |
36 | 48 | | |
37 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
38 | 53 | | |
39 | 54 | | |
40 | 55 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
403 | 404 | | |
404 | 405 | | |
405 | 406 | | |
406 | | - | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
407 | 410 | | |
408 | 411 | | |
409 | 412 | | |
| |||
0 commit comments