From b4bd5b7ba350c1a07903fd7582e3ea648975045f Mon Sep 17 00:00:00 2001 From: Balazs Gibizer Date: Thu, 27 Sep 2018 13:55:40 +0200 Subject: [PATCH] Follow up for Ie991d4b53e9bb5e7ec26da99219178ab7695abf6 This fixes the nits found in original review. Change-Id: I3004b0e1138c76d178d65dec62461742aecd9ff0 Blueprint: use-nested-allocation-candidates --- nova/scheduler/client/report.py | 9 ++++----- nova/tests/functional/test_servers.py | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/nova/scheduler/client/report.py b/nova/scheduler/client/report.py index 06a270d00e7f..9a82a1c29b0d 100644 --- a/nova/scheduler/client/report.py +++ b/nova/scheduler/client/report.py @@ -1928,11 +1928,10 @@ class SchedulerReportClient(object): Note that this call moves the current allocation from the source consumer to the target consumer. If parallel update happens on either - or both consumers during this call then Placement will detect that and - this code will re-read the new state of the consumers and retry the - operation. If you want to move a known piece of allocation from source - to target then this function might not be what you want as it always - moves what source has in Placement. + consumer during this call then Placement will detect that and + this code will raise AllocationMoveFailed. If you want to move a known + piece of allocation from source to target then this function might not + be what you want as it always moves what source has in Placement. :param context: The security context :param source_consumer_uuid: the UUID of the consumer from which diff --git a/nova/tests/functional/test_servers.py b/nova/tests/functional/test_servers.py index fd055bd5d9b9..f1c3cf153e25 100644 --- a/nova/tests/functional/test_servers.py +++ b/nova/tests/functional/test_servers.py @@ -4521,7 +4521,7 @@ class ConsumerGenerationConflictTest( post = {'revertResize': None} self.api.post_server_action(server['id'], post) - server = self._wait_for_state_change(self.api, server, 'ERROR',) + server = self._wait_for_state_change(self.api, server, 'ERROR') self.assertEqual(1, mock_post.call_count)