From a5c1049bde10b0e9f67e634a857f057e459239ac Mon Sep 17 00:00:00 2001 From: Eric Fried Date: Tue, 15 Jan 2019 19:17:56 +0000 Subject: [PATCH] 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 --- placement/handlers/reshaper.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/placement/handlers/reshaper.py b/placement/handlers/reshaper.py index 67d60e6ec..d5035cd75 100644 --- a/placement/handlers/reshaper.py +++ b/placement/handlers/reshaper.py @@ -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)