Bug 1525569 - PostConstruct of Backend is recursively invoked
Summary: PostConstruct of Backend is recursively invoked
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Backend.Core
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.2.1
: ---
Assignee: Ravi Nori
QA Contact: Radim Hrazdil
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-13 15:22 UTC by Ravi Nori
Modified: 2018-02-12 11:54 UTC (History)
4 users (show)

Fixed In Version: ovirt-engine-4.2.1.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-12 11:54:40 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)
server.log (23.10 KB, text/plain)
2017-12-13 15:22 UTC, Ravi Nori
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 85364 0 master ABANDONED engine : PostConstruct of Backend is recursively invoked 2020-08-25 09:48:47 UTC
oVirt gerrit 85700 0 master MERGED core: Detach compensation on startup from CommandBase 2020-08-25 09:48:46 UTC

Description Ravi Nori 2017-12-13 15:22:40 UTC
Created attachment 1367437 [details]
server.log

Description of problem: On engine startup invoking compensate on unhandled commands during Backend postConstruct causes circular dependency on Backend. The problem arises when the command has Singleton injected whose postConstruct invokes methods on Backend.
    
An example is RunVmCommand that has HostDeviceManager injected. HostDeviceManager's postConstruct uses backend's runInternalMultipleActions causing a circular dependency.
    
Moving compensate after backend is initialized would avoid such issues.

How reproducible:


Steps to Reproduce:
1. Have multiple VMs
2. Toggle state of VM using python sdk
3. Shutdown engine while the python script is running
4. Start engine

Actual results:

The server log has javax.ejb.EJBException: java.lang.IllegalStateException: WFLYEJB0132: @PostConstruct method of EJB singleton Backend of type org.ovirt.engine.core.bll.Backend has been recursively invoked

Expected results:

No exception should be shown

Comment 1 Radim Hrazdil 2018-01-30 15:34:29 UTC
Verified by issuing the following:
1. Toggled several VMs to start using Python SDK 4.2.4
2. systemctl stop ovirt-engine.service on the engine
3. started engine
4. checked engine.log for exception in the description

The exception wasn't found in the engine.log.
RHV 4.2.1.3-0.1.el7
pythonsdk 4.2.4

Comment 2 Sandro Bonazzola 2018-02-12 11:54:40 UTC
This bugzilla is included in oVirt 4.2.1 release, published on Feb 12th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.1 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.


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