Merge "Fix up some feedback on image precache support"
This commit is contained in:
commit
578b6ea58c
@ -1660,7 +1660,7 @@ class ComputeTaskManager(base.Base):
|
||||
hosts_by_cell[hmap.cell_mapping.uuid].append(hostname)
|
||||
|
||||
LOG.info('Preparing to request pre-caching of image(s) %(image_ids)s '
|
||||
'on %(hosts)i hosts across %(cells)s cells.',
|
||||
'on %(hosts)i hosts across %(cells)i cells.',
|
||||
{'image_ids': ','.join(image_ids),
|
||||
'hosts': len(aggregate.hosts),
|
||||
'cells': len(hosts_by_cell)})
|
||||
@ -1688,6 +1688,8 @@ class ComputeTaskManager(base.Base):
|
||||
fetch_pool.waitall()
|
||||
|
||||
clock.stop()
|
||||
# FIXME(danms): Calculate some interesting statistics about the image
|
||||
# download process to log for the admin.
|
||||
LOG.info('Image pre-cache operation for image(s) %(image_ids)s '
|
||||
'completed in %(time).2f seconds',
|
||||
{'image_ids': ','.join(image_ids),
|
||||
|
@ -23561,7 +23561,10 @@ class LibvirtDriverTestCase(test.NoDBTestCase, TraitsComparisonMixin):
|
||||
else:
|
||||
mock_et.assert_not_called()
|
||||
|
||||
def test_cache_image_existing_first_time(self):
|
||||
def test_cache_image_uncached_first_time(self):
|
||||
# Test the case where we do need to download the image,
|
||||
# and this is the first time an image cache operation has ever
|
||||
# been performed, so the directory structure has to be created.
|
||||
self.test_cache_image_uncached(first_time=True)
|
||||
|
||||
@mock.patch('oslo_utils.fileutils.ensure_tree')
|
||||
|
Loading…
Reference in New Issue
Block a user