Support for cinder volume_type
Used for testing cinder multiback end support and QOS specs Change-Id: I5df4c2e47ef2253c296898f4e49b29e6d3927642
This commit is contained in:
parent
e9da263ae9
commit
ed33269ba4
@ -211,6 +211,13 @@ This section defines the storage specific configs in the staging phase::
|
|||||||
# The size of the test file for running IO tests in GB. Must be less or
|
# The size of the test file for running IO tests in GB. Must be less or
|
||||||
# equal than disk_size.
|
# equal than disk_size.
|
||||||
io_file_size: 1
|
io_file_size: 1
|
||||||
|
# Optional volume_type for cinder volumes
|
||||||
|
# Do not specify unless using QOS specs or testing a specific volume type
|
||||||
|
# Used to test multibackend support and QOS specs
|
||||||
|
# Must be a valid cinder volume type as listed by openstack volume type list
|
||||||
|
# Make sure volume type is public
|
||||||
|
# If an invalid volume type is specified tool will Error out on volume create
|
||||||
|
# volume_type: cephtype
|
||||||
|
|
||||||
* **client:storage_tool_configs**
|
* **client:storage_tool_configs**
|
||||||
|
|
||||||
|
@ -69,6 +69,8 @@ Feature List
|
|||||||
|
|
||||||
* User configurable workload sequence
|
* User configurable workload sequence
|
||||||
|
|
||||||
|
* Support for creating cinder volumes with custom volume types and associated QOS specs
|
||||||
|
|
||||||
* Supports automated scale progressions (VM count series in any multiple
|
* Supports automated scale progressions (VM count series in any multiple
|
||||||
increment) to reduce dramatically scale testing time
|
increment) to reduce dramatically scale testing time
|
||||||
|
|
||||||
|
@ -165,10 +165,12 @@ class BaseNetwork(object):
|
|||||||
if config_scale['use_floatingip']:
|
if config_scale['use_floatingip']:
|
||||||
external_network = find_external_network(self.neutron_client)
|
external_network = find_external_network(self.neutron_client)
|
||||||
|
|
||||||
|
volume_type = None
|
||||||
storage_mode = self.router.user.tenant.kloud.storage_mode
|
storage_mode = self.router.user.tenant.kloud.storage_mode
|
||||||
if storage_mode and config_scale['storage_stage_configs']['target'] == 'volume':
|
if storage_mode and config_scale['storage_stage_configs']['target'] == 'volume':
|
||||||
bs_obj = base_storage.BaseStorage(self.cinder_client)
|
bs_obj = base_storage.BaseStorage(self.cinder_client)
|
||||||
vol_size = config_scale['storage_stage_configs']['disk_size']
|
vol_size = config_scale['storage_stage_configs']['disk_size']
|
||||||
|
volume_type = config_scale['storage_stage_configs'].get('volume_type', None)
|
||||||
else:
|
else:
|
||||||
vol_size = 0
|
vol_size = 0
|
||||||
|
|
||||||
@ -182,6 +184,10 @@ class BaseNetwork(object):
|
|||||||
# Don't create volumn for KB-Proxy
|
# Don't create volumn for KB-Proxy
|
||||||
if vol_size and instance_count < vm_total - 1:
|
if vol_size and instance_count < vm_total - 1:
|
||||||
vol_name = network_prefix + "-V" + str(instance_count)
|
vol_name = network_prefix + "-V" + str(instance_count)
|
||||||
|
if volume_type:
|
||||||
|
perf_instance.vol = bs_obj.create_vol(vol_size, name=vol_name,
|
||||||
|
type=volume_type)
|
||||||
|
else:
|
||||||
perf_instance.vol = bs_obj.create_vol(vol_size, name=vol_name)
|
perf_instance.vol = bs_obj.create_vol(vol_size, name=vol_name)
|
||||||
self.res_logger.log('volumes', vol_name, perf_instance.vol.id)
|
self.res_logger.log('volumes', vol_name, perf_instance.vol.id)
|
||||||
|
|
||||||
|
@ -29,7 +29,11 @@ class BaseStorage(object):
|
|||||||
def __init__(self, cinderclient):
|
def __init__(self, cinderclient):
|
||||||
self.cinderclient = cinderclient
|
self.cinderclient = cinderclient
|
||||||
|
|
||||||
def create_vol(self, size, name=None):
|
def create_vol(self, size, name=None, type=None):
|
||||||
|
if type:
|
||||||
|
vol = self.cinderclient.volumes.create(size, name=name,
|
||||||
|
volume_type=type)
|
||||||
|
else:
|
||||||
vol = self.cinderclient.volumes.create(size, name=name)
|
vol = self.cinderclient.volumes.create(size, name=name)
|
||||||
for _ in range(10):
|
for _ in range(10):
|
||||||
if vol.status == 'creating':
|
if vol.status == 'creating':
|
||||||
|
@ -302,6 +302,14 @@ client:
|
|||||||
# The size of the test file for running IO tests in GB. Must be less or
|
# The size of the test file for running IO tests in GB. Must be less or
|
||||||
# equal than disk_size. Defaults to 1 GB
|
# equal than disk_size. Defaults to 1 GB
|
||||||
io_file_size: 1
|
io_file_size: 1
|
||||||
|
# Optional volume_type for cinder volumes
|
||||||
|
# Do not specify unless using QOS specs or testing a specific volume type
|
||||||
|
# Used to test multibackend support and QOS specs
|
||||||
|
# Must be a valid cinder volume type as listed by openstack volume type list
|
||||||
|
# Make sure volume type is public
|
||||||
|
# If an invalid volume type is specified tool will Error out on volume create
|
||||||
|
# volume_type: cephtype
|
||||||
|
|
||||||
|
|
||||||
# Storage tool specific configs (per VM)
|
# Storage tool specific configs (per VM)
|
||||||
# Multiple factors can impact the storage performance numbers, and KloudBuster is defining
|
# Multiple factors can impact the storage performance numbers, and KloudBuster is defining
|
||||||
|
Loading…
x
Reference in New Issue
Block a user