-
Notifications
You must be signed in to change notification settings - Fork 296
✨ Additional data volumes for machines #1668
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -163,6 +163,20 @@ type RootVolume struct { | |||||||||
| AvailabilityZone string `json:"availabilityZone,omitempty"` | ||||||||||
| } | ||||||||||
|
|
||||||||||
| type AdditionalBlockDevice struct { | ||||||||||
| // Name of the Cinder volume in the context of a machine. | ||||||||||
| // It will be combined with the machine name to make the actual volume name. | ||||||||||
| Name string `json:"name"` | ||||||||||
| // Size is the size in GB of the volume. | ||||||||||
| Size int `json:"diskSize"` | ||||||||||
| // VolumeType is the volume type of the volume. | ||||||||||
| // If omitted, the default type will be used. | ||||||||||
| VolumeType string `json:"volumeType,omitempty"` | ||||||||||
| // AvailabilityZone is the volume availability zone to create the volume in. | ||||||||||
| // If omitted, the availability zone of the server will be used. | ||||||||||
| AvailabilityZone string `json:"availabilityZone,omitempty"` | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @stephenfin Very much interested in your input here. I've proposed adding Options:
Is there any reason to have an option here to use the same AZ as the machine?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was planning to make the semantics the same as the root volume for now. I think that is less confusing. Then when we change the root volume we can change this as well. My plan is to have one "volume creating" function so hopefully the logic doesn't have to be duplicated.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The problem is we know the semantics of the rootVolume are wrong, and we're going to have a minor upgrade problem there. If we know what we're going to do with rootVolume I'd prefer to get this right in the first instance. See #1662 for WIP.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is left to do on the root volume WIP? Should we get that merged first?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like a sensible change to me. Are you worried about it being a breaking change because the default behaviour changes from "machine AZ" to "no AZ"? (Which should have been the default all along IMHO, but what's done is done...)
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess if we want a non-breaking change, then the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
That's what I believe is already CAPO's behaviour on rootVolumes: cluster-api-provider-openstack/pkg/cloud/services/compute/instance.go Lines 439 to 442 in 9d183bd
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes - I mirrored the current root behaviour for the additional volumes on purpose. I think we should change the behaviour for all types of volume together in a separate PR.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't like this behaviour for the same reason we need to change it for the root volume, namely what @JohnGarbutt called the '80% case' is impossible. We are definitely have to change it. However, I can also see the benefit of being consistent with the root volume, and making a breaking change to both APIs at the same time in the future.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We came to an agreement to bulk change it via another PR. I added it to the TODO. |
||||||||||
| } | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can be addressed in a separate PR but for supporting local disks, we'll need to add more fields.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just one I think, to indicate whether it should be a local or Cinder disk? The rest can be reused in both cases.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we accept my argument that there will be a single local disk then I would prefer it to have a separate field because it's more obvious to the user and doesn't require validation. I would only put a local flag here if we decide it's useful to have multiple local disks. But as you say we don't need to consider this yet.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mdbooth as I raised in Slack, I think I have a use case for multiple ephemeral devices carved out of the ephemeral volume, so I would like to see an option that permits that.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But it is something for a future PR anyway
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mkjpryor Please look at my recent refactor & patches, I think the way we're proposing now is the same behaviour as with rootVolumes. And indeed this can be bulked changed later.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we were to add support for local ephemeral drives, we would need the |
||||||||||
|
|
||||||||||
| // NetworkStatus contains basic information about an existing neutron network. | ||||||||||
| type NetworkStatus struct { | ||||||||||
| Name string `json:"name"` | ||||||||||
|
|
||||||||||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.