Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Fixed auto block-size not considering resource group and controller properties for initial min-IO size
- Fixed resource definition delete setting DELETE flag when resources are still in use
- Fixed retry deletion of already deleting resource (no longer fails if it is the second to last diskful resource)
- Satellite now properly merges remote nodes + their data (props, netIfs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,42 @@ private void rscMinIoSizeCheck(
}

final boolean autoMinIoSizeForVlmDfn = minIoSizeHelper.isAutoMinIoSize(vlmDfn, apiCtx);

// Consider configured block-size from resource group / volume group hierarchy
// so that volumes on storage pools with smaller min-IO size (e.g. 512) are created
// with the larger configured block-size (e.g. 4096), enabling later placement on
// storage pools with larger min-IO size
long effectiveBlockSize = poolBlockSize;
if (autoMinIoSizeForVlmDfn && vlmBlockSizeStr == null)
{
final PriorityProps blockSizePrioProps = new PriorityProps(
vlmDfn.getProps(apiCtx),
rscDfn.getProps(apiCtx),
rscDfn.getResourceGroup().getVolumeGroupProps(apiCtx, vlmDfn.getVolumeNumber()),
rscDfn.getResourceGroup().getProps(apiCtx),
ctrlPropsHelper.getStltPropsForView()
);
final @Nullable String cfgBlockSizeStr = blockSizePrioProps.getProp(
InternalApiConsts.KEY_DRBD_BLOCK_SIZE,
ApiConsts.NAMESPC_DRBD_DISK_OPTIONS
);
if (cfgBlockSizeStr != null)
{
try
{
final long cfgBlockSize = MathUtils.bounds(
BlockSizeConsts.MIN_IO_SIZE,
Long.parseLong(cfgBlockSizeStr),
BlockSizeConsts.MAX_IO_SIZE
);
effectiveBlockSize = Math.max(poolBlockSize, cfgBlockSize);
}
catch (NumberFormatException ignored)
{
}
}
}

boolean minIoNeedsUpdate;
if (vlmBlockSizeStr == null)
{
Expand All @@ -663,7 +699,7 @@ private void rscMinIoSizeCheck(
if (canChangeMinIo)
{
// Set the changed minIoSize
vlmDfn.setMinIoSize(poolBlockSize, apiCtx);
vlmDfn.setMinIoSize(effectiveBlockSize, apiCtx);
if (rscDfn.getResourceCount() > 1)
{
// Only enable the "restart DRBD" property if this is NOT the very first resource we are
Expand Down