Bug 1602747

Summary: audit search does not recognize subnet type anymore
Product: Red Hat Satellite Reporter: Roman Plevka <rplevka>
Component: Audit LogAssignee: Tomer Brisker <tbrisker>
Status: CLOSED ERRATA QA Contact: Roman Plevka <rplevka>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4CC: dlobatog, inecas, pcreech, tbrisker
Target Milestone: 6.4.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-1.18.0.7-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-16 19:12:47 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 Roman Plevka 2018-07-18 12:15:56 UTC
Description of problem:
this is a regression from sat6.3.
User is no longer able to filter subnet-related audits using type field:

Invalid search query: 'auditable_type' should be one of 'role, ptable, provisioning_template, filter, hostgroup, katello/repository, smart_proxy, katello/host/content_facet, katello/host/subscription_facet, remote_execution_feature, lookup_value, model, domain, realm, environment, architecture, image, usergroup, job_template, bookmark, hostgroup_class, puppetclass, medium, job_invocation, ansible_role, discovery_rule, katello/activation_key, katello/content_view, katello/kt_environment, katello/host_collection, katello/sync_plan, katello/capsule_lifecycle_environment, katello/content_view_component, katello/content_view_environment, katello/content_view_puppet_module, katello/content_view_version, katello/gpg_key, katello/product, foreman_virt_who_configure/config, foreman_openscap/policy, foreman_openscap/scap_content, foreman_openscap/tailoring_file, compute_profile, config_group, config_group_class, ssh_key, compute_attribute, host_class, host_config_group, http_proxy, key_pair, personal_access_token, auth_source, compute_resource, host, interface, location, os, organization, override_value, partition_table, smart_class_parameter, smart_variable, parameter', but the query was 'subnet'

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Daniel Lobato Garcia 2018-07-18 15:45:47 UTC
It's taken me a while, because this seems to work fine on 1.18 and develop on Foreman upstream. However it's true it's failing on 6.4, I also see the issue. If I diff app/models/subnet, there is no difference between develop and latest 6.4.

I'm setting this as triaged, however I can't see right now what is really the problem, and why is it only on 6.4 but nowhere to be found usptream. Tomer, maybe you could shed some light on this, since you worked on audits?

Comment 3 Tomer Brisker 2018-07-18 17:13:21 UTC
Created redmine issue http://projects.theforeman.org/issues/24291 from this bug

Comment 4 Tomer Brisker 2018-07-18 17:19:07 UTC
Indeed, PR open upstream. I forgot to add subnets to the list, we now automatically generate the list of types except for STI models that need separate handling since they have different ways of being recorded - some are audited as the base model (such as subnets) while others are recorded on the child model (such as locations).

Comment 5 Satellite Program 2018-07-18 18:22:27 UTC
Upstream bug assigned to tbrisker

Comment 6 Satellite Program 2018-07-18 18:22:30 UTC
Upstream bug assigned to tbrisker

Comment 7 Satellite Program 2018-07-19 16:22:29 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/24291 has been resolved.

Comment 8 Patrick Creech 2018-07-19 20:26:51 UTC
Tomer,

This failed to pick cleanly downstream, can you take a look?

Comment 11 Tomer Brisker 2018-08-31 14:44:13 UTC
*** Bug 1613381 has been marked as a duplicate of this bug. ***

Comment 12 Roman Plevka 2018-09-10 08:29:43 UTC
VERIFIED

on sat6.4.0-21
the "subnet" type is recognized again and works

Comment 13 Bryan Kearney 2018-10-16 19:12:47 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-2018:2927