Bug 1353604 - endAction() is wrongly executed for commands with callback that fails on validate() on the next engine restart.
Summary: endAction() is wrongly executed for commands with callback that fails on vali...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Infra
Version: 4.0.2
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.0.2
: 4.0.2
Assignee: Liron Aravot
QA Contact: Raz Tamir
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-07 14:33 UTC by Liron Aravot
Modified: 2016-08-12 14:26 UTC (History)
8 users (show)

Fixed In Version:
Clone Of: 1352825
Environment:
Last Closed: 2016-08-12 14:26:58 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.0.z+
rule-engine: blocker+
rule-engine: planning_ack+
rule-engine: devel_ack+
acanan: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 60345 0 master MERGED core: CommandsCallbackPoller - EXECUTION_FAILED handling 2016-07-12 09:19:43 UTC
oVirt gerrit 60574 0 ovirt-engine-4.0 MERGED core: CommandsCallbackPoller - EXECUTION_FAILED handling 2016-07-13 08:45:14 UTC

Description Liron Aravot 2016-07-07 14:33:38 UTC
+++ This bug was initially created as a clone of Bug #1352825 +++

Description of problem:
Although the validation of add-vm fails the command remains in command_entities. After engine restart, the callback is executed and fails to end the add-vm command. Since we don't set retry to false, it will fail periodically, as shown by the audit logs in the log file.

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


How reproducible:


Steps to Reproduce:
1. Create VM such that the validation will fail
2. 
3.

Actual results:
The command remains in FAILED state in command_entities
If the end-action of add-vm (that closes the disk operations) fails, an audit log will be periodically produced.

Expected results:
No periodic audit log should be produced and no callback should be executed

Additional info:

--- Additional comment from Israel Pinto on 2016-07-05 04:45 EDT ---



--- Additional comment from Israel Pinto on 2016-07-05 04:46 EDT ---



--- Additional comment from Israel Pinto on 2016-07-05 04:47 EDT ---



--- Additional comment from Allon Mureinik on 2016-07-05 12:41:08 EDT ---

Not sure if this is Storage's or Infra's, but definitely needs solving.

Liron - can you take a look please?

--- Additional comment from Liron Aravot on 2016-07-07 10:31:01 EDT ---

Arik/Israel - we have few issues here:
1. endAction() failure.
2. orphaned CommandEntity record for commands with callbacks when validate() fails till the next engine restart.
3. endAction() is executed

the endAction() failure shouldn't happen and i couldn't reproduce it, Israel - can you check the exact scenario again and see if it reproduces? please also run the engine under DEBUG logging level and open a separate bug for that issue with the logs.

In this bug I'll handle #2 and clone this bug to a new bug for #3.

Comment 1 Red Hat Bugzilla Rules Engine 2016-07-07 14:33:49 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 Red Hat Bugzilla Rules Engine 2016-07-08 09:10: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 3 Red Hat Bugzilla Rules Engine 2016-07-08 09:11:21 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 4 Raz Tamir 2016-07-26 15:25:42 UTC
Verified on ovirt-engine-4.0.2-0.1.rc.el7ev.noarch
Followed the steps:
1. Create VM based on template fails on validation
2. Delete the template
3. Restart the engine

That was provided by Liron in bug #1352825


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