The affinity and anti-affinity server group policy is enforced by the
scheduler but two parallel scheduling could cause that such policy is
violated. During instance boot a late policy check was performed in
the compute manager to prevent this. This check was missing in case
of rebuild. Therefore two parallel evacuate command could cause that
the server group policy is violated. This patch introduces the late
policy check to rebuild to prevent such situation. When the violation
is detected during boot a re-scheduling happens. However the rebuild
action does not have the re-scheduling implementation so in this case
the rebuild will fail and the evacuation needs to be retried by the
user. Still this is better than allowing a parallel evacuation to
break the server group affinity policy.
To make the late policy check possible in the compute/manager the
rebuild_instance compute RPC call was extended with a request_spec
parameter.
Co-Authored-By: Richard Zsarnoczai <email address hidden>
Reviewed: https:/ /review. openstack. org/525242 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=edeeaf9102e ccb78f1a2555c7e 18c3d706f07639
Committed: https:/
Submitter: Zuul
Branch: master
commit edeeaf9102eccb7 8f1a2555c7e18c3 d706f07639
Author: Balazs Gibizer <email address hidden>
Date: Mon Dec 4 16:18:30 2017 +0100
Add late server group policy check to rebuild
The affinity and anti-affinity server group policy is enforced by the
scheduler but two parallel scheduling could cause that such policy is
violated. During instance boot a late policy check was performed in
the compute manager to prevent this. This check was missing in case
of rebuild. Therefore two parallel evacuate command could cause that
the server group policy is violated. This patch introduces the late
policy check to rebuild to prevent such situation. When the violation
is detected during boot a re-scheduling happens. However the rebuild
action does not have the re-scheduling implementation so in this case
the rebuild will fail and the evacuation needs to be retried by the
user. Still this is better than allowing a parallel evacuation to
break the server group affinity policy.
To make the late policy check possible in the compute/manager the instance compute RPC call was extended with a request_spec
rebuild_
parameter.
Co-Authored-By: Richard Zsarnoczai <email address hidden>
Change-Id: I752617066bb216 7b49239ab9d17b0 c89754a3e12
Closes-Bug: #1735407