Bug 1431412 - Reduce number of transactions in commands that use NetworkClusterHelper.setStatus
Summary: Reduce number of transactions in commands that use NetworkClusterHelper.setSt...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Backend.Core
Version: 4.0.6.3
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.1.2
: 4.1.2
Assignee: Yevgeny Zaspitsky
QA Contact: Mor
URL:
Whiteboard:
Depends On:
Blocks: 1431228
TreeView+ depends on / blocked
 
Reported: 2017-03-12 11:04 UTC by Yevgeny Zaspitsky
Modified: 2017-05-23 08:11 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-05-23 08:11:48 UTC
oVirt Team: Network
Embargoed:
rule-engine: ovirt-4.1+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 73915 0 ovirt-engine-4.1 MERGED engine: make NetworkClusterHelper a CDI bean 2017-03-26 10:27:23 UTC
oVirt gerrit 73916 0 ovirt-engine-4.1 MERGED engine: extract HostNicsUtil out of GetVdsInterfacesByVdsIdQuery 2017-03-26 10:27:30 UTC
oVirt gerrit 73917 0 ovirt-engine-4.1 MERGED engine: use HostNicsUtil instead of GetVdsInterfacesByVdsId query 2017-03-26 10:25:42 UTC
oVirt gerrit 74358 0 ovirt-engine-4.1 MERGED engine: replace javax.ejb.Singleton with javax.inject.Singleton 2017-03-26 10:22:55 UTC
oVirt gerrit 74359 0 ovirt-engine-4.1 MERGED core: replace javax.ejb.Singleton with javax.inject.Singleton 2017-03-26 10:25:26 UTC

Description Yevgeny Zaspitsky 2017-03-12 11:04:46 UTC
Description of problem:
The following commands use runInernalQuery mechanism, which suspends the current transaction and opens another one, in order to load host nics (GetVdsInterfacesByVdsId query):
* ActivateVdsCommand
* AttachNetworkToClusterInternalCommand
* HostSetupNetworksCommand
* MaintenanceNumberOfVdssCommand
* UpdateNetworkCommand
* UpdateNetworkOnClusterCommand
* UpdateVdsCommand

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


How reproducible:
100%

Actual results:
1. The running command 
2. Redundant additional transaction is open
3. If the parent transaction flow updated host nics in DB, running the query in a separate transaction will return results that aren't include those updates.

Expected results:
The commands should use the current transaction fo loading host nics.

Additional info:

Comment 1 Mor 2017-04-30 12:12:45 UTC
Verified on:
Red Hat Virtualization Manager Version: 4.1.2-0.1.el7

In order to verify it, I done the following steps:
1. Adding additional core (2 in total) on the engine VM to improve engine CPU time.
2. Setting up environment with 30 hosts and 50 hosts networks with VLAN attached to each of the hosts.
3. Setting up Power Management agent on each of the 50 hosts.
4. Changing host comment.
5. Editing existing host network and changing IP address settings.
6. Removing and adding host networks from specific host.


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