-
Notifications
You must be signed in to change notification settings - Fork 933
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: Define per-pool default block size #14594
Conversation
lxd/scriptlet/instance_placement.go
Outdated
@@ -221,7 +221,12 @@ func InstancePlacementRun(ctx context.Context, l logger.Logger, s *state.State, | |||
|
|||
// Apply VM root disk size defaults if not specified. | |||
if req.Type == api.InstanceTypeVM && rootDiskSizeStr == "" { | |||
rootDiskSizeStr = storageDrivers.DefaultBlockSize | |||
driver, err := storageDrivers.Load(s, rootDiskConfig["pool"], "", nil, nil, nil, nil) |
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.
please can you add a function like storageDrivers.DefaultVMBlockFilesystemSize
for this.
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 added a function under storage/util
that helps with this, I hope this is along the lines of what you expected.
If so, this is ready for a review.
b9e7305
to
f14e1a9
Compare
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
All drivers share a common default block size value with the exception of PowerFlex. Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
Created in the `storage` package to make use of `LoadByName` can't use it on `storage/drivers` because of import cycle. Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
…ported This is aligned with the behavior of the other drivers. Signed-off-by: hamistao <[email protected]>
f14e1a9
to
0aff592
Compare
This includes some improvements that were originally a part of the fix implemented in #14511, but ended up not being needed for that fix. They are still nice to have and thus were included here.