-
-
Notifications
You must be signed in to change notification settings - Fork 740
feat: add full disk volumes #12104
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
base: main
Are you sure you want to change the base?
feat: add full disk volumes #12104
Conversation
7681083 to
6cf202a
Compare
b928782 to
7dc9ae9
Compare
| } | ||
|
|
||
| v.TypedSpec().Type = block.VolumeTypeDisk | ||
| v.TypedSpec().Locator.Match = labelVolumeMatch(volumeID) |
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 this is unused/should be dropped? as it's a disk, we can't match on label
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.
We need some kind of matcher, but I think we can reuse disk locator here? This should be sufficient.
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'm not sure, a good way is to reboot Talos and see what it does?
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 haven't seen any issues, however it goes through the provisioning flow each time - reusing disk locator should cut that, right?
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.
| } | ||
|
|
||
| v.TypedSpec().Type = block.VolumeTypeDisk | ||
| v.TypedSpec().Locator.Match = diskSelector |
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.
this does work, but by chance a bit (with a specific form of disk selector).
we have a problem here, the disk selector is evaluated in:
while volume locator in:
So anything which does simple disk.<something> works as they both have same.
But e.g. system_disk is not available in volume locator, also volume locator runs for partitions as well, so it might match it by accident.
So I think we need a separate locator.DiskMatch or something close to that for disk volumes.
Open to any other ideas as well
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.
Let me know if the changes I did make any sense. I've added different *cel.Env that is selected based on volume type: https://github.com/siderolabs/talos/pull/12104/files#diff-29f79fc583c81df9b1167eb597fb3642587aa952b153ee5c3c5190005577bd6bR54-R61
9c43c0f to
23a86c2
Compare
Orzelius
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.
Very cool
Love the thorough tests!
When set to `disk`, a full block device is used for the volume. When `volumeType = "disk"`: - Size specific settings are not allowed in the provisioning block (`minSize`, `maxSize`, `grow`). Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
23a86c2 to
2059374
Compare
volumeTypein UserVolumeConfig can be set todisk.When set to
disk, a full block device is used for the volume.When
volumeType = "disk":minSize,maxSize,grow).