Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1558614

Summary: OVA import does not set CPU topology correctly.
Product: [oVirt] ovirt-engine Reporter: Nisim Simsolo <nsimsolo>
Component: BLL.VirtAssignee: Shmuel Melamud <smelamud>
Status: CLOSED CURRENTRELEASE QA Contact: Liran Rotenberg <lrotenbe>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.2.2CC: ahadas, bugs, derez, lrotenbe, michal.skrivanek, nsimsolo
Target Milestone: ovirt-4.2.4Flags: rule-engine: ovirt-4.2+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.2.4 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-26 08:37:39 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:
Description Flags
vdsm.log
none
engine.log
none
ovirt-export-ova-ansible log
none
ovirt-export-ova-validate-ansible log
none
ovirt-query-ova-ansible log
none
ovirt-import-ova-ansible log none

Description Nisim Simsolo 2018-03-20 15:46:58 UTC
Description of problem:
When importing RHV OVA file with 4 virtual CPUs, 2 virtual sockets and 2 threads per core (2:1:2), the imported VM CPU topology is 4 virtual CPUs 4 virtual sockets, 1 core per virtual socket and 1 threads per core (4:1:1).

In the exported OVA file, the parameters are correct:
<rasd:Caption>4 virtual cpu</rasd:Caption>
<rasd:Description>Number of virtual CPU</rasd:Description><rasd:InstanceId>1</rasd:InstanceId>
<rasd:ResourceType>3</rasd:ResourceType><rasd:num_of_sockets>2</rasd:num_of_sockets><rasd:cpu_per_socket>1</rasd:cpu_per_socket><rasd:threads_per_cpu>2</rasd:threads_per_cpu><rasd:max_num_of_vcpus>32</rasd:max_num_of_vcpus>

Version-Release number of selected component (if applicable):
rhvm-4.2.2.4-0.1.el7
vdsm-4.20.22-1.el7ev.x86_64
libvirt-client-3.9.0-14.el7.x86_64
qemu-kvm-rhev-2.10.0-19.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Export VM as OVA with CPU topology of 2:1:2
2. Import this VM
3. Observe CPU topology

Actual results:
Imported VM CPU topology is 4:1:1 instead of 2:1:2

Expected results:
CPU topology should be 2:1:2

Additional info:
ovirt-query-ova-ansible.log, ovirt-import-ova-ansibl.log, vdsm.log and engine.log (import started at 2018-03-20 17:02:57,416+02) attached

Comment 1 Nisim Simsolo 2018-03-20 16:41:50 UTC
Created attachment 1410617 [details]
vdsm.log

Comment 2 Nisim Simsolo 2018-03-20 16:42:30 UTC
Created attachment 1410620 [details]
engine.log

Comment 3 Nisim Simsolo 2018-03-20 16:43:12 UTC
Created attachment 1410632 [details]
ovirt-export-ova-ansible log

Comment 4 Nisim Simsolo 2018-03-20 16:43:37 UTC
Created attachment 1410633 [details]
ovirt-export-ova-validate-ansible log

Comment 5 Nisim Simsolo 2018-03-20 16:44:10 UTC
Created attachment 1410634 [details]
ovirt-query-ova-ansible log

Comment 6 Nisim Simsolo 2018-03-20 16:44:53 UTC
Created attachment 1410635 [details]
ovirt-import-ova-ansible log

Comment 7 Michal Skrivanek 2018-03-21 08:59:04 UTC
OvfReader::readCpuItem() 

vmBase.setCpuPerSocket(Integer.parseInt(selectSingleNode(node, "rasd:cpu_per_socket", _xmlNS).innerText));

vs

vmBase.setThreadsPerCpu(parseNodeInteger(node, "rasd:threads_per_cpu", 1))

?

Comment 8 Liran Rotenberg 2018-06-13 06:57:05 UTC
Verified on:
ovirt-engine-4.2.4.2-0.1.el7_3.noarch
vdsm-4.20.30-1.el7ev.x86_64

Steps of verfication:
1. Export VM as OVA with CPU topology of 2:1:2
2. Import this VM
3. Observe CPU topology

Actual results:
Imported VM CPU topology is 2:1:2 as expected.

Comment 9 Sandro Bonazzola 2018-06-26 08:37:39 UTC
This bugzilla is included in oVirt 4.2.4 release, published on June 26th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.4 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.