Skip to content

Boot order UI #2335

@david-crespo

Description

@david-crespo

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.

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
    image
  • Add Set as boot disk action 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
image

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    customerFor any bug reports or feature requests tied to customer requests

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions