Remove useless error handling in prep_resize
The MigrationPreCheckError handling in prep_resize was
added in commit e24f333cd5
which at the same time added code to the libvirt driver's
migrate_disk_and_power_off method to raise MigrationPreCheckError.
However, migrate_disk_and_power_off is only called from the
ComputeManager.resize_instance method, which is called from
the ComputeManager._prep_resize method but via an RPC cast.
Because of the RPC cast from the destination node _prep_resize
to the source node resize_instance, the MigrationPreCheckError
from the migrate_disk_and_power_off method on the source node
is not going to come back and be raised out of _prep_resize,
thus making the error handling in prep_resize dead (and confusing)
code.
This simply removes it.
Change-Id: I60894e9c6f03b20dc59be8d9b01808da3980f4b1
This commit is contained in:
@@ -3794,16 +3794,6 @@ class ComputeManager(manager.Manager):
|
||||
self._prep_resize(context, image, instance,
|
||||
instance_type, filter_properties,
|
||||
node, clean_shutdown)
|
||||
# NOTE(dgenin): This is thrown in LibvirtDriver when the
|
||||
# instance to be migrated is backed by LVM.
|
||||
# Remove when LVM migration is implemented.
|
||||
except exception.MigrationPreCheckError:
|
||||
# TODO(mriedem): How is it even possible to get here?
|
||||
# _prep_resize does not call the driver. The resize_instance
|
||||
# method does, but we RPC cast to the source node to do that
|
||||
# so we shouldn't even get this exception...
|
||||
failed = True
|
||||
raise
|
||||
except Exception:
|
||||
failed = True
|
||||
# try to re-schedule the resize elsewhere:
|
||||
|
||||
Reference in New Issue
Block a user