Fix: Interrupted copy-image leaking data on subsequent operation
If copying existing image in other stores fails while staging the data to
staging directory due to power, network or any other reason. Then
subsequent try may lead to data leaks in stores.
To fix this, added check of the actual image size with the size
of image file present in the staging area. If it does not match
then delete the image file from staging area so that the entire
image will be staged again.
Change-Id: I44bfefb6eee421e18e5e95a0dafaef0ea4e170da
Closes-Bug: #1885003
(cherry picked from commit 22d8f1fcbf4325d79ac18adfe87198c785f1df52)
Reviewed: https:/ /review. opendev. org/739403 /git.openstack. org/cgit/ openstack/ glance/ commit/ ?id=72510f9ce90 970e75a95492c76 47fd63ac2636dc
Committed: https:/
Submitter: Zuul
Branch: stable/ussuri
commit 72510f9ce90970e 75a95492c7647fd 63ac2636dc
Author: Abhishek Kekane <email address hidden>
Date: Wed Jun 24 19:44:54 2020 +0000
Fix: Interrupted copy-image leaking data on subsequent operation
If copying existing image in other stores fails while staging the data to
staging directory due to power, network or any other reason. Then
subsequent try may lead to data leaks in stores.
To fix this, added check of the actual image size with the size
of image file present in the staging area. If it does not match
then delete the image file from staging area so that the entire
image will be staged again.
Change-Id: I44bfefb6eee421 e18e5e95a0dafae f0ea4e170da 79ac18adfe87198 c785f1df52)
Closes-Bug: #1885003
(cherry picked from commit 22d8f1fcbf4325d