commit 09e678ee142ea297640e44ce9af630402871c38a
Author: Matt Riedemann <email address hidden>
Date: Wed May 30 12:07:53 2018 -0400
Use instance project/user when creating RequestSpec during resize reschedule
When rescheduling from a failed cold migrate / resize, the compute
service does not pass the request spec back to conductor so we
create one based on the in-scope variables.
This introduces a problem for some scheduler filters like the
AggregateMultiTenancyIsolation filter since it will create the
RequestSpec using the project and user information from the current
context, which for a cold migrate is the admin and might not be
the owner of the instance (which could be in some other project).
So the AggregateMultiTenancyIsolation filter might reject the
request or select a host that fits an aggregate for the admin but
not the end user.
This fixes the problem by using the instance project/user information
when constructing the RequestSpec which will take priority over
the context in RequestSpec.from_components().
Long-term we need the compute service to pass the request spec back
to the conductor during a reschedule, but we do this first since we
can backport it.
NOTE(mriedem): RequestSpec.user_id was added in Rocky in commit
6e49019fae80586c4bbb8a7281600cf6140c176a so we have to remove its
usage in this backport.
NOTE(mriedem): Some existing tests in test_conductor.py had to
be updated to set a project_id on the fake instance since change
I34b1d99a9d0d2aca80f094a79ec1656abaf762dc is not in Ocata.
Change-Id: Iaaf7f68d6874fd5d6e737e7d2bc589ea4a048fee
Closes-Bug: #1774205
(cherry picked from commit 8c216608194c89d281e8d2b66abd1e50e2405b01)
(cherry picked from commit 1162902280d06eb6201738ef54ff8300f974b374)
(cherry picked from commit ce7ad878093e5730b8dcec5ca717b831db8965eb)
Reviewed: https:/ /review. openstack. org/577929 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=09e678ee142 ea297640e44ce9a f630402871c38a
Committed: https:/
Submitter: Zuul
Branch: stable/ocata
commit 09e678ee142ea29 7640e44ce9af630 402871c38a
Author: Matt Riedemann <email address hidden>
Date: Wed May 30 12:07:53 2018 -0400
Use instance project/user when creating RequestSpec during resize reschedule
When rescheduling from a failed cold migrate / resize, the compute
service does not pass the request spec back to conductor so we
create one based on the in-scope variables.
This introduces a problem for some scheduler filters like the ltiTenancyIsola tion filter since it will create the enancyIsolation filter might reject the
AggregateMu
RequestSpec using the project and user information from the current
context, which for a cold migrate is the admin and might not be
the owner of the instance (which could be in some other project).
So the AggregateMultiT
request or select a host that fits an aggregate for the admin but
not the end user.
This fixes the problem by using the instance project/user information from_components ().
when constructing the RequestSpec which will take priority over
the context in RequestSpec.
Long-term we need the compute service to pass the request spec back
to the conductor during a reschedule, but we do this first since we
can backport it.
NOTE(mriedem): RequestSpec.user_id was added in Rocky in commit 0586c4bbb8a7281 600cf6140c176a so we have to remove its
6e49019fae8
usage in this backport.
NOTE(mriedem): Some existing tests in test_conductor.py had to 0d2aca80f094a79 ec1656abaf762dc is not in Ocata.
be updated to set a project_id on the fake instance since change
I34b1d99a9d
Change-Id: Iaaf7f68d6874fd 5d6e737e7d2bc58 9ea4a048fee 281e8d2b66abd1e 50e2405b01) 6201738ef54ff83 00f974b374) 0b8dcec5ca717b8 31db8965eb)
Closes-Bug: #1774205
(cherry picked from commit 8c216608194c89d
(cherry picked from commit 1162902280d06eb
(cherry picked from commit ce7ad878093e573