Bug 1479693 - AuditLogDirector does not log messages if transactional command fails
Summary: AuditLogDirector does not log messages if transactional command fails
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.1.4
Hardware: Unspecified
OS: Unspecified
Target Milestone: ovirt-4.1.6
: ---
Assignee: Miroslava Voglova
QA Contact: Jiri Belka
Depends On: 1432127
Blocks: 1418641
TreeView+ depends on / blocked
Reported: 2017-08-09 08:14 UTC by Oved Ourfali
Modified: 2019-04-28 13:47 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1432127
Last Closed: 2017-09-19 07:18:50 UTC
oVirt Team: Infra
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:2749 0 normal SHIPPED_LIVE Red Hat Virtualization Manager (ovirt-engine) 4.1.6 2017-09-19 11:12:23 UTC
oVirt gerrit 77605 0 None None None 2017-08-09 08:14:15 UTC
oVirt gerrit 80958 0 ovirt-engine-4.1 MERGED core: start new transaction for AuditLogDirector 2017-08-23 13:45:29 UTC

Description Oved Ourfali 2017-08-09 08:14:15 UTC
+++ This bug was initially created as a clone of Bug #1432127 +++

Description of problem:
If some command fails (e.g. UpdateClusterCommand) than the transactions are rolled back. The AuditLogDirector is running in the same transaction so also the logs logged using audit log are rolled back.

Steps to Reproduce:
1. use any command which is not managing it's own transactions (e.g. does not have the @NonTransactiveCommandAttribute)
2. log something using AuditLogDirector
3. fail the command using setSucceeded(false);

Actual results:
all the transactions are rolled back removing also the audit log messages

Expected results:
the audit log is survives the command failure

--- Additional comment from Martin Perina on 2017-03-16 05:18:45 EDT ---

Reducing severity as this behaviour is present in the code at least since 3.5 (maybe from beginning)

--- Additional comment from Tomas Jelinek on 2017-08-09 04:05:01 EDT ---

Any chance to get this to some z-stream? It is really important for the cluster upgrade flows since this is the place we would like to report the reasons for failed update. Without this patch the users need to dig into logs to understand what happened.

--- Additional comment from Oved Ourfali on 2017-08-09 04:06:33 EDT ---

Makes sense to me.
I'll clone it.

--- Additional comment from Tomas Jelinek on 2017-08-09 04:09:30 EDT ---

Comment 1 Red Hat Bugzilla Rules Engine 2017-08-09 08:14:26 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 4 rhev-integ 2017-08-24 18:13:10 UTC
WARN: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[Found non-acked flags: '{'rhevm-4.1.z': '?'}', ]

For more info please contact: rhv-devops: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[Found non-acked flags: '{'rhevm-4.1.z': '?'}', ]

For more info please contact: rhv-devops

Comment 5 Jiri Belka 2017-09-04 16:40:14 UTC
ok, ovirt-engine-backend-

audit_log still works:

 2017-09-04 18:29:51.032+02 | User admin@internal-authz is connected to VM jbelka-ngntest1.
 2017-09-04 18:29:30.882+02 | User admin@internal-authz initiated console session for VM jbelka-ngntest1

Comment 7 errata-xmlrpc 2017-09-19 07:18:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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