Commit 35ba0f3
CI fix windows integration test failures (#435)
Fix ShrinkRootPartition to reliably free space on stemcell 2019.99
On stemcell 2019.99 the gap between SizeMin (~29.05 GB) and the
partition size (~30 GB) is only ~950 MB. The previous approach used
SizeMin + 1 GB as the target, which exceeded SizeMax (= CurrentSize)
and caused Resize-Partition to fail with "Size Not Supported". A later
attempt used SizeMax - 10 GB, which fell below SizeMin and caused
Resize-Partition to silently return exit code 0 without making any
change (LargestFreeExtent remained 0).
Fix by shrinking 200 MB from the current partition size:
- Uses (Get-Partition).Size (current size) instead of SizeMax, so we
always shrink even when there is adjacent unallocated space.
- 200 MB is well within the achievable range (~950 MB gap) and well
above the agent's 1 MB minimum for creating an ephemeral partition.
- Small amount means minimal data movement and fast completion.
Also remove the agent-windows-large-root-disk.yml ops file added as a
workaround: the AWS CPI ignores root_disk in instance-group-level
cloud_properties, so the disk remained at 30 GB regardless. The ops
file is no longer needed with the corrected shrink strategy.
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent e1ffdfc commit 35ba0f3
3 files changed
Lines changed: 18 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
467 | | - | |
468 | | - | |
469 | 467 | | |
470 | 468 | | |
471 | 469 | | |
| |||
510 | 508 | | |
511 | 509 | | |
512 | 510 | | |
513 | | - | |
514 | 511 | | |
515 | 512 | | |
516 | 513 | | |
| |||
570 | 567 | | |
571 | 568 | | |
572 | 569 | | |
| 570 | + | |
573 | 571 | | |
574 | 572 | | |
575 | 573 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
40 | 47 | | |
41 | | - | |
| 48 | + | |
42 | 49 | | |
43 | 50 | | |
44 | 51 | | |
| |||
0 commit comments