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
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
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
get_pools
(cinder)[source]¶Get all volume pools excepting ex_pools.
Parameters: | cinder – cinder client |
---|---|
Returns: | volume pools |
get_volumes
(cinder)[source]¶Get all volumes with staus in available or in-use and no snapshot.
Parameters: | cinder – cinder client |
---|---|
Returns: | all volumes |
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.