Add max_over_subscription_ratio parameter

... to each driver configurations, so that users can customize this
option in individual driver sections.

Note that this option works only when the driver supports thin
provisioning.

Change-Id: I8b6fd6a14f77f56c6b42a9977fe81b64698b5db4
This commit is contained in:
Takashi Kajinami 2024-03-17 00:09:54 +09:00
parent 59c444d7a4
commit a37c133988
9 changed files with 45 additions and 0 deletions

View File

@ -92,6 +92,11 @@
# operation.
# Defaults to: $facts['os_service_default']
#
# [*max_over_subscription_ratio*]
# (optional) Float representation of the over subscription ratio when thin
# provisionig is involved.
# Defaults to: $facts['os_service_default']
#
# [*package_ensure*]
# (optional) Ensure state for package. Defaults to 'present'.
#
@ -128,6 +133,7 @@ define manila::backend::dellemc_unity (
$reserved_share_percentage = $facts['os_service_default'],
$reserved_share_from_snapshot_percentage = $facts['os_service_default'],
$reserved_share_extend_percentage = $facts['os_service_default'],
$max_over_subscription_ratio = $facts['os_service_default'],
$package_ensure = 'present',
Boolean $manage_storops = true,
) {
@ -157,6 +163,7 @@ define manila::backend::dellemc_unity (
"${share_backend_name}/reserved_share_percentage": value => $reserved_share_percentage;
"${share_backend_name}/reserved_share_from_snapshot_percentage": value => $reserved_share_from_snapshot_percentage;
"${share_backend_name}/reserved_share_extend_percentage": value => $reserved_share_extend_percentage;
"${share_backend_name}/max_over_subscription_ratio": value => $max_over_subscription_ratio;
}
ensure_packages('nfs-client', {

View File

@ -42,6 +42,11 @@
# operation.
# Defaults to: $facts['os_service_default']
#
# [*max_over_subscription_ratio*]
# (optional) Float representation of the over subscription ratio when thin
# provisionig is involved.
# Defaults to: $facts['os_service_default']
#
# [*package_ensure*]
# (optional) Ensure state for package. Defaults to 'present'.
#
@ -63,6 +68,7 @@ define manila::backend::flashblade (
$reserved_share_percentage = $facts['os_service_default'],
$reserved_share_from_snapshot_percentage = $facts['os_service_default'],
$reserved_share_extend_percentage = $facts['os_service_default'],
$max_over_subscription_ratio = $facts['os_service_default'],
$package_ensure = 'present',
) {
@ -83,6 +89,7 @@ define manila::backend::flashblade (
"${share_backend_name}/reserved_share_percentage": value => $reserved_share_percentage;
"${share_backend_name}/reserved_share_from_snapshot_percentage": value => $reserved_share_from_snapshot_percentage;
"${share_backend_name}/reserved_share_extend_percentage": value => $reserved_share_extend_percentage;
"${share_backend_name}/max_over_subscription_ratio": value => $max_over_subscription_ratio;
}
ensure_packages('nfs-client', {

View File

@ -55,6 +55,11 @@
# operation.
# Defaults to: $facts['os_service_default']
#
# [*max_over_subscription_ratio*]
# (optional) Float representation of the over subscription ratio when thin
# provisionig is involved.
# Defaults to: $facts['os_service_default']
#
# [*package_ensure*]
# (optional) Ensure state for package. Defaults to 'present'.
#
@ -83,6 +88,7 @@ define manila::backend::hitachi_hnas (
$reserved_share_percentage = $facts['os_service_default'],
$reserved_share_from_snapshot_percentage = $facts['os_service_default'],
$reserved_share_extend_percentage = $facts['os_service_default'],
$max_over_subscription_ratio = $facts['os_service_default'],
$package_ensure = 'present',
) {
@ -104,6 +110,7 @@ define manila::backend::hitachi_hnas (
"${share_backend_name}/reserved_share_percentage": value => $reserved_share_percentage;
"${share_backend_name}/reserved_share_from_snapshot_percentage": value => $reserved_share_from_snapshot_percentage;
"${share_backend_name}/reserved_share_extend_percentage": value => $reserved_share_extend_percentage;
"${share_backend_name}/max_over_subscription_ratio": value => $max_over_subscription_ratio;
}
ensure_packages('nfs-client', {

View File

@ -110,6 +110,11 @@
# operation.
# Defaults to: $facts['os_service_default']
#
# [*max_over_subscription_ratio*]
# (optional) Float representation of the over subscription ratio when thin
# provisionig is involved.
# Defaults to: $facts['os_service_default']
#
# [*package_ensure*]
# (optional) Ensure state for package. Defaults to 'present'.
#
@ -146,6 +151,7 @@ define manila::backend::netapp (
$reserved_share_percentage = $facts['os_service_default'],
$reserved_share_from_snapshot_percentage = $facts['os_service_default'],
$reserved_share_extend_percentage = $facts['os_service_default'],
$max_over_subscription_ratio = $facts['os_service_default'],
$package_ensure = 'present',
) {
@ -177,6 +183,7 @@ define manila::backend::netapp (
"${share_backend_name}/reserved_share_percentage": value => $reserved_share_percentage;
"${share_backend_name}/reserved_share_from_snapshot_percentage": value => $reserved_share_from_snapshot_percentage;
"${share_backend_name}/reserved_share_extend_percentage": value => $reserved_share_extend_percentage;
"${share_backend_name}/max_over_subscription_ratio": value => $max_over_subscription_ratio;
}
ensure_packages('nfs-client', {

View File

@ -0,0 +1,10 @@
---
features:
- |
The following defined resource types now support
the ``max_over_subscription_ratio`` parameter.
- ``manila::backend::dellemc_unity``
- ``manila::backend::flashblade``
- ``manila::backend::hitachi_hnas``
- ``manila::backend::netapp``

View File

@ -28,6 +28,7 @@ describe 'manila::backend::dellemc_unity' do
:reserved_share_percentage => '<SERVICE DEFAULT>',
:reserved_share_from_snapshot_percentage => '<SERVICE DEFAULT>',
:reserved_share_extend_percentage => '<SERVICE DEFAULT>',
:max_over_subscription_ratio => '<SERVICE DEFAULT>',
}
end
@ -80,6 +81,7 @@ describe 'manila::backend::dellemc_unity' do
:reserved_share_percentage => 10.0,
:reserved_share_from_snapshot_percentage => 10.1,
:reserved_share_extend_percentage => 10.2,
:max_over_subscription_ratio => 1.5,
})
end

View File

@ -19,6 +19,7 @@ describe 'manila::backend::flashblade' do
:reserved_share_percentage => '<SERVICE DEFAULT>',
:reserved_share_from_snapshot_percentage => '<SERVICE DEFAULT>',
:reserved_share_extend_percentage => '<SERVICE DEFAULT>',
:max_over_subscription_ratio => '<SERVICE DEFAULT>',
}
end
@ -58,6 +59,7 @@ describe 'manila::backend::flashblade' do
:reserved_share_percentage => 10.0,
:reserved_share_from_snapshot_percentage => 10.1,
:reserved_share_extend_percentage => 10.2,
:max_over_subscription_ratio => 1.5,
})
end

View File

@ -17,6 +17,7 @@ describe 'manila::backend::hitachi_hnas' do
:reserved_share_percentage => 10.0,
:reserved_share_from_snapshot_percentage => 10.1,
:reserved_share_extend_percentage => 10.2,
:max_over_subscription_ratio => 1.5,
}
end

View File

@ -31,6 +31,7 @@ describe 'manila::backend::netapp' do
:reserved_share_percentage => '<SERVICE DEFAULT>',
:reserved_share_from_snapshot_percentage => '<SERVICE DEFAULT>',
:reserved_share_extend_percentage => '<SERVICE DEFAULT>',
:max_over_subscription_ratio => '<SERVICE DEFAULT>',
}
end
@ -80,6 +81,7 @@ describe 'manila::backend::netapp' do
:reserved_share_percentage => 10.0,
:reserved_share_from_snapshot_percentage => 10.1,
:reserved_share_extend_percentage => 10.2,
:max_over_subscription_ratio => 1.5,
})
end