The CachingScheduler doesn't create allocations in
placement so when prep_resize fails and it tries
to revert allocations, the _revert_allocation() method
returns False and then prep_resize calls
delete_allocation_for_failed_resize() which since change
I7891b98f225f97ad47f189afb9110ef31c810717 has taken a
context argument, but that's not being passed so it
results in a TypeError.
This fixes the TypeError and adds a functional test case
which runs a resize reschedule scenario with the
CachingScheduler.
Reviewed: https:/ /review. openstack. org/581548 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=78af1de1587 fb83e09d1c0639f b5a28eb6e51a27
Committed: https:/
Submitter: Zuul
Branch: master
commit 78af1de1587fb83 e09d1c0639fb5a2 8eb6e51a27
Author: Matt Riedemann <email address hidden>
Date: Tue Jul 10 22:11:05 2018 -0400
Fix TypeError in prep_resize allocation cleanup
The CachingScheduler doesn't create allocations in allocation( ) method allocation_ for_failed_ resize( ) which since change 5f97ad47f189afb 9110ef31c810717 has taken a
placement so when prep_resize fails and it tries
to revert allocations, the _revert_
returns False and then prep_resize calls
delete_
I7891b98f22
context argument, but that's not being passed so it
results in a TypeError.
This fixes the TypeError and adds a functional test case duler.
which runs a resize reschedule scenario with the
CachingSche
Change-Id: I0ec0c2d3f7ef8d 2274b97a28a175d 53921edc9db
Closes-Bug: #1781100