image-volume opened too many times when image being importing which is unnecessary
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
New
|
Undecided
|
Unassigned |
Bug Description
image-volume opened too many times when image being importing which is unnecessary.
```
# glance_
def add(self, image_id, image_file, image_size, hashing_algo, context=None,
...
```
During the import image process, the 'image_size' passed to the add () method is always 0. According to the current logic, when the image is relatively large, the image-volume will be mounted/unmounted frequently because of the dynamic expansion of the mirror volume (for example, image with size 70G need to be mounted/unmounted 70/70 times)
I think when calling the add () method, we can get the actual size of 'stage_image'' in advance and pass it as' image_size''.
So you can confirm this because you see a lot of "Extending volume X to Y GB", right?
Could you send a patch implementing your idea?