Skip to content

Boot order#2464

Merged
david-crespo merged 25 commits into
mainfrom
boot-order
Oct 3, 2024
Merged

Boot order#2464
david-crespo merged 25 commits into
mainfrom
boot-order

Conversation

@david-crespo

@david-crespo david-crespo commented Sep 23, 2024

Copy link
Copy Markdown
Collaborator

@vercel

vercel Bot commented Sep 23, 2024

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
console ✅ Ready (Inspect) Visit Preview Oct 3, 2024 2:47pm

@david-crespo

Copy link
Copy Markdown
Collaborator Author

Instance create works

2024-09-23-boot-disk-instance-create.mp4

@benjaminleonard

Copy link
Copy Markdown
Contributor

I think separate from the badge treatment, there's something here about having a button and a modal to select the boot disk. I had originally made this for NICs. But I think we need some way hoisted up that isn't just in the more actions menu.

image

See also the designs I had for separate boot disk:

image

modalContent: (
<p>
Are you sure you want to unset <HL>{disk.name}</HL> as the boot disk? This
will TODO COPY RE: WHAT HAPPENS HERE

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does happen here?

const makeActions = useCallback(
const { mutateAsync: instanceUpdate } = useApiMutation('instanceUpdate', {
onSuccess() {
apiQueryClient.invalidateQueries('instanceView')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps add an addToast({ content: 'Your instance has been updated' }) here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, though I think it would be even better if it was specific to the action — this is used for both set and unset boot disk. So it needs to be triggered at each call site. That might require moving this invalidate there because I think if you pass onSuccess as an option at call time it will override this one.

@charliepark charliepark left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few non-blocking comments, but front-end code all looks good; will defer to @iximeow on API and boot order backend particulars, though.

@david-crespo

Copy link
Copy Markdown
Collaborator Author

Can't tell if I'm cooking or this is ridiculous.

2024-10-01-boot-disk-messages-2.mp4

@iximeow

iximeow commented Oct 1, 2024

Copy link
Copy Markdown
Member

ooh, i do like that it's contextually as-helpful-as-we-can-be.

as for what happens without a boot disk: you get the status quo. so the guest will probably try booting disks in PCI device order (which i don't think we really expose in a useful way), but as evidenced by oxidecomputer/omicron#5112 it's quite possible that one of the disks has an EFI System Partition that ends up with the EFI shell tried before the right disk and then everything gets stuck.

i think an informative way to present that would be something like: "With no boot disk, the instance will try booting based on UEFI variables of the first disk with an EFI System Partition". it's really the same behavior with one or multiple disks. but "first" still means "lowest PCI device number", so i think that's still less actionable than ideal?

this makes me wonder if it's possible to end up in a #5112-like state with even a single disk..

@david-crespo

david-crespo commented Oct 2, 2024

Copy link
Copy Markdown
Collaborator Author

That’s helpful, though indirectly, because to me the main thing it says is there’s no good way to explain this concisely enough in the UI and we should focus on encouraging them to set a boot disk if there’s more than one, and lean on the docs link for explanation.

@david-crespo

Copy link
Copy Markdown
Collaborator Author

Going with this for now for the multiple non-boot disks case.

image

@david-crespo

david-crespo commented Oct 2, 2024

Copy link
Copy Markdown
Collaborator Author

Added a TODO for docs links in the modal footer.

Confirm set boot disk when there isn't one currently

Screenshot 2024-10-02 at 12 32 29 PM

Confirm set boot disk when there is one currently

Screenshot 2024-10-02 at 12 40 09 PM

Confirm unset boot disk

Screenshot 2024-10-02 at 12 40 16 PM

@david-crespo david-crespo merged commit a030b9e into main Oct 3, 2024
@david-crespo david-crespo deleted the boot-order branch October 3, 2024 15:41
david-crespo added a commit to oxidecomputer/omicron that referenced this pull request Oct 3, 2024
oxidecomputer/console@5561f28...073471c

* [073471c4](oxidecomputer/console@073471c4) mock api: disks are created straight into detached state
* [612ec90c](oxidecomputer/console@612ec90c) oxidecomputer/console#2485
* [614f1bb5](oxidecomputer/console@614f1bb5) oxidecomputer/console#2466
* [df2dc14c](oxidecomputer/console@df2dc14c) bump vite related deps for a weird vuln
* [a030b9e0](oxidecomputer/console@a030b9e0) oxidecomputer/console#2464
* [dec48497](oxidecomputer/console@dec48497) oxidecomputer/console#2461
* [e46216aa](oxidecomputer/console@e46216aa) oxidecomputer/console#2482
* [0d897efe](oxidecomputer/console@0d897efe) oxidecomputer/console#2479
* [f88790db](oxidecomputer/console@f88790db) oxidecomputer/console#2478
* [d634c8f0](oxidecomputer/console@d634c8f0) oxidecomputer/console#2477
* [eeaa14c3](oxidecomputer/console@eeaa14c3) oxidecomputer/console#2475
* [5ece6e18](oxidecomputer/console@5ece6e18) oxidecomputer/console#2467
* [4b699e01](oxidecomputer/console@4b699e01) oxidecomputer/console#2448
* [9c9dc149](oxidecomputer/console@9c9dc149) oxidecomputer/console#2465
* [1aa0fc9b](oxidecomputer/console@1aa0fc9b) oxidecomputer/console#2463
* [57db4054](oxidecomputer/console@57db4054) oxidecomputer/console#2462
* [da7fe328](oxidecomputer/console@da7fe328) oxidecomputer/console#2460
* [e0d52efd](oxidecomputer/console@e0d52efd) oxidecomputer/console#2437
* [1625d02a](oxidecomputer/console@1625d02a) oxidecomputer/console#2458
* [fd82458e](oxidecomputer/console@fd82458e) oxidecomputer/console#2457
* [7daaa337](oxidecomputer/console@7daaa337) oxidecomputer/console#2453
david-crespo added a commit to oxidecomputer/omicron that referenced this pull request Oct 3, 2024
oxidecomputer/console@5561f28...073471c

* [073471c4](oxidecomputer/console@073471c4)
mock api: disks are created straight into detached state
* [612ec90c](oxidecomputer/console@612ec90c)
oxidecomputer/console#2485
* [614f1bb5](oxidecomputer/console@614f1bb5)
oxidecomputer/console#2466
* [df2dc14c](oxidecomputer/console@df2dc14c)
bump vite related deps for a weird vuln
* [a030b9e0](oxidecomputer/console@a030b9e0)
oxidecomputer/console#2464
* [dec48497](oxidecomputer/console@dec48497)
oxidecomputer/console#2461
* [e46216aa](oxidecomputer/console@e46216aa)
oxidecomputer/console#2482
* [0d897efe](oxidecomputer/console@0d897efe)
oxidecomputer/console#2479
* [f88790db](oxidecomputer/console@f88790db)
oxidecomputer/console#2478
* [d634c8f0](oxidecomputer/console@d634c8f0)
oxidecomputer/console#2477
* [eeaa14c3](oxidecomputer/console@eeaa14c3)
oxidecomputer/console#2475
* [5ece6e18](oxidecomputer/console@5ece6e18)
oxidecomputer/console#2467
* [4b699e01](oxidecomputer/console@4b699e01)
oxidecomputer/console#2448
* [9c9dc149](oxidecomputer/console@9c9dc149)
oxidecomputer/console#2465
* [1aa0fc9b](oxidecomputer/console@1aa0fc9b)
oxidecomputer/console#2463
* [57db4054](oxidecomputer/console@57db4054)
oxidecomputer/console#2462
* [da7fe328](oxidecomputer/console@da7fe328)
oxidecomputer/console#2460
* [e0d52efd](oxidecomputer/console@e0d52efd)
oxidecomputer/console#2437
* [1625d02a](oxidecomputer/console@1625d02a)
oxidecomputer/console#2458
* [fd82458e](oxidecomputer/console@fd82458e)
oxidecomputer/console#2457
* [7daaa337](oxidecomputer/console@7daaa337)
oxidecomputer/console#2453
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Boot order UI

4 participants