Bug 1351464

Summary: Navigating to Configure --> Environments results in 404
Product: Red Hat Satellite Reporter: Stephen Wadeley <swadeley>
Component: WebUIAssignee: Walden Raines <walden>
Status: CLOSED ERRATA QA Contact: Roman Plevka <rplevka>
Severity: high Docs Contact:
Priority: high    
Version: 6.2.0CC: adahms, bbuckingham, bkearney, dlobatog, jcallaha, mrichter, oshtaier, pgervase, rankumar, rplevka, seldridg, stbenjam, sthirugn, swadeley, walden, zhunting
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/15665
Whiteboard:
Fixed In Version: tfm-rubygem-bastion-3.2.0.13-1 Doc Type: Known Issue
Doc Text:
When moving to Puppet environments, you might see an HTTP 404 error. Reload the page to go to the correct location.
Story Points: ---
Clone Of:
: 1426382 (view as bug list) Environment:
Last Closed: 2017-05-01 13:52:41 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:
Bug Depends On:    
Bug Blocks: 1426382    

Description Stephen Wadeley 2016-06-30 07:05:43 UTC
Description of problem:

If I am viewing a page in the web UI and then select: Configure --> Environments I am often sent to a 404 error page. If I then press the browser back arrow I arrive at the Puppet Environments page. This suggest I did go to that page when I selected it from the menu, but that I was immediately forwarded to the error page.


Version-Release number of selected component (if applicable):
Red Hat Satellite
Version 6.2
foreman-installer-katello-3.0.0.47-2.el7sat.noarch
katello-3.0.0-8.el7sat.noarch

How reproducible:


Steps to Reproduce:
1. Visit a page such as Content -> Products
2. Select Configure --> Environments


Actual results:
https://rhel7-2-sat6-2.example.com/404

Expected results:
https://rhel7-2-sat6-2.example.com/environments

Additional info:

The error message includes this "If you are the application owner check the logs for more information."

Could you make that a little more verbose? Which logs exactly? I could not see anything in var/log/message but then I am not sure what to look for.

Comment 3 Roman Plevka 2016-07-02 10:53:52 UTC
Note:
This seems to be replicable only on navigating from Katello resource (page) to Puppet Environments (which is Foreman, i believe). Looks like the request to foreman is not even made (no sign of *any* processed http request in production.log). Instead, a straight request to http://server.com/404 is made according /var/log/httpd/foreman-ssl_access_ssl.log:

<requestor ip> - - [02/Jul/2016:06:34:54 -0400] "GET /404 HTTP/1.1" 304 - "https://sat6.server.com/environments" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0"

I'm suspecting some Javascript overrides the request and makes another one straight to /404 (Probably Bastion: https://github.com/Katello/bastion/blob/94333abda01d7634a0d19fc8c638067532f88be7/app/assets/javascripts/bastion/features/feature-flag.run.js#L14)

Comment 4 Roman Plevka 2016-07-02 13:09:52 UTC
Looks like the following commit has revealed the issue as a side effect:
https://github.com/Katello/bastion/commit/dee91a07f70d09348afc14d43597c13a4428289c

reverting the code back to original (removing the conditional and redirecting to 'url' straight away) fixes the issue (I'm not suggesting reverting it back)

Comment 6 Stephen Benjamin 2016-07-12 15:39:56 UTC
This also happens when navigating from a Bastion page to "Manage Organizations".

Comment 7 Walden Raines 2016-07-12 17:55:39 UTC
Created redmine issue http://projects.theforeman.org/issues/15665 from this bug

Comment 8 Walden Raines 2016-07-12 19:25:04 UTC
PR: https://github.com/Katello/bastion/pull/118

Comment 9 Bryan Kearney 2016-07-12 20:15:14 UTC
Upstream bug component is Uncategorized

Comment 10 Tomer Brisker 2016-08-14 14:10:46 UTC
*** Bug 1364251 has been marked as a duplicate of this bug. ***

Comment 11 Bryan Kearney 2016-08-23 14:17:38 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/15665 has been closed

Comment 12 Walden Raines 2016-09-22 20:06:04 UTC
*** Bug 1376046 has been marked as a duplicate of this bug. ***

Comment 15 Roman Plevka 2016-10-20 09:36:00 UTC
FAILED QA:
on sat6.3.0 snap#5

I keep getting 404 on navigating from a Katello pages (e.g. Activation keys) to Hosts or New Host pages.

Comment 16 Bryan Kearney 2016-12-16 19:07:58 UTC
Upstream bug component is WebUI

Comment 17 Walden Raines 2017-01-17 16:14:00 UTC
(In reply to Roman Plevka from comment #15)
> FAILED QA:
> on sat6.3.0 snap#5
> 
> I keep getting 404 on navigating from a Katello pages (e.g. Activation keys)
> to Hosts or New Host pages.

What version of bastion?

Comment 18 Walden Raines 2017-01-18 16:46:28 UTC
(In reply to Walden Raines from comment #17)
> (In reply to Roman Plevka from comment #15)
> > FAILED QA:
> > on sat6.3.0 snap#5
> > 
> > I keep getting 404 on navigating from a Katello pages (e.g. Activation keys)
> > to Hosts or New Host pages.
> 
> What version of bastion?

Never mind.

Comment 19 Ranjan Kumar 2017-01-25 03:44:43 UTC
Similar issue:
If you're at https://satellite.example.com/content_hosts and you click that top left link, you get a 404 page.

Comment 20 Walden Raines 2017-01-26 15:02:16 UTC
Fixed in https://github.com/Katello/bastion/pull/165 with:

commit 440714a1dc4cb1a8848a342edfd4e4164c257504
Author: Walden Raines <walden>
Date:   Tue Jan 24 15:57:41 2017 -0500

    Fixes #15665: get correct root url for 404 states.
    
    We were getting the relative url instead of an absolute url when
    determining if a state transition should result in a 404 (which worked
    until nutupane was removed).  This commit fixes the root url logic.
    
    http://projects.theforeman.org/issues/15665

Comment 21 Daniel Lobato Garcia 2017-01-27 08:44:47 UTC
Setting as triaged as there's a fix already upstream

Comment 22 Walden Raines 2017-02-03 18:32:13 UTC
*** Bug 1418695 has been marked as a duplicate of this bug. ***

Comment 23 Brad Buckingham 2017-02-09 18:25:33 UTC
*** Bug 1409818 has been marked as a duplicate of this bug. ***

Comment 24 Satellite Program 2017-02-23 21:08:33 UTC
Please add verifications steps for this bug to help QE verify

Comment 25 Walden Raines 2017-02-27 14:35:03 UTC
*** Bug 1394974 has been marked as a duplicate of this bug. ***

Comment 26 Oleksandr Shtaier 2017-03-28 08:13:38 UTC
Verified on 6.2.9

Navigation works as intended + functionality related to Red Hat Satellite logo also works properly

All of these things didn't work in 6.2.8, so verified that fix exactly delivered in 6.2.9

Comment 28 errata-xmlrpc 2017-05-01 13:52:41 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/RHBA-2017:1191

Comment 29 Andrew Dahms 2017-05-23 13:39:31 UTC
Changing the 'requires_doc_text' flag to '-'.