Update instance node on rebuild only when it is recreate
When using ironic virt driver, if scheduled_node is not specified
in rebuild_instance compute manager method (as it happens in case
of instance rebuild), the first ironic node is selected:
After the first rebuild, instance.node is updated to be this first
ironic node, which causes subsequent rebuilds to fail, as virt driver
tries to set instance_uuid on a newly selected ironic node and fails.
Reviewed: https:/ /review. openstack. org/306010 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=54b122caec1 ae2418fc3e296be 604d072cb5815a
Committed: https:/
Submitter: Jenkins
Branch: master
commit 54b122caec1ae24 18fc3e296be604d 072cb5815a
Author: Vladyslav Drok <email address hidden>
Date: Thu Apr 14 21:15:10 2016 +0300
Update instance node on rebuild only when it is recreate
When using ironic virt driver, if scheduled_node is not specified
in rebuild_instance compute manager method (as it happens in case
of instance rebuild), the first ironic node is selected:
computes = ComputeNodeList .get_all_ by_host( context, host, use_slave)
return computes[0]
After the first rebuild, instance.node is updated to be this first
ironic node, which causes subsequent rebuilds to fail, as virt driver
tries to set instance_uuid on a newly selected ironic node and fails.
Closes-bug: #1564921 aa4120735d030ce d31081ef202
Change-Id: I2fe6e439135ba6