The watcher.decision_engine.strategy.strategies.storage_capacity_balance Module

The watcher.decision_engine.strategy.strategies.storage_capacity_balance Module

Workload balance using cinder volume migration

Description

This strategy migrates volumes based on the workload of the cinder pools. It makes decision to migrate a volume whenever a pool’s used utilization % is higher than the specified threshold. The volume to be moved should make the pool close to average workload of all cinder pools.

Requirements

  • You must have at least 2 cinder volume pools to run this strategy.
class watcher.decision_engine.strategy.strategies.storage_capacity_balance.StorageCapacityBalance(config, osc=None)[source]

Bases: watcher.decision_engine.strategy.strategies.base.WorkloadStabilizationBaseStrategy

Storage capacity balance using cinder volume migration

Description

This strategy migrates volumes based on the workload of the cinder pools. It makes decision to migrate a volume whenever a pool’s used utilization % is higher than the specified threshold. The volume to be moved should make the pool close to average workload of all cinder pools.

Requirements

  • You must have at least 2 cinder volume pools to run this strategy.
check_pool_type(volume, dest_pool)[source]
do_execute(audit=None)[source]

Strategy execution phase

This phase is where you should put the main logic of your strategy.

get_actions(pool, volumes, threshold)[source]

get volume, pool key-value action

return: retype, migrate dict

classmethod get_config_opts()[source]
classmethod get_display_name()[source]
classmethod get_name()[source]
get_pools(cinder)[source]

Get all volume pools excepting ex_pools.

Parameters:cinder – cinder client
Returns:volume pools
classmethod get_schema()[source]
classmethod get_translatable_display_name()[source]
get_volume_type_by_name(cinder, backendname)[source]
get_volumes(cinder)[source]

Get all volumes with staus in available or in-use and no snapshot.

Parameters:cinder – cinder client
Returns:all volumes
group_pools(pools, threshold)[source]

group volume pools by threshold.

Parameters:
  • pools – all volume pools
  • threshold – volume threshold
Returns:

under and over threshold pools

migrate_fit(volume, threshold)[source]
post_execute()[source]

Post-execution phase

pre_execute()[source]

Pre-execution phase

This can be used to fetch some pre-requisites or data.

retype_fit(volume, threshold)[source]
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.