Created attachment 621630 [details] engine log Description of problem: When attempting to start VM that has attached direct lun, NPE occurs Version-Release number of selected component (if applicable): rhevm-backend-3.1.0-18.el6ev.noarch How reproducible: Always Steps to Reproduce: 1. Attach direct lun to VM 2. Start VM Actual results: Expected results: Additional info: Backend log is attached, no relevant actions in vdsm Blocks direct lun tests
First two lines are storage domains, last one is direct lun [root@jl-rhevm31 ~]# psql engine -U postgres -c "select * from luns;" physical_volume_id | lun_id | volume_group_id | serial | lun_mapping | vendor_id | product_id | device_size ----------------------------------------+-----------------------------------+----------------------------------------+----------------------------------------------------------------+-------------+-----------+------------+------------- 7ZfIzV-iXHb-6giT-oFgU-OnkF-XSMZ-fH6T5K | 36006048c14e9eb8f668dfc53ea5995ca | vLdoVE-kEX8-u92X-v7eL-7H2t-W411-9HHSuV | SEMC_Celerra_EMC-Celerra-iSCSI-VLU-fs62_T5_LUN7_CKM00120100230 | 7 | EMC | Celerra | 250 9JQfWW-mHP0-geFO-OIlF-QxTy-joIJ-UFieQm | 36006048c0714062ba4b91f6a904bc07f | XjccnK-49dn-33V8-GAPT-kW1C-7ByJ-74X9mn | SEMC_Celerra_EMC-Celerra-iSCSI-VLU-fs75_T5_LUN4_CKM00120100230 | 4 | EMC | Celerra | 21 | 36006048c12952607a6254682d950135a | | | | | | 0
Created attachment 621632 [details] luns table Attaching psql output as a file so it's more readable
please copy start of stack trace for easier bugzilla searches: 2012-10-04 14:12:31,353 ERROR [org.ovirt.engine.core.bll.RunVmOnceCommand] (ajp-/127.0.0.1:8009-6) [3e6868cf] Command org.ovirt.engine.core.bll.RunVmOnceCommand throw exception: java.lang.NullPointerException at org.ovirt.engine.core.bll.RunVmCommandBase.connectLunDisks(RunVmCommandBase.java:354) [engine-bll.jar:] at org.ovirt.engine.core.bll.RunVmCommand.RunVm(RunVmCommand.java:221) [engine-bll.jar:] at org.ovirt.engine.core.bll.RunVmCommand.ExecuteVmCommand(RunVmCommand.java:276) [engine-bll.jar:] at org.ovirt.engine.core.bll.VmCommand.executeCommand(VmCommand.java:83) [engine-bll.jar:]
Created attachment 622951 [details] screenshot-vm with lun
doesn't reproduce on latest DS, tested with latest commit : 103b565425ceb516b52e8a10838497f6d539cf4f Jakub, apperantly there is something wrong with your tests to lun disks regarding the lun connections, there was a similar bug that wan't reproducable by you as well through GUI last week or so, dunno what's going with the jenkins test but it seems to work just fine. please confirm. i've attached in the previous comment a screenshot.
It doesn't reproduce using GUI. First item is LUN created by API, second by GUI: physical_volume_id | lun_id | volume_group_id | serial | lun_mapping | vendor_id | product_id | device_size ----------------------------------------+-----------------------------------+----------------------------------------+-----------------------------------------------------------------+-------------+-----------+------------+------------- | 36006048c12952607a6254682d950135a | | | | | | 0 aPJ9z2-Q7dz-KW6D-OrcG-69Us-omfE-lSKxRV | 36006048ce7ff8320bd02378f18cf9712 | | SEMC_Celerra_EMC-Celerra-iSCSI-VLU-fs78_T5_LUN18_CKM00120100230 | 18 | EMC | Celerra | 21 Disk was created using following body: <disk> <name>direct_lun</name> <size>42</size> <interface>virtio</interface> <format>cow</format> <lunStorage> <logical_unit id="36006048c12952607a6254682d950135a"> <address>10.34.63.200</address> <port>3260</port> <target>iqn.1992-05.com.emc:ckm001201002300000-5-vnxe</target> </logical_unit> </lunStorage> </disk> Now I'm not sure whether it's api's bug (don't pass parameters) or backend (allows creating LUN with insufficient parameters). CC'ing Michael.
note that the issue was that the sent xml lacked the <type> tag in which the lun type needs to by specified. a patch to return appropiate error in that case was sent: http://gerrit.ovirt.org/#/c/8437/
Ori, Please make sure <type> marked as mandatory in RSDL for disks.add()
Verified that VM can be started when <type> tag is in <lunStorage> element.
Merged I302b399fd93419fb1f621fd315b50d5971ae9c11
Verified on RHEVM 3.1 - SI21.1 RHEVM: rhevm-3.1.0-21.el6ev.noarch VDSM: vdsm-4.9.6-38.0.el6_3.x86_64 LIBVIRT: libvirt-0.9.10-21.el6_3.5.x86_64 QEMU & KVM: qemu-kvm-rhev-0.12.1.2-2.295.el6_3.2.x86_64 SANLOCK: sanlock-2.3-4.el6_3.x86_64