-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
Description
On instance create, we validate the size of the boot disk against the size of the chosen image, and when you change the image, we update the size to be big enough for it if necessary.
console/app/forms/instance-create.tsx
Lines 331 to 341 in 0cc1e03
| // Imitate API logic: only require that the disk is big enough to fit the image | |
| validate={(diskSizeGiB) => { | |
| if (!image) return true | |
| if (diskSizeGiB < image.size / GiB) { | |
| const minSize = Math.ceil(image.size / GiB) | |
| return `Must be as large as selected image (min. ${minSize} GiB)` | |
| } | |
| if (diskSizeGiB > MAX_DISK_SIZE_GiB) { | |
| return `Can be at most ${MAX_DISK_SIZE_GiB} GiB` | |
| } | |
| }} |
On the standalone disk create form, we don't do that, and we should.
console/app/forms/disk-create.tsx
Line 96 in 0cc1e03
| <DiskSizeField name="size" control={form.control} /> |