-
Notifications
You must be signed in to change notification settings - Fork 985
Volume disk device source-type
#14886
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
Volume disk device source-type
#14886
Conversation
e45b418 to
5e55eff
Compare
5e55eff to
b56f737
Compare
I think Would having a source-type of "instance" require a lot of extra DB lookups in order to figure out the instance type btw? |
|
I went with Yes, If the volume type is not derivable from the disk device we'd need to look it up to know which |
Looks like we are doing this already anyway? |
b56f737 to
bd48de3
Compare
|
Looks like a second query isn't done for 50% of the times we parse that field. 1 2 3 I think we've discussed this before, but I don't love I was able to cut out an extra query for each usage by using the already-loaded project. |
904bd91 to
f535991
Compare
OK makes sense, lets use the existing "container" and "virtual-machine" prefixes then. Ta |
tomponline
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a rebase is required as it looks like you've inadvertently changed a bunch of unrelated sprintf removals back.
e36e002 to
036d600
Compare
Replaces parsing of the source property as `volumeType/volumeName` with a separate key `source-type`. Signed-off-by: Wesley Hershberger <[email protected]>
Signed-off-by: Wesley Hershberger <[email protected]>
Signed-off-by: Wesley Hershberger <[email protected]>
…ame" This reverts commit 7f3eb7b. Signed-off-by: Wesley Hershberger <[email protected]>
This reverts commit 687a275. Signed-off-by: Wesley Hershberger <[email protected]>
This reverts commit af7c79d. Signed-off-by: Wesley Hershberger <[email protected]>
Signed-off-by: Wesley Hershberger <[email protected]>
Signed-off-by: Wesley Hershberger <[email protected]>
036d600 to
63dc1c3
Compare
|
Yes, sad rebase. Totally unsure what happened there. Fixed now. |
source-type
tomponline
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I'm torn between the
volumeType/volumeNameandsource-typesyntaxes for specifying other types of storage volumes in disk devices. A few factors here, some I knew when I wrote my spec, but a few I didn't:volumeType/volumeName, we introduced novel syntax that the server doesn't use anywhere else, and doesn't fit nicely with the principle of "one value per map key" (see Storage: Specify storage volume type in disk devicesource#14491).volumeType/volumeNameandpoolName/volumeName(seelxc storage volume copy)storage.backups_volumeandstorage.image_volumeserver configuration keys also usepoolName/volumeNameThe current syntax for specifying volumes as disk devices is:
This PR uses this style instead:
source-typeiscustomby default so it can be omitted for custom volumes.