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

Storage: Specify storage volume type in disk device source #14491

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

MggMuggins
Copy link
Contributor

This change lays the groundwork for attaching VM root disk devices to instances by making two changes:

Refactor

Renames (Un)MountCustomVolume -> (Un)MountVolume to allow for generic activation of virtual-machine and container volumes.

Specify volume type in disk device

Allows the following syntax for specifying custom storage volumes in disk devices:

devices:
  cosmic-dust-analyzer-data:
	pool: default
	source: custom/cosmic-dust-analyzer-data
	type: disk

(I was incorrect in my assessment that we already support this syntax; the code was there but wasn't being used consistently)

This function:
- Is not clearly named (it returns a path)
- Is used in exactly one place
- Does 1 uneeded DB query

Signed-off-by: Wesley Hershberger <[email protected]>
This saves us 1 db query.

Signed-off-by: Wesley Hershberger <[email protected]>
Allows device `source` property as `custom/name`

Signed-off-by: Wesley Hershberger <[email protected]>
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.

1 participant