Bug 894233
| Summary: | Virt-manager on RHEL7 cannot detect SCSI storage correctly | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Geyang Kong <gkong> | ||||
| Component: | virt-manager | Assignee: | Martin Kletzander <mkletzan> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 7.0 | CC: | acathrow, cwei, dallan, lcui, mjenner, mkletzan, mzhan, tzheng | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | virt-manager-0.10.0-1.el7 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | |||||||
| : | 902143 (view as bug list) | Environment: | |||||
| Last Closed: | 2014-06-13 10:48:33 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 902143 | ||||||
| Attachments: |
|
||||||
|
Description
Geyang Kong
2013-01-11 06:11:37 UTC
Could you try reproducing that on both 6.4 and 7.0 with these additions: 1. check which 'host' is selected when creating the pool 2. do 'ls /sys/bus/scsi/devices/' 3. after creating the pool, wait few seconds before checking if the pool has appeared in the list Thanks (In reply to comment #2) > Could you try reproducing that on both 6.4 and 7.0 with these additions: > 1. check which 'host' is selected when creating the pool > 2. do 'ls /sys/bus/scsi/devices/' > 3. after creating the pool, wait few seconds before checking if the pool > has appeared in the list > > Thanks Hi,Martin The issue also exists on rhel6,refer to bug 902143. Tried on rhel6 tree and rhel7,the same result. version on rhel7: virt-manager-0.9.4-4.el7.noarch libvirt-1.0.2-1.el7.x86_64 Now,after creating scsi pool,the pool can be showed immediately from GUI,but can not use the pool,the pool is 0.00MB Free/0.00 MB In use,which is mentioned in Actual results 2. Reproduce refer to your steps(I think since the pool can appear in the list,would these steps help to you?just paste here) 1.When creating the pool,choose host0. 2.#ls /sys/bus/scsi/devices/ 0:0:0:0 1:0:0:0 2:0:0:0 host0 host1 host2 host3 host4 host5 target0:0:0 target1:0:0 target2:0:0 (In reply to comment #3) The pool size is being dealt with in libvirt. Specifying the same 'host0' doesn't necessarily mean there are the same devices (the host id allocation can change) IIUC. You'd have to check the target in the 'host0', '/sys/bus/scsi/devices/0:0:0:0' in this case. What do you expect to be the storage size and allocation? (In reply to comment #4) > (In reply to comment #3) > The pool size is being dealt with in libvirt. Specifying the same 'host0' > doesn't necessarily mean there are the same devices (the host id allocation > can change) IIUC. You'd have to check the target in the 'host0', > '/sys/bus/scsi/devices/0:0:0:0' in this case. What do you expect to be the > storage size and allocation? On rhel6u4-SNAP1, after creating a SCSI pool, it shows 0.00 MB Free/465.76 GB In Use, and there is a volume in the pool. Then if I want to install a guest, I can use that volume(You can check the screen shot). But on RHEL7, there is nothing in the pool so cannot use it. On el7, I got following output in /sys/bus/scsi/devices: [root@dhcp-66-71-159 devices]# ls host0 firmware_node power scsi_host subsystem target0:0:0 target0:0:1 uevent [root@dhcp-66-71-159 devices]# ls 0:0:0:0 0:0:1:0 host0 host1 host2 host3 target0:0:0 target0:0:1 [root@dhcp-66-71-159 devices]# ls 0\:0\:0\:0/ block firmware_node model scsi_disk uevent bsg generic power scsi_generic unload_heads delete iocounterbits queue_depth scsi_level vendor device_blocked iodone_cnt queue_type state dh_state ioerr_cnt rescan subsystem driver iorequest_cnt rev timeout evt_media_change modalias scsi_device type On el6, output is below: [root@dhcp-66-71-159 devices]# ls 0:0:0:0 0:0:1:0 host0 host1 host2 host3 target0:0:0 target0:0:1 [root@dhcp-66-71-159 devices]# ls host0 power scsi_host subsystem target0:0:0 target0:0:1 uevent [root@dhcp-66-71-159 devices]# ls 0\:0\:0\:0/ block evt_media_change modalias rev subsystem bsg generic model scsi_device timeout delete iocounterbits power scsi_disk type device_blocked iodone_cnt queue_depth scsi_generic uevent dh_state ioerr_cnt queue_type scsi_level unload_heads driver iorequest_cnt rescan state vendor Created attachment 698068 [details]
Screenshot on RHEL6u4
Sorry for long replies on this BZ. Can you confirm this bug also without virt-manager (using virsh pool-dumpxml for example), so we can track where the issue comes from? Thanks. Looks it is still there without virt-manager, I tried this with:
libvirt-1.0.3-1.el7.x86_64
Steps:
1. Create an XML file like following
<pool type="scsi">
<name>S5</name>
<uuid>e9392370-2917-565e-692b-d057f46512db</uuid>
<source>
<adapter name="host5"/>
</source>
<target>
<path>/dev/disk/by-path</path>
<permissions>
<mode>0700</mode>
<owner>0</owner>
<group>0</group>
</permissions>
</target>
</pool>
2. virsh pool-define $xml
3. virsh pool-dumpxml S5
<pool type='scsi'>
<name>S5</name>
<uuid>e9392370-2917-565e-692b-d057f46512db</uuid>
<capacity unit='bytes'>0</capacity>
<allocation unit='bytes'>0</allocation>
<available unit='bytes'>0</available>
<source>
<adapter name='host5'/>
</source>
<target>
<path>/dev/disk/by-path</path>
<permissions>
<mode>0700</mode>
<owner>0</owner>
<group>0</group>
</permissions>
</target>
</pool>
Additional info:
My host has 6 scsi adapters, from 0 to 5. I tried this with all of them, got same result.
Looks like I've missed the answer. Moving to libvirt as the cause is not likely in virt-manager. Please check that this is not the same cause as bug 902143. If yes, close this as NOTABUG or DUPLICATE (whatever's appropriate). Thanks. No, I don't think they are same one, on RHEL7, I can get following output after running lsscsi: [root@localhost devices]# lsscsi [0:0:0:0] disk ATA ST3500413AS JC65 /dev/sda [0:0:1:0] cd/dvd PLDS DVD-RW DH16ABSH YL32 /dev/sr0 Got following output after running ll /sys/bus/scsi/devices lrwxrwxrwx. 1 root root 0 Jun 13 10:33 0:0:0:0 -> ../../../devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0 lrwxrwxrwx. 1 root root 0 Jun 13 10:33 0:0:1:0 -> ../../../devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:1/0:0:1:0 lrwxrwxrwx. 1 root root 0 Jun 13 10:33 host0 -> ../../../devices/pci0000:00/0000:00:1f.2/ata1/host0 lrwxrwxrwx. 1 root root 0 Jun 13 10:33 host1 -> ../../../devices/pci0000:00/0000:00:1f.2/ata2/host1 lrwxrwxrwx. 1 root root 0 Jun 13 10:33 host2 -> ../../../devices/pci0000:00/0000:00:1f.5/ata3/host2 lrwxrwxrwx. 1 root root 0 Jun 13 10:33 host3 -> ../../../devices/pci0000:00/0000:00:1f.5/ata4/host3 lrwxrwxrwx. 1 root root 0 Jun 13 10:33 target0:0:0 -> ../../../devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0 lrwxrwxrwx. 1 root root 0 Jun 13 10:33 target0:0:1 -> ../../../devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:1 Looks my hard disk and CD-ROM are all mapped to host0, this is quite different from rhel6.4, you can check comment 5 in bug 902143. I just noticed the difference. Moving back to virt-manager as the real problem is that the pool is not started after creation. Workaround: Start the pool after creation, everything should work properly after that. CAn I ask you to take the latest virt-manager and attach a debug log from the reproduction, please? Even though I know where the problem is, it still works for me correctly. Thanks a lot. (In reply to Martin Kletzander from comment #14) > CAn I ask you to take the latest virt-manager and attach a debug log from > the reproduction, please? Even though I know where the problem is, it still > works for me correctly. Thanks a lot. As gkong has left redhat,I am providing the info,any further info needed pls contact me. Tried with : virt-manager-0.10.0-1.el7.noarch libvirt-1.1.0-1.el7.x86_64 # lsscsi [0:0:0:0] disk ATA WDC WD2502ABYS-1 02.0 /dev/sda # virt-manager --debug 2013-07-11 10:23:00,973 (host:763): Launching 'Add Pool' wizard 2013-07-11 10:23:00,993 (createpool:93): Showing new pool wizard 2013-07-11 10:23:07,314 (asyncjob:190): Creating async job for function cb=<bound method vmmCreatePool._async_pool_create of <vmmCreatePool object at 0x2562d70 (virtManager+createpool+vmmCreatePool at 0x7fa424015ce0)>> 2013-07-11 10:23:07,389 (createpool:464): Starting backround pool creation. 2013-07-11 10:23:07,390 (Storage:457): Creating storage pool 'scsi' with xml: <pool type='scsi'> <name>scsi</name> <uuid>1bf027ad-da2f-9745-9fb7-62ded14a9e5a</uuid> <source> <adapter name="host0"/> </source> <target> <path>/dev/disk/by-path</path> </target> </pool> 2013-07-11 10:23:09,081 (engine:287): Tick is slow, not running at requested rate. 2013-07-11 10:23:13,812 (createpool:467): Pool creation succeeded 2013-07-11 10:23:13,869 (createpool:99): Closing new pool wizard 2013-07-11 10:23:27,244 (host:311): Closing host details: <vmmConnection object at 0x201b960 (virtManager+connection+vmmConnection at 0x1695d80)> After that,the scsi pool started after creation,but the capacity is still 0. # virsh pool-list Name State Autostart ----------------------------------------- boot-scratch active yes default active yes scsi active yes # virsh pool-dumpxml scsi <pool type='scsi'> <name>scsi</name> <uuid>1bf027ad-da2f-9745-9fb7-62ded14a9e5a</uuid> <capacity unit='bytes'>0</capacity> <allocation unit='bytes'>0</allocation> <available unit='bytes'>0</available> <source> <adapter type='scsi_host' name='host0'/> </source> <target> <path>/dev/disk/by-path</path> <permissions> <mode>0755</mode> <owner>-1</owner> <group>-1</group> </permissions> </target> </pool> That won't work as it is your primary disk what's connected to host0 adapter. To reproduce the bug, you can use a simple usb stick (flash drive), which should provide you with a "scsi" storage (even though unusable). (In reply to Martin Kletzander from comment #16) > That won't work as it is your primary disk what's connected to host0 > adapter. To reproduce the bug, you can use a simple usb stick (flash > drive), which should provide you with a "scsi" storage (even though > unusable). So would you mean that in comment 15,if I use host0 which contains the primary disk to create a scsi pool,capacity 0 is the expected result? I've a usb plugged on my machine,tried again: # lsscsi [0:0:0:0] disk ATA WDC WD5000AAKS-7 05.0 /dev/sda [1:0:0:0] cd/dvd PLDS DVD+-RW DH-16AAS JD12 /dev/sr0 [6:0:0:0] disk Kingston DataTraveler 160 PMAP /dev/sdb # virt-manager --debug 2013-07-15 01:18:48,709 (host:763): Launching 'Add Pool' wizard 2013-07-15 01:18:48,726 (createpool:93): Showing new pool wizard 2013-07-15 01:18:56,769 (asyncjob:190): Creating async job for function cb=<bound method vmmCreatePool._async_pool_create of <vmmCreatePool object at 0x293d230 (virtManager+createpool+vmmCreatePool at 0x7faaf8011680)>> 2013-07-15 01:18:56,880 (createpool:464): Starting backround pool creation. 2013-07-15 01:18:56,881 (Storage:457): Creating storage pool 'scsi' with xml: <pool type='scsi'> <name>scsi</name> <uuid>86f91c9e-2d13-784d-b28c-0031c97a38f7</uuid> <source> <adapter name="host6"/> </source> <target> <path>/dev/disk/by-path</path> </target> </pool> 2013-07-15 01:18:56,961 (createpool:467): Pool creation succeeded 2013-07-15 01:18:56,981 (createpool:99): Closing new pool wizard After add scsi pool using host6,then the capacity and allocation is not 0,see the below info. # virsh pool-list Name State Autostart ----------------------------------------- default active yes scsi active yes # virsh pool-dumpxml scsi <pool type='scsi'> <name>scsi</name> <uuid>86f91c9e-2d13-784d-b28c-0031c97a38f7</uuid> <capacity unit='bytes'>16022241280</capacity> <allocation unit='bytes'>16022241280</allocation> <available unit='bytes'>0</available> <source> <adapter type='scsi_host' name='host6'/> </source> <target> <path>/dev/disk/by-path</path> <permissions> <mode>0755</mode> <owner>-1</owner> <group>-1</group> </permissions> </target> </pool> Yes, this is expected. This verifies the bug for me, but as I said, it worked all the time, either gkong had some weird machine it was runnning on or there was one version wasn't autostarting the pools, but that's long ago. (In reply to Martin Kletzander from comment #18) > Yes, this is expected. This verifies the bug for me, but as I said, it > worked all the time, either gkong had some weird machine it was runnning on > or there was one version wasn't autostarting the pools, but that's long ago. I tried several other machines,scsi pool can be created and autostarted successfully,and the capacity is showed right,so refer to comment 17,move the bug to VERIFIED. This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |