nova migrate instance failed due to availability zone
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
In Progress
|
Undecided
|
Henry |
Bug Description
Reproduce steps:
1.Create an instance with an invalid availability_zone but the right hostname;
nova boot --availability_zone invalid_
2.Migrate the instance
nova --debug migrate instance_uuid
This qeustion has been discussed in https:/
I'll begin by stating the problems again:
We create an instance with ”--availability
In compute/api.py, it would not check whether specified an invalid AZ value, it focuses on the force-host and VM can be created successfully.
The problem is when migrating or resizeing VM nova-schedule would report no valid host like this:
DEBUG (session:640) POST call to compute for http://
DEBUG (shell:959) No valid host was found. No valid host found for cold migrate (HTTP 400) (Request-ID: req-c1a7f1d6-
Traceback (most recent call last):
File "/usr/local/
OpenStackCo
File "/usr/local/
args.
File "/usr/local/
server.
File "/usr/local/
return self.manager.
File "/usr/local/
return self._action(
File "/usr/local/
info=info, **kwargs)
File "/usr/local/
return self.api.
File "/usr/local/
return self.request(url, 'POST', **kwargs)
File "/usr/local/
raise exceptions.
BadRequest: No valid host was found. No valid host found for cold migrate (HTTP 400) (Request-ID: req-c1a7f1d6-
ERROR (BadRequest): No valid host was found. No valid host found for cold migrate (HTTP 400) (Request-ID: req-c1a7f1d6-
The root cause scheduler use the availability_zone which was from instance property by createing,
actually, it would be different from OS-EXT-
So,the way to make it more appropriate:
Providing availability_zone where the instance is actually in for scheduler to migrate.
Changed in nova: | |
assignee: | nobody → Henry (guanzy) |
Set the status to 'In Progress' because this report has an assignee.