Bug 1412594
| Summary: | Listing VMs from KVM fails with error "java.lang.NumberFormatException" if one of the VM is having non-existent disk | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Virtualization Manager | Reporter: | nijin ashok <nashok> | ||||
| Component: | ovirt-engine | Assignee: | Nobody <nobody> | ||||
| Status: | CLOSED DUPLICATE | QA Contact: | meital avital <mavital> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 4.0.6 | CC: | gklein, lsurette, nashok, rbalakri, Rhev-m-bugs, srevivo, tgolembi, tjelinek, ykaul | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2017-01-18 08:14:28 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | Virt | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
Created attachment 1239862 [details]
log.tar.xz
@Tomas: is this duplicate of 1405058 No the issue is different. From the logs it seems the customer is trying to import KVM machine with block devices. This should be available in 4.1: https://bugzilla.redhat.com/show_bug.cgi?id=1378340 Nijin, can you verify that the VMs in question contain drives with block devices? Or can you provide us dump of libvirt XML? The logs which I have uploaded is from my test environment to replicate the customer's issue. It's not using block devices. Also customer is not using block devices for VM disks. Load VMs was failing with NumberFormatException if any of the VM contains a disk which is not accessible. I think this is similar to bug 1405058 which Tomas Jelinek have mentioned. I have applied https://gerrit.ovirt.org/#/c/69139/ in my test setup which fixed the issue. vdsm ignores the VM which is having inaccessible disk and this VM information is not passed to engine . I reviewed the logs again. It really is a duplicate of bug 1405058. Thank you! Marking as duplicate. *** This bug has been marked as a duplicate of bug 1405058 *** |
Description of problem: If any of the VMs in the source KVM host has disk entry which doesn't exist in the server, then GetVmsFromExternalProviderVDSCommand fails with error "java.lang.NumberFormatException". vdsm will show below error. jsonrpc.Executor/1::ERROR::2017-01-12 09:47:54,049::v2v::934::root::(_add_disk_info) Error getting disk size Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/vdsm/v2v.py", line 931, in _add_disk_info vol = conn.storageVolLookupByPath(disk['alias']) File "/usr/lib64/python2.7/site-packages/libvirt.py", line 4765, in storageVolLookupByPath if ret is None:raise libvirtError('virStorageVolLookupByPath() failed', conn=self) libvirtError: Storage volume not found: no storage vol with matching path The vdsm will be return the image information without "capacity" and "allocation" info as expected. Return 'Host.getExternalVMs' in bridge with [{'status': 'Down', 'graphics': 'vnc', 'arch': 'x86_64', 'disks': [{'alias': '/var/lib/libvirt/images/new_testing.img', 'type': 'disk', 'dev': 'vda', 'format': 'RAW'}, However this is not correctly handled in the engine side and we will get below error in the engine side. 2017-01-12 06:20:23,033 ERROR [org.ovirt.engine.core.bll.GetVmsFromExternalProviderQuery] (default task-3) [] Query 'GetVmsFromExternalProviderQuery' failed: EngineException: java.lang.NumberFormatException: null (Failed with error ENGINE and code 5001) 2017-01-12 06:20:23,033 ERROR [org.ovirt.engine.core.bll.GetVmsFromExternalProviderQuery] (default task-3) [] Exception: org.ovirt.engine.core.common.errors.EngineException: EngineException: java.lang.NumberFormatException: null (Failed with error ENGINE and code 5001) Version-Release number of selected component (if applicable): rhevm-4.0.6.3-0.1.el7ev.noarch ovirt-engine-4.0.6.3-0.1.el7ev.noarch How reproducible: 100% Steps to Reproduce: 1. In a KVM host, give a random disk image to one of the VM which is not in the server. 2. Listing KVM VMs from the RHEV-M fails with error "java.lang.NumberFormatException" Actual results: Listing KVM VMs from the RHEV-M fails with error "java.lang.NumberFormatException" if any of the VM contains non-existent disk . Expected results: It will not be possible to convert any of the KVM VMs if one of the VM is having non-existent disk. I think we should ignore this particular VM from showing in the RHEV-M portal and show other VMs by providing a meaningful warning message to user. Additional info: