Comment 1 for bug 1440201

Revision history for this message
Mitsuhiro Tanino (mitsuhiro-tanino) wrote :

Hi, Jay,

I confirmed this bug happened in my devstack environment using LVM/iSCSI driver.
From my investigation of this issue, this might be bug of Libvirt.

When Nova calls detach_volume() at step (3), Libvirt tries to remove the block device information from an instance's
xml file and then calls disconnect_volume() to logout an "iSCSI session".

In the disconnect_volume(), Nova checks all block device list from all VM's xml files at _get_all_block_devices(), and
if there are some block devices related to the "iSCSI session", Nova does not logout from the iSCSI session.

Normally, Libvirt removes the block device info from instance's xml quickly, but in this case I found the block device
info remained at the disconnect_volume(). I suppose reboot VM via Libvirt affects some bad impact to remove
block device info. So the "iSCSI session" logout was skipped. As a result, the iSCSI session remained.

After that, if user tries to attach a volume again, Cinder creates new user and password and passes these to Nova.
Nova tries to use these new user and password but the old iSCSI session still remains, this connection is failed
and you can see many error log of iscsid in the /var/log/messages.

I think this is not only affect LVM but also other iSCSI backend storages.