watcher.decision_engine.strategy.strategies.storage_capacity_balance
Module¶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
Limitations
Spec URL
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_config_opts
()[source]¶Defines the configuration options to be associated to this loadable
Returns: | A list of configuration options relative to this Loadable |
---|---|
Return type: | list of oslo_config.cfg.Opt instances |
get_pools
(cinder)[source]¶Get all volume pools excepting ex_pools.
Parameters: | cinder – cinder client |
---|---|
Returns: | volume pools |
get_schema
()[source]¶Defines a Schema that the input parameters shall comply to
Returns: | A jsonschema format (mandatory default setting) |
---|---|
Return type: | dict |
get_volumes
(cinder)[source]¶Get all volumes with status 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.