Bug 1661471 - Missing routes when checking facts containing '/'
Summary: Missing routes when checking facts containing '/'
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Fact
Version: 6.4
Hardware: All
OS: All
unspecified
medium with 1 vote vote
Target Milestone: 6.7.0
Assignee: Marek Hulan
QA Contact: Radovan Drazny
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-21 10:19 UTC by Avijit Roy
Modified: 2020-02-24 07:32 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 16818 Normal Closed nested facts can lead to invalid links 2020-02-28 18:02:25 UTC

Description Avijit Roy 2018-12-21 10:19:13 UTC
Description of problem:

Getting below error while selecting facts  mountpoints &  partitions

"Oops, we're sorry but something went wrong No route matches {:action=>"index", :controller=>"fact_values", :host_id=>"vm249-255.gsslab.pnq2.redhat.com", :parent_fact=>"mountpoints::/"}, possible unmatched constraints: [:parent_fact]
"

"Oops, we're sorry but something went wrong No route matches {:action=>"index", :controller=>"fact_values", :host_id=>"vm249-255.gsslab.pnq2.redhat.com", :parent_fact=>"partitions::/dev/mapper/rhel_vm249--255-root"}, possible unmatched constraints: [:parent_fact]
"

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

6.4

How reproducible:
100%

Steps to Reproduce:
1. Monitor > Facts > Select mountpoints or partitions. 
2.
3.

Actual results:
Getting Error:

"Oops, we're sorry but something went wrong No route matches {:action=>"index", :controller=>"fact_values", :host_id=>"vm249-255.gsslab.pnq2.redhat.com", :parent_fact=>"mountpoints::/"}, possible unmatched constraints: [:parent_fact]
"

"Oops, we're sorry but something went wrong No route matches {:action=>"index", :controller=>"fact_values", :host_id=>"vm249-255.gsslab.pnq2.redhat.com", :parent_fact=>"partitions::/dev/mapper/rhel_vm249--255-root"}, possible unmatched constraints: [:parent_fact]
"


Expected results:

Facts should be shown.

Additional info:

Logs captured in Production.log

==> /var/log/foreman/production.log <==
2018-12-21T05:09:29 [I|app|fe1b5]   Rendered collection of fact_values/_fact.html.erb [7 times] (8.2ms)
2018-12-21T05:09:29 [I|app|fe1b5]   Rendered fact_values/index.html.erb within layouts/application (253.0ms)
2018-12-21T05:09:29 [W|app|fe1b5] Action failed
ActionView::Template::Error: No route matches {:action=>"index", :controller=>"fact_values", :host_id=>"vm249-255.gsslab.pnq2.redhat.com", :parent_fact=>"mountpoints::/"}, possible unmatched constraints: [:parent_fact]
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_dispatch/journey/formatter.rb:55:in `generate'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_dispatch/routing/route_set.rb:748:in `generate'

Comment 3 Tim 2019-03-13 19:28:20 UTC
Still present in 6.4.2, exactly as described by Avijit.

Comment 6 Bryan Kearney 2019-08-02 10:06:40 UTC
Upstream bug assigned to mhulan@redhat.com

Comment 7 Bryan Kearney 2019-08-02 10:06:42 UTC
Upstream bug assigned to mhulan@redhat.com

Comment 9 Bryan Kearney 2019-08-29 12:06:46 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/16818 has been resolved.

Comment 12 Marek Hulan 2019-10-11 07:51:44 UTC
The patch is tiny and easy to backport, if the need be.

Comment 17 Radovan Drazny 2020-02-06 12:10:59 UTC
The fix works, it is now possible to click on mountpoint/partitions/"facts with / in it",  but there is an edge case, where a fact is processed incorrectly. Normally, clicking on a mountpoint fact shows detailed facts about the mountpoint (size, size_bytes, capacity, used, etc.). This works for all sub-mounts - /home, /boot, /dev etc. But clicking on the root partition (/) doesn't show these detailed facts, and goes back to the main fact page for the given host instead. Satellite  interprets a lone "/" incorrectly, even when it is a part of a "mountpoint" fact.


Note You need to log in before you can comment on or make changes to this bug.