Commit c25e4c7
authored
fix: ensure accurate PVC sizing during volume migration between different CSI drivers (#1613)
Description
This fix addresses volume migration between CSI drivers with different provisioning characteristics by preserving actual disk capacity information.
Related Upstream PR: deckhouse/3p-kubevirt#36
Why do we need it, and what problem does it solve?
The Problem:
Different CSI drivers may provision volumes with slightly different actual sizes due to:
Storage provider alignment optimizations
Allocation unit rounding
Performance optimization padding
This causes issues when migrating between storage backends, as the requested capacity may not match the physically provisioned size.
The Solution:
ProvisionedCapacity - actual physical size provisioned by the CSI driver
During migration to a new storage backend, the system uses the ProvisionedCapacity to request the target PVC, ensuring the new volume has sufficient physical capacity regardless of driver-specific provisioning behavior.
Implementation Details:
ProvisionedCapacity is detected when the virtual machine starting migrating on and the actual disk size can be measured
Migration workflows now prioritize physical capacity over requested capacity for target volume sizing
Target PVC uses ProvisionedCapacity only when it's larger than requested Capacity
Important: Migration between different volumeMode (Block ↔ Filesystem) is currently not supportedur changes with technical details.
---------
Signed-off-by: Yaroslav Borbat <yaroslav.borbat@flant.com>1 parent d5b275f commit c25e4c7
File tree
11 files changed
+255
-73
lines changed- build/components
- images
- virt-artifact
- virtualization-artifact/pkg
- common/vd
- controller
- vd
- internal
- validator
- volumemigration/internal/handler
- monitoring/metrics/vd
11 files changed
+255
-73
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
60 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
61 | 68 | | |
62 | | - | |
| 69 | + | |
63 | 70 | | |
Lines changed: 45 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| |||
399 | 401 | | |
400 | 402 | | |
401 | 403 | | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
402 | 415 | | |
403 | | - | |
| 416 | + | |
404 | 417 | | |
405 | 418 | | |
406 | 419 | | |
| |||
429 | 442 | | |
430 | 443 | | |
431 | 444 | | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
432 | 475 | | |
433 | 476 | | |
434 | 477 | | |
| |||
587 | 630 | | |
588 | 631 | | |
589 | 632 | | |
590 | | - | |
| 633 | + | |
591 | 634 | | |
592 | 635 | | |
593 | 636 | | |
| |||
606 | 649 | | |
607 | 650 | | |
608 | 651 | | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | 652 | | |
615 | 653 | | |
616 | 654 | | |
| |||
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| 84 | + | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
| |||
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
| 95 | + | |
93 | 96 | | |
94 | 97 | | |
95 | 98 | | |
| |||
138 | 141 | | |
139 | 142 | | |
140 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
141 | 163 | | |
142 | 164 | | |
143 | 165 | | |
| |||
306 | 328 | | |
307 | 329 | | |
308 | 330 | | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
309 | 337 | | |
| 338 | + | |
310 | 339 | | |
311 | 340 | | |
312 | 341 | | |
| |||
Lines changed: 2 additions & 60 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | | - | |
27 | 25 | | |
28 | 26 | | |
29 | | - | |
30 | 27 | | |
31 | 28 | | |
32 | | - | |
33 | 29 | | |
34 | 30 | | |
35 | 31 | | |
36 | 32 | | |
37 | 33 | | |
38 | | - | |
39 | 34 | | |
40 | 35 | | |
41 | 36 | | |
42 | | - | |
| 37 | + | |
43 | 38 | | |
44 | | - | |
45 | 39 | | |
46 | 40 | | |
47 | 41 | | |
48 | 42 | | |
49 | 43 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | 44 | | |
64 | 45 | | |
65 | 46 | | |
| |||
70 | 51 | | |
71 | 52 | | |
72 | 53 | | |
73 | | - | |
| 54 | + | |
74 | 55 | | |
75 | 56 | | |
76 | 57 | | |
77 | 58 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | 59 | | |
105 | 60 | | |
106 | 61 | | |
107 | 62 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | 63 | | |
122 | 64 | | |
123 | 65 | | |
| |||
0 commit comments