Description of problem: When using any filter when generating the Registered Hosts report, the following red pop-up message is shown together with attached traceback: "Cannot eagerly load the polymorphic association :owner". This may or may not have been caused by fixing bug 1655628. This is a regression because filtering worked in this report in some previous snap. Version-Release number of selected component (if applicable): Reproduced on Sat 6.5 snap 14. How reproducible: Deterministic Steps to Reproduce: 1. Monitor -> Report Templates -> generate Registered Hosts report -> enter some filter -> Submit Actual results: Error message, traceback, nothing generated Expected results: Report generated without errors
Created redmine issue https://projects.theforeman.org/issues/26033 from this bug
Upstream bug assigned to oprazak
Lukáš, I'm unable to reproduce. Do you have an env where I could test the fix?
Just reproduced. Will provide env, but it's nothing special, just a Satellite snap 17.
FailedQA with Sat 6.5 snap 21. The reproducer from OP now indeed doesn't show any error. However, it also doesn't search correctly: In Hosts -> All Hosts, the search field in form <system_name> correctly finds system with that name. Here, it finds nothing and returns empty set. For example, I have a system "fish-3.example.com". Entering "fish-3.example.com" in the Hosts filter and submitting returns an empty file. No error, no traceback.
Did you look at production.log? Given the history with the reproducability, could you share the reproducing env?
As I said, I haven't noticed any traceback in foreman-tail.
So this is another issue but we can use this BZ to track it too. The fix has been applied to your test env, please verify and ideally let us know in the upstream PR that fixes it.
Upstream bug assigned to mhulan
Failed with Sat 6.5 snap 22. I understand that the template is not yet present in the snap but that just means the BZ (which is ON_QA) failed with the current snap (which is even filled in Fixed In Version).
I hate to say it but FailedQA with Sat 6.5 snap 23. I have a Satellite with two systems. Everything works correctly for: 1) no filter 2) filter matching no system 3) filter matching one system in form "name~<name>" But generating takes absurdly long (probably forever) for filter matching one system in form like: "<name>" Output of foreman-tail attached.
Created attachment 1554242 [details] foreman-tail
Update: "forever" was incorrect, generating took 15 minutes and the results were correct.
Marek, that makes sense. I can verify this BZ once you can confirm the issue is not caused by fixing this BZ.
This is unrelated issue caused by including applicable rpms. On your instance, it seems to create too huge list. As a workaround (or expected fix in future), open the template (you need to unlock or clone first), remove ", :applicable_rpms" from includes on line with load_hosts. Please open a separate BZ for this. It would be great that after removing this the report still gives you what is expected.
As this is unrelated issue, I am marking this BZ as verified because it is fixed. Verified on Sat 6.5 snap 23.
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
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days