Bug 1351477 - Missing property for Origin KVM
Summary: Missing property for Origin KVM
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.0.0
Hardware: Unspecified
OS: Unspecified
medium
low vote
Target Milestone: ovirt-4.0.2
: 4.0.2
Assignee: jniederm
QA Contact: Nisim Simsolo
URL:
Whiteboard:
Depends On:
Blocks: TRACKER-bugs-affecting-libguestfs 1342398
TreeView+ depends on / blocked
 
Reported: 2016-06-30 07:27 UTC by Richard W.M. Jones
Modified: 2016-08-22 12:32 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-22 12:32:07 UTC
oVirt Team: Virt
rule-engine: ovirt-4.0.z+
rule-engine: planning_ack+
tjelinek: devel_ack+
mavital: testing_ack+


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 60415 master MERGED webadmin: Translations of OriginType enum added 2016-07-11 11:55:24 UTC
oVirt gerrit 60488 ovirt-engine-4.0 MERGED webadmin: Translations of OriginType enum added 2016-07-11 13:10:51 UTC

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


Note You need to log in before you can comment on or make changes to this bug.