Bug 969012 - prevent to create materialized view on non slowly-changing data objects
Summary: prevent to create materialized view on non slowly-changing data objects
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.3.0
Assignee: Eli Mesika
QA Contact: Pavel Stehlik
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-30 13:19 UTC by Pavel Stehlik
Modified: 2016-02-10 19:21 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-05-30 19:08:02 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Pavel Stehlik 2013-05-30 13:19:08 UTC
Description of problem:
 Currently user can create custom materialized view (MTV) also on non slowly data changing objects (e.g. vm_device_view). This causes the AddVmCommand invokes the ActivateDeactivateVmCommand which fetch the VmDevice from the DB, but as the materialized view haven't refreshed yet, it doesn't contain that entry.

Possible solutions:
1) prevent user from creating MTV on fast changing data object (creating black/white list in DB) - preferred

2) list wrong/allowed objects on MTVwiki page


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

How reproducible:
100%

Steps to Reproduce:
1. psql -U engine -d engine
2. SELECT CreateMaterializedViewAs('vm_device_view',50);
3. restart engine
4. create new VM with NIC (or add NIC to any VM)


Actual results:
Error while executing action:
MYNEWVM:
    Cannot add Interface. The VM Network Interface does not exist.


Expected results:
 Add new NIC to VM


Additional info:
be log:
===========
 2013-05-30 15:13:59,780 INFO  [org.ovirt.engine.core.bll.network.vm.AddVmInterfaceCommand] (http-/0.0.0.0:8443-16) [4f0c20db] Running command: AddVmInterfaceCommand internal: false. Entities affected :  ID: 5addd4aa-9827-4612-af3f-d1a16d5df8e9 Type: VM,  ID: 00000000-0000-0000-0000-000000000009 Type: Network
2013-05-30 15:13:59,801 WARN  [org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand] (http-/0.0.0.0:8443-16) [4f0c20db] CanDoAction of action ActivateDeactivateVmNic failed. Reasons:VAR__ACTION__ACTIVATE,VAR__TYPE__INTERFACE,VM_INTERFACE_NOT_EXIST
2013-05-30 15:13:59,803 INFO  [org.ovirt.engine.core.bll.network.vm.AddVmInterfaceCommand] (http-/0.0.0.0:8443-16) [4f0c20db] Command [id=353000ce-aa81-4ea3-a98d-139b01e2aa6e]: Compensating NEW_ENTITY_ID of org.ovirt.engine.core.common.businessentities.VmDevice; snapshot: deviceId = 4ccc5d58-0886-46a0-b689-d726350cdceb, vmId = 5addd4aa-9827-4612-af3f-d1a16d5df8e9.
2013-05-30 15:13:59,804 INFO  [org.ovirt.engine.core.bll.network.vm.AddVmInterfaceCommand] (http-/0.0.0.0:8443-16) [4f0c20db] Command [id=353000ce-aa81-4ea3-a98d-139b01e2aa6e]: Compensating NEW_ENTITY_ID of org.ovirt.engine.core.common.businessentities.network.VmNetworkStatistics; snapshot: 4ccc5d58-0886-46a0-b689-d726350cdceb.
2013-05-30 15:13:59,805 INFO  [org.ovirt.engine.core.bll.network.vm.AddVmInterfaceCommand] (http-/0.0.0.0:8443-16) [4f0c20db] Command [id=353000ce-aa81-4ea3-a98d-139b01e2aa6e]: Compensating NEW_ENTITY_ID of org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface; snapshot: 4ccc5d58-0886-46a0-b689-d726350cdceb.
2013-05-30 15:13:59,807 WARN  [org.ovirt.engine.core.compat.backendcompat.PropertyInfo] (http-/0.0.0.0:8443-16) Unable to get value of property: glusterVolume for class org.ovirt.engine.core.bll.network.vm.AddVmInterfaceCommand
2013-05-30 15:13:59,808 WARN  [org.ovirt.engine.core.compat.backendcompat.PropertyInfo] (http-/0.0.0.0:8443-16) Unable to get value of property: vds for class org.ovirt.engine.core.bll.network.vm.AddVmInterfaceCommand

Comment 1 Eli Mesika 2013-05-30 13:33:58 UTC
Simon, please decide which solution is acceptable from the two mentioned in bug description.
Thanks

Comment 3 Simon Grinberg 2013-05-30 14:20:22 UTC
(In reply to Eli Mesika from comment #1)
> Simon, please decide which solution is acceptable from the two mentioned in
> bug description.
> Thanks

This seems to me pure technical issue and not a PM decision, unless I'm missing something.


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