Add provider UUID to reshaper gen conflict error

To aid debuggability, the provider UUID was added to the error message
for the generation conflict exception in nova's incarnation of the
reshaper handler via [1]. This patch syncs the change to the placement
repository.

[1] https://review.openstack.org/#/c/615695/

Change-Id: I606e883983da65a2253be23ee1786d10ee53680c
This commit is contained in:
Eric Fried 2019-01-15 19:17:56 +00:00 committed by Eric Fried
parent 0e97f2b9b9
commit a5c1049bde
1 changed files with 3 additions and 2 deletions

View File

@ -66,9 +66,10 @@ def reshape(req):
generation = inventory_data['resource_provider_generation']
if generation != resource_provider.generation:
raise webob.exc.HTTPConflict(
_('resource provider generation conflict: '
_('resource provider generation conflict for provider %(rp)s: '
'actual: %(actual)s, given: %(given)s') %
{'actual': resource_provider.generation,
{'rp': rp_uuid,
'actual': resource_provider.generation,
'given': generation},
comment=errors.CONCURRENT_UPDATE)