watcher.decision_engine.strategy.strategies.zone_migration Module¶watcher.decision_engine.strategy.strategies.zone_migration.ActionCounter(total_limit=6, per_pool_limit=2, per_node_limit=2)[source]¶Bases: object
Manage the number of actions in parallel
add_node(node)[source]¶Add the number of actions on node
| Parameters: | host – compute node |
|---|---|
| Returns: | True if action can be added, False otherwise |
add_pool(pool)[source]¶Increment the number of actions on host and total count
| Parameters: | pool – storage pool |
|---|---|
| Returns: | True if incremented, False otherwise |
is_node_max(node)[source]¶Check if per node count reached limit
| Returns: | True if count reached limit, False otherwise |
|---|
watcher.decision_engine.strategy.strategies.zone_migration.BaseFilter(values=[], **kwargs)[source]¶Bases: object
Base class for Filter
watcher.decision_engine.strategy.strategies.zone_migration.ComputeHostSortFilter(values=[], **kwargs)[source]¶Bases: watcher.decision_engine.strategy.strategies.zone_migration.SortMovingToFrontFilter
watcher.decision_engine.strategy.strategies.zone_migration.ComputeSpecSortFilter(values=[], **kwargs)[source]¶Bases: watcher.decision_engine.strategy.strategies.zone_migration.BaseFilter
get_disk_size(item, flavors)[source]¶Get disk size of item
| Parameters: |
|
|---|---|
| Returns: | disk size of item |
get_mem_size(item, flavors)[source]¶Get memory size of item
| Parameters: |
|
|---|---|
| Returns: | memory size of item |
watcher.decision_engine.strategy.strategies.zone_migration.ProjectSortFilter(values=[], **kwargs)[source]¶Bases: watcher.decision_engine.strategy.strategies.zone_migration.SortMovingToFrontFilter
ComputeHostSortFilter
watcher.decision_engine.strategy.strategies.zone_migration.SortMovingToFrontFilter(values=[], **kwargs)[source]¶Bases: watcher.decision_engine.strategy.strategies.zone_migration.BaseFilter
This is to move to front if a condition is True
watcher.decision_engine.strategy.strategies.zone_migration.StorageHostSortFilter(values=[], **kwargs)[source]¶Bases: watcher.decision_engine.strategy.strategies.zone_migration.SortMovingToFrontFilter
StoragehostSortFilter
watcher.decision_engine.strategy.strategies.zone_migration.StorageSpecSortFilter(values=[], **kwargs)[source]¶Bases: watcher.decision_engine.strategy.strategies.zone_migration.BaseFilter
watcher.decision_engine.strategy.strategies.zone_migration.ZoneMigration(config, osc=None)[source]¶Bases: watcher.decision_engine.strategy.strategies.base.ZoneMigrationBaseStrategy
Zone migration using instance and volume migration
This is zone migration strategy to migrate many instances and volumes efficiently with minimum downtime for hardware maintenance.
filtered_targets()[source]¶Filter targets
prioritize instances and volumes based on priorities from input parameters.
| Returns: | prioritized targets |
|---|
get_dst_node(src_node)[source]¶Get destination node from self.migration_compute_nodes
| Parameters: | src_node – compute node name |
|---|---|
| Returns: | destination node name |
get_dst_pool_and_type(src_pool, src_type)[source]¶Get destination pool and type from self.migration_storage_pools
| Parameters: |
|
|---|---|
| Returns: | set of storage pool name and volume type name |
get_host_by_pool(pool)[source]¶Get host name from pool name
Utility method to get host name from pool name which is formatted as host@backend#pool.
| Parameters: | pool – pool name |
|---|---|
| Returns: | host name |
get_instances()[source]¶Get migrate target instances
| Returns: | instance list on src nodes and compute scope |
|---|
get_priority_filter_list()[source]¶Get priority filters
| Returns: | list of filter object with arguments in self.priority |
|---|
get_priority_filter_map()[source]¶Get priority filter map
| Returns: | filter map key is the key in priority input parameters. value is filter class for prioritizing. |
|---|
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()[source]¶Get migrate target volumes
| Returns: | volume list on src pools and storage scope |
|---|
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.