-
Notifications
You must be signed in to change notification settings - Fork 62
Description
In the console we currently rely on the order of disks to mark out the boot disk for an instance. The boot disk is supposed to be the first disk (or at least I thought it was — will try to find relevant discussion). However, the disks come back in alphabetical order, which makes our UI wrong.
We are explicitly sorting instance disks by name.
omicron/nexus/src/db/datastore.rs
Line 1689 in 9ec389f
| paginated(dsl::disk, dsl::name, &pagparams) |
I didn't call this issue "the order is wrong" because ultimately that's not a very good API for this and I would rather have a more reliable property on the response. Maybe this should be stored as part of the disk state: in addition to the ID of the instance it's a attached to, a boolean indicating whether it is the boot disk.
I don't have a strong opinion on how important it is to say which disk is the boot disk — if it's not that important, it would be a lot easier not to bother making the distinction in the UI than it would be to make the necessary API changes to reliably make said distinction.
