Comment 5 for bug 1112483

Revision history for this message
Brano Zarnovican (zarnovican) wrote :

There are several ways to fix/workaround the problem..

The solution I liked most is to delete the device when Openstack stops using it (see patch). At the time this code is called in disconnect_volume(), the LUN is still mapped to compute node, but not used by libvirt. Soon after that, nova-volume will unmap the LUN.

When some other volume will reuse the same LUN id, nova-compute will find the device missing and force rescan. This will create the device anew and do the usual kernel sensing..

Implementation side-note: I had a real struggle to implement "echo 1 > /sys/block/..". Eventually I got it working as "echo 1 | sudo cp /dev/stdin /sys/block/..". I guess there could be a better support in rootwrap for this kind of use-case.