Bug 1660489

Summary: Fact imports erroneously cause audits to be created
Product: Red Hat Satellite Reporter: Lukas Zapletal <lzap>
Component: Audit LogAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Roman Plevka <rplevka>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4CC: andrew.schofield, egolov, fadamo, inecas, mmccune, pmoravec
Target Milestone: 6.5.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-1.20.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-14 12:39:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lukas Zapletal 2018-12-18 12:58:15 UTC
For very fact import an audit record is written although nothing changes.

#&lt;Audited::Audit id: 8238963, auditable_id: 30056, auditable_type: "Nic::Managed", user_id: 4, user_type: nil, username: "API Admin", action: "update", audited_changes: {"attrs"=&gt;[{"mtu"=>"1500", "netmask"=>"255.255.224.0", "netmask6"=>"ffff:ffff:ffff:ffff::", "network"=>"172.22.0.0", "network6"=>"fe80::"}, {"mtu"=>1500, "netmask"=>"255.255.224.0", "netmask6"=>"ffff:ffff:ffff:ffff::", "network"=>"172.22.0.0", "network6"=>"fe80::"}]}, version: 7, comment: nil, associated_id: 23973, associated_type: "Host::Base", request_uuid: "7263349c-f216-415a-8721-f7464856031e", created_at: "2018-10-29 10:08:25", remote_address: "1.2.3.4", auditable_name: "xxxxx...", associated_name: "xxxx...">

This creates unnecessary load on Satellite 6.4+. Please z-stream.

Comment 3 Lukas Zapletal 2018-12-18 12:59:25 UTC
This is oneliner, please cherry pick. Small change, big performance impact.

https://github.com/theforeman/foreman/pull/6198

Comment 4 Roman Plevka 2019-03-21 10:11:44 UTC
VERIFIED
6.5.0 snap #20
despite multiple PUT requests to the /facts endpoint, these no longer produce audit records

Comment 6 errata-xmlrpc 2019-05-14 12:39:36 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.

https://access.redhat.com/errata/RHSA-2019:1222