Project

General

Profile

Actions

Bug #25331

closed

Fact imports erranously cause audits to be created

Added by Timo Goebel about 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
High
Category:
Audit Log
Target version:
-

Description

For very fact import an audit record is written although nothing changes.

#<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"=>[{"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...">

Files


Related issues 1 (1 open0 closed)

Related to Foreman - Feature #25364: Disable all auditing during high-load client-initiated API callsReady For TestingLukas ZapletalActions
Actions #1

Updated by Lukas Zapletal about 6 years ago

  • Status changed from New to Need more information
  • Priority changed from Normal to High

Timo, thanks. Is this per fact upload or per single change of a fact? The latter looks like important issue for performance.

Actions #2

Updated by Timo Goebel about 6 years ago

  • Status changed from Need more information to New

This is per fact upload as far as I traced it.

Actions #3

Updated by Timo Goebel about 6 years ago

I have slowed down the effect by sorting the hash in /usr/share/foreman/app/models/host/base.rb

-iface.attrs = attributes
+iface.attrs = attributes.sort.to_h

The diff in the example above is that mtu seems to toggle between integer and string.

Tomer proposed that we don't write any audits at all during fact import. While that might be a good approach we should also not update the interface unless something really changed.

Actions #4

Updated by The Foreman Bot about 6 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Lukas Zapletal
  • Pull request https://github.com/theforeman/foreman/pull/6178 added
Actions #5

Updated by The Foreman Bot about 6 years ago

  • Pull request https://github.com/theforeman/foreman/pull/6179 added
Actions #6

Updated by Lukas Zapletal about 6 years ago

  • Triaged changed from No to Yes
Actions #7

Updated by The Foreman Bot about 6 years ago

  • Pull request https://github.com/theforeman/foreman/pull/6182 added
Actions #8

Updated by Tomer Brisker about 6 years ago

  • Fixed in Releases 1.19.1, 1.20.0 added
Actions #9

Updated by Tomer Brisker about 6 years ago

  • Subject changed from for every fact import an audit record is written to Fact imports erranously cause audits to be created

clarifying title for the release note.

Actions #10

Updated by Lukas Zapletal about 6 years ago

  • Related to Feature #25364: Disable all auditing during high-load client-initiated API calls added
Actions #11

Updated by The Foreman Bot about 6 years ago

  • Pull request https://github.com/theforeman/foreman/pull/6198 added
Actions #12

Updated by Timo Goebel about 6 years ago

  • Status changed from Ready For Testing to Closed
Actions #13

Updated by Lukas Zapletal almost 6 years ago

  • Bugzilla link set to 1660489
Actions

Also available in: Atom PDF