]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Add the iscsi device check and exception processing.
authorVincent Hou <sbhou@cn.ibm.com>
Thu, 6 Jun 2013 08:46:52 +0000 (16:46 +0800)
committerVincent Hou <sbhou@cn.ibm.com>
Sun, 9 Jun 2013 08:15:21 +0000 (16:15 +0800)
commitaa7fde57a37ae8e03f137e7b525cc77109cc31c1
tree457bd54d7e33cb73e2a7948928670c99774d0473
parentb820205c73c17df3e1bd91f400ba68779b3fd8bb
Add the iscsi device check and exception processing.

Before downloading the image and executing the command "qemu-img convert",
check if the iSCSI device is still available via the command "sudo dd
if=<device> of=/dev/null count=1". This command will raise an exception with
the message "Input/output error", if the back-end storage is disconnected to
the cinder-volume node, so we use it to test the availability of the storage
device. If it is unavailable, there is no need to download the image &
"qemu-img convert" and an exception DeviceUnavailable will be raised.

Fixed Bug1169290.

Change-Id: I133b4cc1bac493df073d42e240092cf2e6300454
cinder/exception.py
cinder/volume/driver.py
cinder/volume/manager.py