You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Disks: Disable 'Size' field when selecting 'Make disk read-only' and 'Image'/'Snapshot' as a source #3391
Currently, when creating a disk, the 'Size' field comes before the list of Sources. One of the options to choose from is that of an Image, followed by a checkbox to make the disk read only. However, if the source is an Image or a Snapshot, the size the user needs to type in must match the one from the source. If it does not, then they get an error. One way to cope with this could be to disable the Size field once the 'Make disk read-only' and source 'Image' or 'Snapshot' has been selected.
If the size could be retrieved after setting these, then the user wouldn't have to see this error at all.
Moreover, the error messages shows the size in bytes and Size field is in GiB (so a user can't just copy and paste the value printed in the error message).
Browser console output
main.tsx:31 Oxide Web Console version https://github.com/oxidecomputer/console/commits/fc3d969eb0e692f2982964405944fcc221fb7bc4
/v1/disks?project=verdant-df:1 Failed to load resource: the server responded with a status of 400 ()
client.ts:165 More info about API 400 on /projects/verdant-df/disks-new
API URL: https://oxide.sys.rack2.eng.oxide.computer/v1/disks?project=verdant-df
Request ID: ac7c6b2a-53f3-4e5c-8bd5-8d3490ec0c0c
Error code: InvalidRequest
Error message: Read-only disk size 21474836480 must be equal to source image size 10737418240
(anonymous) @ client.ts:165
/v1/disks?project=verdant-df:1 Failed to load resource: the server responded with a status of 400 ()
client.ts:165 More info about API 400 on /projects/verdant-df/disks-new
API URL: https://oxide.sys.rack2.eng.oxide.computer/v1/disks?project=verdant-df
Request ID: 9016a82a-21cc-4451-a447-db6e2931ae2b
Error code: InvalidRequest
Error message: Read-only disk size 21474836480 must be equal to source snapshot size 10737418240
(anonymous) @ client.ts:165
changed the title [-]Disks: Block 'Size' field when selecting 'Make disk read-only' and 'Image'/'Snapshot' as a source[/-][+]Disks: Disable 'Size' field when selecting 'Make disk read-only' and 'Image'/'Snapshot' as a source[/+]on Sep 18, 2026
The user should be able to make a disk from a snapshot that is larger than that snapshot, but not smaller.
So, some ability to adjust the size is supported, but, yes, it cannot be less.
It seems like we used to set limit for new distributed disks to 1023 GiB (still observed in Colo), but now a user can input a crazy size and it won't get clamped to 1023. We do get an error, but it doesn't get clamped. Probably on the same ballpark as this one?
Activity
[-]Disks: Block 'Size' field when selecting 'Make disk read-only' and 'Image'/'Snapshot' as a source[/-][+]Disks: Disable 'Size' field when selecting 'Make disk read-only' and 'Image'/'Snapshot' as a source[/+]leftwo commentedon Sep 18, 2026
The user should be able to make a disk from a snapshot that is larger than that snapshot, but not smaller.
So, some ability to adjust the size is supported, but, yes, it cannot be less.
paudmir commentedon Sep 25, 2026
It seems like we used to set limit for new distributed disks to 1023 GiB (still observed in Colo), but now a user can input a crazy size and it won't get clamped to 1023. We do get an error, but it doesn't get clamped. Probably on the same ballpark as this one?
20260925-0008-16.7813999.mp4
david-crespo commentedon Sep 30, 2026
For read-only disks it has to match the size exactly.
https://github.com/oxidecomputer/omicron/blob/7e18e52/nexus/src/app/disk.rs#L111-L133
Instance create: fix for disk size updating on image tab switch (#3394)
Revalidate disk size when source changes (#3395)