]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
SMBFS: Fix retrieving the volume path and format
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Tue, 17 Feb 2015 14:20:56 +0000 (16:20 +0200)
committerLucian Petrut <lpetrut@cloudbasesolutions.com>
Fri, 27 Feb 2015 11:27:34 +0000 (13:27 +0200)
commitc2b0f8680a2526cd890c55ebaaa1efc06b94dfef
tree248d24be02c8f80cd67b81231fef5f7a1d83792e
parentc375463a08c7b813d8f74ab640ce9a87b5407b60
SMBFS: Fix retrieving the volume path and format

The SMBFS drivers use the image format in order to construct the
according image path, as some image formats require having the
proper extension.

The format is either retrieved using qemu-img if the image exists,
either via extra specs or config options otherwise.

The issue is that when searching for local images, the extension is
not used, falling back to extra specs, which can cause lazy load
errors or config options, which might change.

This issue occurs when vhd/x images are used. The fix consists in
simply using the possible extensions when trying to find existing
images.

Change-Id: I85ef7862489eb434a00cd897f5344bb89b7de858
Closes-bug: #1425124
cinder/tests/test_smbfs.py
cinder/volume/drivers/smbfs.py