Comment 0 for bug 2002932

Revision history for this message
zhen (zhen001) wrote :

image-volume opened too many times when image being importing which is unnecessary.

```
# glance_store/_drivers/cinder.py #Store.add()

    def add(self, image_id, image_file, image_size, hashing_algo, context=None,
            verifier=None):
...
```

During the import image process, the 'image_size' passed to the add () method is always 0. According to the current logic, when the mirror is relatively large, the mirror volume will be mounted frequently because of the dynamic expansion of the mirror volume (for example, 70g images need to be mounted / unmounted 69 times)

I think when calling the add () method, you can get the actual size of 'stage_image'' in advance and pass it as' image_size''.