From 13eee3d1d7b40bc334d663b7cea7c65a8f960dfe Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Wed, 20 Feb 2013 10:20:03 -0500 Subject: Allow exit code 21 for 'iscsiadm -m session'. Updates the libvirt volume driver so that it properly handles exit code 21 in the active session check. This fixes issues in running the command on Fedora 17. This behaviour was broken in 933365a (multipath libvirt iscsi). Fixes LP Bug #1130718. Change-Id: I80de4c09ba857d550734f9bd0dfc0c40bfd5036a --- nova/virt/libvirt/volume.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/virt/libvirt/volume.py b/nova/virt/libvirt/volume.py index 8fefeb41f..a5bd2dd43 100644 --- a/nova/virt/libvirt/volume.py +++ b/nova/virt/libvirt/volume.py @@ -327,7 +327,7 @@ class LibvirtISCSIVolumeDriver(LibvirtBaseVolumeDriver): #so we scan active sessions to see if the node is logged in. out = self._run_iscsiadm_bare(["-m", "session"], run_as_root=True, - check_exit_code=[0, 1])[0] or "" + check_exit_code=[0, 1, 21])[0] or "" portals = [{'portal': p.split(" ")[2], 'iqn': p.split(" ")[3]} for p in out.splitlines() if p.startswith("tcp:")] -- cgit