Bug 1719636

Summary: Missing(ID: N) for Host_ids column in case of audit records for subscription updates
Product: Red Hat Satellite Reporter: Vladimír Sedmík <vsedmik>
Component: Audit LogAssignee: Kavita <kgaikwad>
Status: CLOSED ERRATA QA Contact: Vladimír Sedmík <vsedmik>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.6.0CC: bkearney, inecas, kgaikwad, mawerner, mcorr, mmccune, pcreech
Target Milestone: 6.7.0Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
If you edit the subscription information for hosts in Satellite, the hosts do not display in the audit records of the Satellite web UI. Instead of a list of hosts, the following error is displayed: "Missing(ID: 2)" in "Host ids" line.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-14 13:24: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:
Attachments:
Description Flags
UI printscreen none

Description Vladimír Sedmík 2019-06-12 08:48:24 UTC
Created attachment 1579726 [details]
UI printscreen

Description of problem:
When I add or remove a subscription to a host and check the Monitor > Audits in the WebUI, the records are showing "Missing(ID: 2)" in "Host ids" line.

Version-Release number of selected component (if applicable):
satellite-6.6.0-5.beta.el7sat.noarch

How reproducible:
always

Steps to Reproduce:
1. Register a host to the Satellite
2. Go to Hosts > Content hosts > pick the host > tab Subscriptions > Add or Remove some subscription
3. Go to Monitor > Audits > check the latest log

Actual results:
"Missing(ID: 2)" shown in "Host ids" item

Expected results:
Valid value shown in "Host ids" item

Additional info:
See the attachment

Comment 3 Marek Hulan 2019-07-23 06:16:35 UTC
Kavita, does this ring a bell? It feels like we can't find the host object for some reason. I wonder if that could be caused by taxonomies, this audit does not have any location. But the user is apparentely an admin.

Comment 4 Kavita 2019-07-23 08:18:09 UTC
(In reply to Marek Hulan from comment #3)
> Kavita, does this ring a bell? It feels like we can't find the host object
> for some reason. I wonder if that could be caused by taxonomies, this audit
> does not have any location. But the user is apparentely an admin.

Hello Marek,

I had discussion with Vladimír about this BZ previously. This is not due to taxonomies.
There is no direct association between pool and hosts but there is 'hosts' method defined inside Glue::Candlepin::Pool.

To fix this BZ, I would need changes from this PR - https://github.com/theforeman/foreman/pull/6710 
which will allow me to add audit hook on pool side to get host records.

Creating an upstream issue for pool side changes which will get merge after this above PR

Comment 5 Kavita 2019-07-23 08:19:38 UTC
Created redmine issue https://projects.theforeman.org/issues/27383 from this bug

Comment 6 Mike McCune 2019-09-12 17:36:12 UTC
since this is merged upstream, moving to POST

Comment 10 errata-xmlrpc 2020-04-14 13:24: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-2020:1454