Memory hog during image import from glance fixed
In case when unified image format is used it is possible to pass file like object to pylxd API to import image to LXD. In that case image not read to memory and nova-compute does not utilize abnormal amount of RAM. requirements.txt bumped pylxd to 2.2.5 as the change requires pylxd change "Image import - memory hog fix" (8588c3afb316299f204ae502b1c35dd7d7e3420e) Change-Id: I4d47ab4e40b62925c0b63e7ac740f35709df1e3d Closes-Bug: 1714415
This commit is contained in:
parent
cb136ab1e6
commit
3a6ea27da3
|
@ -27,7 +27,7 @@ pip-log.txt
|
|||
.coverage
|
||||
.tox
|
||||
nosetests.xml
|
||||
.testrepository
|
||||
.stestr
|
||||
.venv
|
||||
|
||||
# Translations
|
||||
|
|
|
@ -326,7 +326,7 @@ def _sync_glance_image_to_lxd(client, context, image_ref):
|
|||
'skipping metadata injection...',
|
||||
{'alias': image_ref})
|
||||
with open(image_file, 'rb') as image:
|
||||
image = client.images.create(image.read(), wait=True)
|
||||
image = client.images.create(image, wait=True)
|
||||
else:
|
||||
metadata = {
|
||||
'architecture': image.get(
|
||||
|
@ -347,7 +347,7 @@ def _sync_glance_image_to_lxd(client, context, image_ref):
|
|||
with open(manifest_file, 'rb') as manifest:
|
||||
with open(image_file, 'rb') as image:
|
||||
image = client.images.create(
|
||||
image.read(), metadata=manifest.read(),
|
||||
image, metadata=manifest,
|
||||
wait=True)
|
||||
|
||||
image.add_alias(image_ref, '')
|
||||
|
|
Loading…
Reference in New Issue