If we firstly map a LUN whose host LUN ID is not 0 to host, we can also find LUN 0 in host, but its device path is "-".
root@ubuntu28:~# lsscsi
[1:0:0:0] cd/dvd NECVMWar VMware IDE CDR10 1.00 /dev/sr0
[2:0:0:0] disk VMware Virtual disk 1.0 /dev/sda
[11:0:0:0] disk HUASY S5500T 2105 -
[11:0:0:1] disk HUASY S5500T 2105 /dev/sdb
Then if we map another LUN whose host LUN ID is 0, the host will failed to find volume.
2013-02-28 12:37:47 DEBUG nova.utils [req-43e733de-2f04-4fa4-b972-30606c1a52f4 d4f4bc0acff84395802825c936941c63 82cfc838dcea43fdb7bbef54706e7246] Running cmd (subprocess): sudo nova-rootwrap /etc/nova/rootwrap.conf iscsiadm -m node -T iqn.2006-08.com.huaweisymantec:oceanspace:2100303037303037::1020001:111.111.111.33 -p 111.111.111.33:3260 --login from (pid=1878) execute /usr/lib/python2.7/dist-packages/nova/utils.py:176
2013-02-28 12:37:47 DEBUG nova.utils [req-43e733de-2f04-4fa4-b972-30606c1a52f4 d4f4bc0acff84395802825c936941c63 82cfc838dcea43fdb7bbef54706e7246] Result was 0 from (pid=1878) execute /usr/lib/python2.7/dist-packages/nova/utils.py:191
2013-02-28 12:37:47 DEBUG nova.virt.libvirt.volume [req-43e733de-2f04-4fa4-b972-30606c1a52f4 d4f4bc0acff84395802825c936941c63 82cfc838dcea43fdb7bbef54706e7246] iscsiadm ('--login',): stdout= stderr= from (pid=1878) _run_iscsiadm /usr/lib/python2.7/dist-packages/nova/virt/libvirt/volume.py:117
2013-02-28 12:37:47 DEBUG nova.utils [req-43e733de-2f04-4fa4-b972-30606c1a52f4 d4f4bc0acff84395802825c936941c63 82cfc838dcea43fdb7bbef54706e7246] Running cmd (subprocess): sudo nova-rootwrap /etc/nova/rootwrap.conf iscsiadm -m node -T iqn.2006-08.com.huaweisymantec:oceanspace:2100303037303037::1020001:111.111.111.33 -p 111.111.111.33:3260 --op update -n node.startup -v automatic from (pid=1878) execute /usr/lib/python2.7/dist-packages/nova/utils.py:176
2013-02-28 12:37:47 DEBUG nova.utils [req-43e733de-2f04-4fa4-b972-30606c1a52f4 d4f4bc0acff84395802825c936941c63 82cfc838dcea43fdb7bbef54706e7246] Result was 0 from (pid=1878) execute /usr/lib/python2.7/dist-packages/nova/utils.py:191
2013-02-28 12:37:47 DEBUG nova.virt.libvirt.volume [req-43e733de-2f04-4fa4-b972-30606c1a52f4 d4f4bc0acff84395802825c936941c63 82cfc838dcea43fdb7bbef54706e7246] iscsiadm ('--op', 'update', '-n', 'node.startup', '-v', 'automatic'): stdout= stderr= from (pid=1878) _run_iscsiadm /usr/lib/python2.7/dist-packages/nova/virt/libvirt/volume.py:117
2013-02-28 12:37:47 WARNING nova.virt.libvirt.volume [req-43e733de-2f04-4fa4-b972-30606c1a52f4 d4f4bc0acff84395802825c936941c63 82cfc838dcea43fdb7bbef54706e7246] ISCSI volume not yet found at: vdetc. Will rescan & retry. Try number: 0
2013-02-28 12:37:47 DEBUG nova.utils [req-43e733de-2f04-4fa4-b972-30606c1a52f4 d4f4bc0acff84395802825c936941c63 82cfc838dcea43fdb7bbef54706e7246] Running cmd (subprocess): sudo nova-rootwrap /etc/nova/rootwrap.conf iscsiadm -m node -T iqn.2006-08.com.huaweisymantec:oceanspace:2100303037303037::1020001:111.111.111.33 -p 111.111.111.33:3260 --rescan from (pid=1878) execute /usr/lib/python2.7/dist-packages/nova/utils.py:176
2013-02-28 12:37:48 DEBUG nova.utils [req-43e733de-2f04-4fa4-b972-30606c1a52f4 d4f4bc0acff84395802825c936941c63 82cfc838dcea43fdb7bbef54706e7246] Result was 0 from (pid=1878) execute /usr/lib/python2.7/dist-packages/nova/utils.py:191
2013-02-28 12:37:48 DEBUG nova.virt.libvirt.volume [req-43e733de-2f04-4fa4-b972-30606c1a52f4 d4f4bc0acff84395802825c936941c63 82cfc838dcea43fdb7bbef54706e7246] iscsiadm ('--rescan',): stdout=Rescanning session [sid: 9, target: iqn.2006-08.com.huaweisymantec:oceanspace:2100303037303037::1020001:111.111.111.33, portal: 111.111.111.33,3260]
stderr= from (pid=1878) _run_iscsiadm /usr/lib/python2.7/dist-packages/nova/virt/libvirt/volume.py:117
2013-02-28 12:37:49 WARNING nova.virt.libvirt.volume [req-43e733de-2f04-4fa4-b972-30606c1a52f4 d4f4bc0acff84395802825c936941c63 82cfc838dcea43fdb7bbef54706e7246] ISCSI volume not yet found at: vdetc. Will rescan & retry. Try number: 1
2013-02-28 12:37:49 DEBUG nova.utils [req-43e733de-2f04-4fa4-b972-30606c1a52f4 d4f4bc0acff84395802825c936941c63 82cfc838dcea43fdb7bbef54706e7246] Running cmd (subprocess): sudo nova-rootwrap /etc/nova/rootwrap.conf iscsiadm -m node -T iqn.2006-08.com.huaweisymantec:oceanspace:2100303037303037::1020001:111.111.111.33 -p 111.111.111.33:3260 --rescan from (pid=1878) execute /usr/lib/python2.7/dist-packages/nova/utils.py:176
2013-02-28 12:37:49 DEBUG nova.utils [req-43e733de-2f04-4fa4-b972-30606c1a52f4 d4f4bc0acff84395802825c936941c63 82cfc838dcea43fdb7bbef54706e7246] Result was 0 from (pid=1878) execute /usr/lib/python2.7/dist-packages/nova/utils.py:191
2013-02-28 12:37:49 DEBUG nova.virt.libvirt.volume [req-43e733de-2f04-4fa4-b972-30606c1a52f4 d4f4bc0acff84395802825c936941c63 82cfc838dcea43fdb7bbef54706e7246] iscsiadm ('--rescan',): stdout=Rescanning session [sid: 9, target: iqn.2006-08.com.huaweisymantec:oceanspace:2100303037303037::1020001:111.111.111.33, portal: 111.111.111.33,3260]
stderr= from (pid=1878) _run_iscsiadm /usr/lib/python2.7/dist-packages/nova/virt/libvirt/volume.py:117
2013-02-28 12:37:53 WARNING nova.virt.libvirt.volume [req-43e733de-2f04-4fa4-b972-30606c1a52f4 d4f4bc0acff84395802825c936941c63 82cfc838dcea43fdb7bbef54706e7246] ISCSI volume not yet found at: vdetc. Will rescan & retry. Try number: 2
2013-02-28 12:37:53 DEBUG nova.utils [req-43e733de-2f04-4fa4-b972-30606c1a52f4 d4f4bc0acff84395802825c936941c63 82cfc838dcea43fdb7bbef54706e7246] Running cmd (subprocess): sudo nova-rootwrap /etc/nova/rootwrap.conf iscsiadm -m node -T iqn.2006-08.com.huaweisymantec:oceanspace:2100303037303037::1020001:111.111.111.33 -p 111.111.111.33:3260 --rescan from (pid=1878) execute /usr/lib/python2.7/dist-packages/nova/utils.py:176
Fix proposed to branch: master /review. openstack. org/23338
Review: https:/