Change a log level for overwriting allocation
Change a log level for overwriting allocation
to debug instead of warning
because the log message is output in the normal case
of reverting resize.
Change-Id: I4f2ee3f420b4c78385eeb56c7e8c343af894e75c
Closes-Bug: #1822917
(cherry picked from commit d955ce42cc
)
This commit is contained in:
parent
353985210b
commit
2bbd7f4a0c
|
@ -1877,10 +1877,10 @@ class SchedulerReportClient(object):
|
||||||
'they were already moved to consumer %s',
|
'they were already moved to consumer %s',
|
||||||
source_consumer_uuid, target_consumer_uuid)
|
source_consumer_uuid, target_consumer_uuid)
|
||||||
return True
|
return True
|
||||||
LOG.warning('Overwriting current allocation %(allocation)s on '
|
LOG.debug('Overwriting current allocation %(allocation)s on '
|
||||||
'consumer %(consumer)s',
|
'consumer %(consumer)s',
|
||||||
{'allocation': target_alloc,
|
{'allocation': target_alloc,
|
||||||
'consumer': target_consumer_uuid})
|
'consumer': target_consumer_uuid})
|
||||||
|
|
||||||
new_allocs = {
|
new_allocs = {
|
||||||
source_consumer_uuid: {
|
source_consumer_uuid: {
|
||||||
|
|
|
@ -28,6 +28,7 @@ from nova import objects
|
||||||
from nova.scheduler.client import report
|
from nova.scheduler.client import report
|
||||||
from nova.scheduler import utils as scheduler_utils
|
from nova.scheduler import utils as scheduler_utils
|
||||||
from nova import test
|
from nova import test
|
||||||
|
from nova.tests import fixtures as nova_fixtures
|
||||||
from nova.tests.unit import fake_requests
|
from nova.tests.unit import fake_requests
|
||||||
|
|
||||||
|
|
||||||
|
@ -1652,8 +1653,11 @@ class TestMoveAllocations(SchedulerReportClientTestCase):
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resp = self.client.move_allocations(
|
with fixtures.EnvironmentVariable('OS_DEBUG', '1'):
|
||||||
self.context, self.source_consumer_uuid, self.target_consumer_uuid)
|
with nova_fixtures.StandardLogging() as stdlog:
|
||||||
|
resp = self.client.move_allocations(
|
||||||
|
self.context, self.source_consumer_uuid,
|
||||||
|
self.target_consumer_uuid)
|
||||||
|
|
||||||
self.assertTrue(resp)
|
self.assertTrue(resp)
|
||||||
self.mock_post.assert_called_once_with(
|
self.mock_post.assert_called_once_with(
|
||||||
|
@ -1661,7 +1665,7 @@ class TestMoveAllocations(SchedulerReportClientTestCase):
|
||||||
version=self.expected_microversion,
|
version=self.expected_microversion,
|
||||||
global_request_id=self.context.global_id)
|
global_request_id=self.context.global_id)
|
||||||
self.assertIn('Overwriting current allocation',
|
self.assertIn('Overwriting current allocation',
|
||||||
self.stdlog.logger.output)
|
stdlog.logger.output)
|
||||||
|
|
||||||
@mock.patch('time.sleep')
|
@mock.patch('time.sleep')
|
||||||
def test_409_concurrent_provider_update(self, mock_sleep):
|
def test_409_concurrent_provider_update(self, mock_sleep):
|
||||||
|
|
Loading…
Reference in New Issue