-
Notifications
You must be signed in to change notification settings - Fork 15
Description
API PR: oxidecomputer/omicron#6585
This is looking like a boot_disk: Option<NameOrId> on the instance create body and a boot_disk_id: Uuid on the instance view response. Then (possibly in a followup PR on top of oxidecomputer/omicron#6321) there will also be a field on an instance update endpoint allowing you to change it. You can always remove the configured boot disk ID (I think), which will result in falling back to whatever the (likely undesirable) behavior is now. There will likely be an added constraint on disk detach, namely that you cannot detach a the boot disk — you have to change or clear the specified boot disk first.
So, the work on our end sounds like:
Instance create POST body
We already have a concept of which disk is the boot disk; currently we put it first in the list of disks. All we have to do is add bootDisk: bootDisk.name.
console/app/forms/instance-create.tsx
Lines 305 to 326 in e3d4245
| const bootDisk = getBootDiskAttachment(values) | |
| const userData = values.userData | |
| ? await readBlobAsBase64(values.userData) | |
| : undefined | |
| await createInstance.mutateAsync({ | |
| query: { project }, | |
| body: { | |
| name: values.name, | |
| hostname: values.hostname || values.name, | |
| description: values.description, | |
| memory: instance.memory * GiB, | |
| ncpus: instance.ncpus, | |
| disks: [bootDisk, ...values.disks], | |
| externalIps: values.externalIps, | |
| start: values.start, | |
| networkInterfaces: values.networkInterfaces, | |
| sshPublicKeys: values.sshPublicKeys, | |
| userData, | |
| }, | |
| }) |
Instance disks table
-
Show which disk is the boot disk
- Sort it first in the list
- Probably with a little badge like we do for primary NIC
-
Add
Set as boot diskaction to disk row actions -
Disable disk detach button for boot disk (with helpful tooltip)
- This is the only place we do disk detach; you can't do it, for example, on the main project disks list
Open questions
- When an instance has no boot disk, should we show that somehow?
- Put an info box somewhere saying "this instance doesn't have an explicit boot disk, so the behavior might be confusing"?
- Only do that when there is more than one disk?