Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choose existing disk as a boot disk on instance create #1060

Closed
smklein opened this issue Jul 20, 2022 · 9 comments · Fixed by #2076
Closed

Choose existing disk as a boot disk on instance create #1060

smklein opened this issue Jul 20, 2022 · 9 comments · Fixed by #2076
Assignees
Labels
known issue To include in customer documentation and training
Milestone

Comments

@smklein
Copy link

smklein commented Jul 20, 2022

... but I should be able to, right?

Steps to repro:

  • Create an instance, use an existing image as the disk of choice (I used debian, you can use whatever)
  • Observe the disk and instance exist
  • Stop the instance, delete it
  • Observe the boot disk still exists
  • Try to create a new instance using the old boot disk
  • Observe that "boot disk" requires one of "{distros, images, snapshots}". Old boot disks do not show up here. Notably it can be attached as an "additional disk", but not as an old boot disk.
@smklein
Copy link
Author

smklein commented Jul 20, 2022

FWIW I consider this relatively low-priority, but wanted to flag it regardless.

@zephraph
Copy link
Contributor

Yeah, we're aware of this. It's relatively low priority in the sense of UI functionality, but it's technically rather easy to accommodate. Boot disk creation / configuration is still the area that needs the most work in instance creation.

@zephraph zephraph modified the milestones: First Rack Shipment, Guided Demo Jul 21, 2022
@zephraph zephraph self-assigned this Jul 21, 2022
@zephraph zephraph modified the milestones: Guided Demo, First Rack Shipment Jul 27, 2022
@zephraph
Copy link
Contributor

I've pushed this issue off to the next milestone. The UI pattern for implementing this feature exists but there's a bit of a larger question around data. Ultimately this relies on the disks list endpoint but will need to be filtered down to unattached disks.

Currently the notion of filtering doesn't exist in our API. We'd need to figure out a way of requesting unattached disks. That could be /disks/unattached or /disks?instance_id=null... something like that. Idk, we'll need to figure it out.

@david-crespo david-crespo removed this from the First Rack Shipment milestone Oct 24, 2022
@david-crespo
Copy link
Collaborator

How important is API support @zephraph? Could we fudge it by filtering on the client?

@zephraph
Copy link
Contributor

zephraph commented Feb 8, 2023

Potentially. @ahl wants to change the part of the instance create API around disks, images, etc so it could impact this.

@askfongjojo askfongjojo added this to the 8 milestone Mar 9, 2024
@askfongjojo askfongjojo added the known issue To include in customer documentation and training label Mar 9, 2024
@david-crespo
Copy link
Collaborator

The problem here is we always insert a created disk from the "boot disk" section as the first element in the list of disks. I think in order to solve this properly we need to rework these two sections so that we are not introducing an artificial concept of boot disk. We do have that concept in the API in that the first disk in the list is treated as the boot disk, but there is otherwise nothing special about it. The Boot Disk section of the form is a helper to make clear that you almost certainly want at least one disk attached to your instance so you can boot from it.

Maybe we can keep the boot disk section but add a kind of toggle that lets you choose between creating a new disk and attaching an existing one. The thing I don't like about that is that it duplicates the distinction we already make under additional disks between create and attach. Maybe that's fine.

disks: [
{
type: 'create',
// TODO: Determine the pattern of the default boot disk name
name: bootDiskName,
description: `Created as a boot disk for ${values.name}`,
// Minimum size as greater than the image is validated
// directly on the boot disk size input
size: values.bootDiskSize * GiB,
diskSource: {
type: 'image',
imageId: values.image,
},
},
...values.disks,
],

image

@benjaminleonard
Copy link
Contributor

Can we just add "Disk" as a tab under boot disk. That way it's extendable and we can use snapshots in the future too. That tab can contain a listbox with all the disks (another motivation for #1942).

@david-crespo
Copy link
Collaborator

david-crespo commented Mar 12, 2024

That’s just the kind of inside-the-box thinking we need.

@david-crespo david-crespo modified the milestones: 8, 7 Mar 12, 2024
@benjaminleonard
Copy link
Contributor

I only occasionally suggest the most convoluted solution

@david-crespo david-crespo modified the milestones: 7, 8 Mar 25, 2024
@david-crespo david-crespo changed the title Cannot use an existing disk as a boot image Use existing disk as a boot image Mar 25, 2024
@david-crespo david-crespo changed the title Use existing disk as a boot image Use existing disk as a boot disk on instance create Mar 25, 2024
@david-crespo david-crespo changed the title Use existing disk as a boot disk on instance create Choose existing disk as a boot disk on instance create Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
known issue To include in customer documentation and training
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants