Needn't verify the deleted image

Change-Id: Iae361343c0f8e833d948f13129f47563ed8441da
This commit is contained in:
Feng Shengqin 2018-07-28 13:07:20 +08:00
parent 5b4777df19
commit 1ad1bfeaad
1 changed files with 6 additions and 7 deletions

View File

@ -174,10 +174,9 @@ class GlanceDriver(driver.ContainerImageDriver):
tag = image.split(':')[1]
image = self._search_image_on_host(context, repo, tag)
if image:
if self._verify_md5sum_for_image(image):
tarfile = image.get('path')
try:
os.unlink(tarfile)
except Exception as e:
LOG.exception('Cannot delete tar file %s', tarfile)
raise exception.ZunException(six.text_type(e))
tarfile = image.get('path')
try:
os.unlink(tarfile)
except Exception as e:
LOG.exception('Cannot delete tar file %s', tarfile)
raise exception.ZunException(six.text_type(e))