When the check to ensure a VM is running before attempting the
live migrate fails, it raises InstanceNotRunning. It should really be
treated in the same way as MigrationPreCheckError.
Along with fixing this bug, I have ensured the expected exceptions in
migrate_server are in sync with the except clause in _live_migrate.
This goes through to the API, ensuring the errors are not treated as
internal server errors, but are given a slightly more appropriate error
return value.
Currently the API returns 400 for all these kinds of errors. While other
error codes may be more appropriate, this change is concentrating purely
on ensuring we treat all the exceptions in the same way.
Reviewed: https:/ /review. openstack. org/90063 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=d0a5e272889 40c8e104330d784 fed43575187afd
Committed: https:/
Submitter: Jenkins
Branch: master
commit d0a5e27288940c8 e104330d784fed4 3575187afd
Author: John Garbutt <email address hidden>
Date: Thu Apr 24 12:44:26 2014 +0100
Ensure live-migrate reverts if server not running
When the check to ensure a VM is running before attempting the ckError.
live migrate fails, it raises InstanceNotRunning. It should really be
treated in the same way as MigrationPreChe
Along with fixing this bug, I have ensured the expected exceptions in
migrate_server are in sync with the except clause in _live_migrate.
This goes through to the API, ensuring the errors are not treated as
internal server errors, but are given a slightly more appropriate error
return value.
Currently the API returns 400 for all these kinds of errors. While other
error codes may be more appropriate, this change is concentrating purely
on ensuring we treat all the exceptions in the same way.
Change-Id: Iafe5026ef5a095 d76e9864b489571 e7bcfeb55f0
Closes-Bug: #1312132