Bug 1393459 - Command execution context information is only partially persisted in the db
Summary: Command execution context information is only partially persisted in the db
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Infra
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.1.0-beta
: 4.1.0.2
Assignee: Ravi Nori
QA Contact: Jiri Belka
URL:
Whiteboard:
: 1408405 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-09 15:26 UTC by Liron Aravot
Modified: 2018-08-14 13:35 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-01 14:59:28 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.1+
mavital: testing_plan_complete?
mgoldboi: planning_ack+
mperina: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 67953 0 master MERGED engine : Command execution context information is only partially persisted in the db 2017-01-13 15:42:56 UTC
oVirt gerrit 70370 0 ovirt-engine-4.1 MERGED engine : Command execution context information is only partially persisted in the db 2017-01-13 18:44:57 UTC

Description Liron Aravot 2016-11-09 15:26:31 UTC
Description of problem:
When commands are managed by the command coordinator infrastructure, the command context is cached in memory.
On engine restart, the commands context is rebuilt according the the information
persisted in the db.

Currently only the command step id/job id are persisted in the db, leading to having context objects with different properties values after restart (for example - the execution method). That causes to unexpected results under the tasks sub tab for command coordinator managed command. 

Expected results:
The command context after the restart should have the same properties values as before the restart.

Comment 1 Martin Perina 2016-11-22 12:32:03 UTC
Moving out of 4.1 release as it is a bit dangerous to change async task code in a short time before 4.1 feature freeze and we have not yet received any important flow which depend on this functionality

Comment 2 Liron Aravot 2016-11-22 12:44:51 UTC
Steps to reproduce:
1. Add a disk
2. Restart the engine after the task is created,  before the endAction() is called.

Result:
The job will never end.

Martin, the fix shouldn't be in the async tasks code but in the context/command entity. IMO we need to this in for 4.1.

Comment 3 Martin Perina 2016-11-22 13:19:40 UTC
Sorry, I've changed different bug by mistake, this one should be fixed in 4.1

Comment 4 Liron Aravot 2017-01-08 15:41:57 UTC
*** Bug 1408405 has been marked as a duplicate of this bug. ***

Comment 5 Jiri Belka 2017-01-25 12:15:16 UTC
ok, ovirt-engine-4.1.0.2-0.2.el7.noarch

action fired with `tail -f /var/log/ovirt-engine/engine.log | ^Ck '/EVENT_ID: USER_ADD_DISK/ { print "XXXXX"; system("systemctl restart ovirt-engine") }''

2017-01-25 13:07:21,474+01 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-8) [379d0993] EVENT_ID: USER_ADD_DISK(2,020), Correlation ID: a4503ddd-7b34-4896-8d6e-9ec5dbe5b8f2, Job ID: 41fc2415-a9c9-4c15-ad7f-a4e4eaa151d7, Call Stack: null, Custom Event ID: -1, Message: Add-Disk operation of '___3' was initiated by admin@internal-authz.
2017-01-25 13:08:00,610+01 INFO  [org.ovirt.engine.core.dal.dbbroker.DbFacade] (ServerService Thread Pool -- 56) [] Initializing the DbFacade
2017-01-25 13:08:00,908+01 INFO  [org.ovirt.engine.core.extensions.mgr.ExtensionsManager] (ServerService Thread Pool -- 43) [] Initializing extension 'internal-authn'
2017-01-25 13:08:01,009+01 INFO  [org.ovirt.engine.core.extensions.mgr.ExtensionsManager] (ServerService Thread Pool -- 43) [] Initializing extension 'internal-authz'
2017-01-25 13:08:01,049+01 INFO  [org.ovirt.engine.core.extensions.mgr.ExtensionsManager] (ServerService Thread Pool -- 43) [] Initializing extension 'brq-ipa.rhev.lab.eng.brq.redhat.com-authn'
2017-01-25 13:08:01,802+01 INFO  [org.ovirt.engine.core.extensions.mgr.ExtensionsManager] (ServerService Thread Pool -- 43) [] Initializing extension 'brq-ipa.rhev.lab.eng.brq.redhat.com-authz'
2017-01-25 13:08:05,723+01 INFO  [org.ovirt.engine.core.extensions.mgr.ExtensionsManager] (ServerService Thread Pool -- 56) [] Initializing extension 'internal-authn'
2017-01-25 13:08:05,739+01 INFO  [org.ovirt.engine.core.extensions.mgr.ExtensionsManager] (ServerService Thread Pool -- 56) [] Initializing extension 'brq-ipa.rhev.lab.eng.brq.redhat.com-authn'
2017-01-25 13:08:06,821+01 INFO  [org.ovirt.engine.core.bll.scheduling.SchedulingManager] (ServerService Thread Pool -- 56) [a4503ddd-7b34-4896-8d6e-9ec5dbe5b8f2] Initializing Scheduling manager
2017-01-25 13:08:07,225+01 INFO  [org.ovirt.engine.core.bll.dwh.DwhHeartBeat] (ServerService Thread Pool -- 56) [a4503ddd-7b34-4896-8d6e-9ec5dbe5b8f2] Initializing DWH Heart Beat
2017-01-25 13:08:33,728+01 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (DefaultQuartzScheduler2) [] EVENT_ID: USER_ADD_DISK_FINISHED_SUCCESS(2,021), Correlation ID: a4503ddd-7b34-4896-8d6e-9ec5dbe5b8f2, Job ID: 41fc2415-a9c9-4c15-ad7f-a4e4eaa151d7, Call Stack: null, Custom Event ID: -1, Message: The disk '___3' was successfully added.


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