Fix spelling error in the comments of
file host_maintenance.py This is to fix spelling error and unsuitable punctuation in file host_maintenance.py Change-Id: I9c535059c3a02277be4c7329693db34fb7674b4e
This commit is contained in:
@@ -50,7 +50,7 @@ class HostMaintenance(base.HostMaintenanceBaseStrategy):
|
|||||||
- It migrates all instances from one host to other hosts. It's better to
|
- It migrates all instances from one host to other hosts. It's better to
|
||||||
execute such strategy when load is not heavy, and use this algorithm
|
execute such strategy when load is not heavy, and use this algorithm
|
||||||
with `ONESHOT` audit.
|
with `ONESHOT` audit.
|
||||||
- It assume that cold and live migrations are possible
|
- It assumes that cold and live migrations are possible.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
INSTANCE_MIGRATION = "migrate"
|
INSTANCE_MIGRATION = "migrate"
|
||||||
@@ -243,16 +243,16 @@ class HostMaintenance(base.HostMaintenanceBaseStrategy):
|
|||||||
"""safe maintain one compute node
|
"""safe maintain one compute node
|
||||||
|
|
||||||
Migrate all instances of the maintenance_node intensively to the
|
Migrate all instances of the maintenance_node intensively to the
|
||||||
backup host. If users didn't give the backup host, it will select
|
backup host. If the user didn't give the backup host, it will
|
||||||
one unused node to backup the maintaining node.
|
select one unused node to backup the maintaining node.
|
||||||
|
|
||||||
It calculate the resource both of the backup node and maintaining
|
It calculate the resource both of the backup node and maintaining
|
||||||
node to evaluate the migrations from maintaining node to backup node.
|
node to evaluate the migrations from maintaining node to backup node.
|
||||||
If all instances of the maintaining node can migrated to
|
If all instances of the maintaining node can migrated to
|
||||||
the backup node, it will set the maintaining node in
|
the backup node, it will set the maintaining node in
|
||||||
'watcher_maintaining' status., and add the migrations to solution.
|
'watcher_maintaining' status, and add the migrations to solution.
|
||||||
"""
|
"""
|
||||||
# If user gives a backup node with required capacity, then migrate
|
# If the user gives a backup node with required capacity, then migrates
|
||||||
# all instances from the maintaining node to the backup node.
|
# all instances from the maintaining node to the backup node.
|
||||||
if backup_node:
|
if backup_node:
|
||||||
if self.host_fits(maintenance_node, backup_node):
|
if self.host_fits(maintenance_node, backup_node):
|
||||||
@@ -261,8 +261,8 @@ class HostMaintenance(base.HostMaintenanceBaseStrategy):
|
|||||||
self.host_migration(maintenance_node, backup_node)
|
self.host_migration(maintenance_node, backup_node)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# If uses didn't give the backup host, select one unused node
|
# If the user didn't give the backup host, select one unused
|
||||||
# with required capacity, then migrate all instances
|
# node with required capacity, then migrates all instances
|
||||||
# from maintaining node to it.
|
# from maintaining node to it.
|
||||||
nodes = sorted(
|
nodes = sorted(
|
||||||
self.get_disabled_compute_nodes().values(),
|
self.get_disabled_compute_nodes().values(),
|
||||||
|
|||||||
Reference in New Issue
Block a user