Merge "Follow up for Ie49d605c66062d2548241d7e04f5a2a6b98c011e"
This commit is contained in:
commit
63bc42f6b9
|
@ -1030,8 +1030,10 @@ class ComputeTaskManager(base.Base):
|
|||
if forbidden_traits:
|
||||
raise exception.NoValidHost(
|
||||
reason=_("Image traits are part of forbidden "
|
||||
"traits in flavor associated with the Image. "
|
||||
"Please relaunch the instance."))
|
||||
"traits in flavor associated with the server. "
|
||||
"Either specify a different image during rebuild "
|
||||
"or create a new server with the specified image "
|
||||
"and a compatible flavor."))
|
||||
return
|
||||
|
||||
# If image traits are present, then validate against allocations.
|
||||
|
@ -1061,7 +1063,8 @@ class ComputeTaskManager(base.Base):
|
|||
raise exception.NoValidHost(
|
||||
reason=_("Image traits cannot be "
|
||||
"satisfied by the current resource providers. "
|
||||
"Please relaunch the instance."))
|
||||
"Either specify a different image during rebuild "
|
||||
"or create a new server with the specified image."))
|
||||
|
||||
# TODO(avolkov): move method to bdm
|
||||
@staticmethod
|
||||
|
|
|
@ -3907,7 +3907,8 @@ class TraitsBasedSchedulingTest(integrated_helpers.ProviderUsageBaseTestCase):
|
|||
self.assertEqual('ERROR', server['status'])
|
||||
self.assertEqual("No valid host was found. Image traits cannot be "
|
||||
"satisfied by the current resource providers. "
|
||||
"Please relaunch the instance.",
|
||||
"Either specify a different image during rebuild "
|
||||
"or create a new server with the specified image.",
|
||||
server['fault']['message'])
|
||||
|
||||
def test_rebuild_instance_with_image_traits_no_image_change(self):
|
||||
|
@ -3954,7 +3955,7 @@ class TraitsBasedSchedulingTest(integrated_helpers.ProviderUsageBaseTestCase):
|
|||
self):
|
||||
"""Rebuilding a server with a different image which has required
|
||||
traits on the image fails to validate image traits because flavor
|
||||
associated with the current instance has the similar triat that is
|
||||
associated with the current instance has the similar trait that is
|
||||
forbidden
|
||||
"""
|
||||
# Decorate compute2 resource provider with traits on flavor
|
||||
|
@ -3992,7 +3993,9 @@ class TraitsBasedSchedulingTest(integrated_helpers.ProviderUsageBaseTestCase):
|
|||
self.assertEqual('ERROR', server['status'])
|
||||
self.assertEqual("No valid host was found. Image traits are part of "
|
||||
"forbidden traits in flavor associated with the "
|
||||
"Image. Please relaunch the instance.",
|
||||
"server. Either specify a different image during "
|
||||
"rebuild or create a new server with the specified "
|
||||
"image and a compatible flavor.",
|
||||
server['fault']['message'])
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue