Hide Forgot
Description of problem: The only audit record that appears is of action: Add The test fails (at least) since 6.6.0-2 Version-Release number of selected component (if applicable): 6.6.0-2 Steps to Reproduce: 1. create a host 2. check audits 3. observe that the audit record for a host type has action "Added" and only 1 summary field Expected results: action type: "create", containing table of attributes and values
This is caused by https://projects.theforeman.org/issues/26123/, more specifically https://github.com/theforeman/foreman/commit/c8effc1749b59abb15b315776b461f188805b736#diff-38f66014c76f64cd58c0e31a42681dcbR124 does not longer detect Host as main type. The reason is that the class in audited table is Host::Base, which never is considered audited (unlike Host::Managed). I think the easiest option is just to add Host::Base class to this list (hardcoding this again, but we also include other classes dynamically). There may be more such classes. Kavita, could you please take a look? I'm happy to do the review.
Created redmine issue https://projects.theforeman.org/issues/27346 from this bug
(In reply to Marek Hulan from comment #4) Kavita, could you please take a look? I'm happy to do the review. Sure, I will look into this.
Upstream bug assigned to kgaikwad@redhat.com
VERIFIED on sat6.6.0-20.1 Affected Organizations: Default Organization Affected Locations: Default Location there are 2 records per Host Create event created, apparently, 1 is for foreman host and the other one for katello content host: Name: jess-steckel.foo.bar.com Root pass: 5$eqHxv60GBFrtjzsu$t8VzRVDbnYU3bpPGVsUJzCcjpaB2m0zWwB0wDt5Y1/8 Architecture: x86_64 Operatingsystem: RedHat 8.0 Environment: production Ptable: Kickstart default Build: true Hostgroup: hg1 Owner: N/A Owner type: User Enabled: true Managed: true Uuid: c60c9154-8664-42da-b6c1-9eba80b3cff5 Compute resource: lv (Libvirt) Organization: Default Organization Location: Default Location Provision method: build Grub pass: $5$eqHxv60GBFrtjzsu$t8VzRVDbnYU3bpPGVsUJzCcjpaB2m0zWwB0wDt5Y1/8 Pxe loader: PXELinux BIOS Content facet attributes: {"id"=>nil, "host_id"=>nil, "uuid"=>nil, "content_view_id"=>1, "lifecycle_environment_id"=>1, "kickstart_repository_id"=>1, "content_source_id"=>1, "installable_security_errata_count"=>0, "installable_enhancement_errata_count"=>0, "installable_bugfix_errata_count"=>0, "applicable_rpm_count"=>0, "upgradable_rpm_count"=>0, "applicable_module_stream_count"=>0, "upgradable_module_stream_count"=>0} Ansible role ids: [empty] Affected Organizations: Default Organization Affected Locations: Default Location Host: [empty] Content view: Default Organization View Lifecycle environment: Library Kickstart repository: [empty] Content source: sgi-uv300-02.khw2.foo.bar.com Installable security errata count: 0 Installable enhancement errata count: 0 Installable bugfix errata count: 0 Applicable rpm count: 0 Upgradable rpm count: 0 Applicable module stream count: 0 Upgradable module stream count: 0
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:3172