Bug 1351477

Summary: Missing property for Origin KVM
Product: [oVirt] ovirt-engine Reporter: Richard W.M. Jones <rjones>
Component: BLL.VirtAssignee: jniederm
Status: CLOSED CURRENTRELEASE QA Contact: Nisim Simsolo <nsimsolo>
Severity: low Docs Contact:
Priority: medium    
Version: 4.0.0CC: bugs, gklein, juzhou, lsurette, michal.skrivanek, mxie, nsimsolo, rbalakri, Rhev-m-bugs, srevivo, tjelinek, tzheng, ykaul
Target Milestone: ovirt-4.0.2Flags: rule-engine: ovirt-4.0.z+
rule-engine: planning_ack+
tjelinek: devel_ack+
mavital: testing_ack+
Target Release: 4.0.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-22 12:32:07 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:
Bug Depends On:    
Bug Blocks: 910269, 1342398    

Description Richard W.M. Jones 2016-06-30 07:27:59 UTC
Description of problem:

In backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/OriginType.java:

public enum OriginType {
    RHEV(0),
    VMWARE(1),
    XEN(2),
    OVIRT(3),
    // VMs that externally run on the host (not created by the engine)
    EXTERNAL(4),
    // VMs that were created by the hosted engine setup
    HOSTED_ENGINE(5),
    // managed means we allow limited provisioning on this VM by the engine
    MANAGED_HOSTED_ENGINE(6),
    KVM(7),
    PHYSICAL_MACHINE(8),
    HYPERV(9);

But in frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/Enums.properties:

OriginType___EXTERNAL=External
OriginType___HOSTED_ENGINE=Hosted Engine
OriginType___OVIRT=oVirt
OriginType___RHEV=RHEV
OriginType___VMWARE=VMware
OriginType___XEN=Xen
OriginType___PHYSICAL_MACHINE=Physical Machine
OriginType___HYPERV=Hyper-V

The property for KVM (7) is missing from the second list.  As a result
a VM which is imported shows up as "N/A".  See the comment and screenshot
starting here:

https://bugzilla.redhat.com/show_bug.cgi?id=1342398#c18

Version-Release number of selected component (if applicable):

I am checking the ovirt-engine source from the latest git release.
I don't know what version of RHEV is being used in bug 1342398.

How reproducible:

100% probably.

Steps to Reproduce:
1. Import a VM using virt-v2v, from a QEMU/KVM source.

Actual Results:

Origin shows "N/A" instead of "KVM".

Comment 1 Red Hat Bugzilla Rules Engine 2016-07-01 06:19:31 UTC
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.

Comment 2 jniederm 2016-07-08 16:52:21 UTC
I tried that on current 4.1 master (commit 6eb1ce7) on Storage (main tab), selected some export domain, 'VM Import' subtab (according to screenshot https://bugzilla.redhat.com/attachment.cgi?id=1174325).

Rendered string "N/A" corresponds to `null` returned by VM.getOrigin(), OriginType.KVM is rendered as "KVM" (when no explicit translation provided) since the translator uses Enum.name() method as a fallback. (https://github.com/oVirt/ovirt-engine/blob/7480b9d087d09e9c9cfd9835c0c0af621ed875e4/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/EnumTranslator.java#L49).

Attached patch http://gerrit.ovirt.org/60415 adds explicit translations nevertheless it doesn't solve problem of showing "N/A" instead of "KVM". If the problem persists, please file new bug with version and logs.

Comment 3 Richard W.M. Jones 2016-07-11 15:53:08 UTC
Understood.  The patch in gerrit looks fine.  I don't have
permissions to +1 it.

Comment 4 Nisim Simsolo 2016-08-21 14:36:12 UTC
Verified. ovirt-engine-4.0.2.7-0.1.el7ev