Bug 1093601

Summary: Re-selecting an org after creating any entity leads to error: 'Page isn't redirecting properly'
Product: Red Hat Satellite Reporter: Sachin Ghai <sghai>
Component: WebUIAssignee: Walden Raines <walden>
Status: CLOSED CURRENTRELEASE QA Contact: Sachin Ghai <sghai>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.3CC: bbuckingham, dcleal, jmontleo, mkollar, mkorbel, sthirugn, tlestach, walden
Target Milestone: UnspecifiedKeywords: Reopened, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/4946
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-02 14:14:52 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
error when selecting org acme_1 with FF browser
none
error when selecting org Ovevs1v2 with chrome browser none

Description Sachin Ghai 2014-05-02 08:07:05 UTC
Description of problem:
Create an Organization and select it to add any entity like activation-keys, gpg-keys or product, repo anything. Once the entity is created, re-select the same or different org, the page leads to following error:

with FF 28.0
============
Page isn't redirecting properly

with chrome(Version 34.0.1847.116)
============
This webpage has a redirect loop

Version-Release number of selected component (if applicable):
* apr-util-ldap-1.3.9-3.el6_0.1.x86_64
* candlepin-0.9.7-1.el6_5.noarch
* candlepin-scl-1-5.el6_4.noarch
* candlepin-scl-quartz-2.1.5-5.el6_4.noarch
* candlepin-scl-rhino-1.7R3-1.el6_4.noarch
* candlepin-scl-runtime-1-5.el6_4.noarch
* candlepin-selinux-0.9.7-1.el6_5.noarch
* candlepin-tomcat6-0.9.7-1.el6_5.noarch
* elasticsearch-0.90.10-4.el6sat.noarch
* foreman-1.5.0.22-1.el6sat.noarch
* foreman-compute-1.5.0.22-1.el6sat.noarch
* foreman-gce-1.5.0.22-1.el6sat.noarch
* foreman-libvirt-1.5.0.22-1.el6sat.noarch
* foreman-ovirt-1.5.0.22-1.el6sat.noarch
* foreman-postgresql-1.5.0.22-1.el6sat.noarch
* foreman-proxy-1.5.7-1.el6sat.noarch
* foreman-selinux-1.5.0-0.develop.el6sat.noarch
* foreman-vmware-1.5.0.22-1.el6sat.noarch
* katello-1.5.0-20.el6sat.noarch
* katello-apache-1.0-1.noarch
* katello-ca-1.0-1.noarch
* katello-certs-tools-1.5.5-1.el6sat.noarch
* katello-installer-0.0.34-1.el6sat.noarch
* openldap-2.4.23-31.el6.x86_64
* pulp-katello-plugins-0.2-1.el6sat.noarch
* pulp-nodes-common-2.3.1-0.4.beta.el6sat.noarch
* pulp-nodes-parent-2.3.1-0.4.beta.el6sat.noarch
* pulp-puppet-plugins-2.3.1-0.4.beta.el6sat.noarch
* pulp-rpm-plugins-2.3.1-0.4.beta.el6sat.noarch
* pulp-selinux-2.3.1-0.4.beta.el6sat.noarch
* pulp-server-2.3.1-0.4.beta.el6sat.noarch
* python-ldap-2.3.10-1.el6.x86_64
* ruby193-rubygem-ldap_fluff-0.2.2-2.el6sat.noarch
* ruby193-rubygem-net-ldap-0.3.1-3.el6sat.noarch
* ruby193-rubygem-runcible-1.0.8-1.el6sat.noarch
* rubygem-hammer_cli-0.1.0-8.el6sat.noarch
* rubygem-hammer_cli_foreman-0.1.0-6.el6sat.noarch
* rubygem-hammer_cli_foreman_tasks-0.0.2-2.el6sat.noarch
* rubygem-hammer_cli_katello-0.0.3-18.el6sat.noarch

How reproducible:
always

Steps to Reproduce:
1. create org
2. select org from left top created in step1
3. create any entity cv or product or activation-key
4. re-select same org or different org from left top pane

Actual results:
with FF 28.0
============
Page isn't redirecting properly

with chrome(Version 34.0.1847.116)
============
This webpage has a redirect loop

Expected results:
The org selection should work

Additional info:
production.log says:

Processing by OrganizationsController#select as HTML
  Parameters: {"id"=>"321-0vevs1v2"}
Expire fragment views/tabs_and_title_records-1 (0.1ms)
Redirected to https://qetello02.usersys.redhat.com/organizations/321-0vevs1v2/select
Completed 302 Found in 8ms (ActiveRecord: 0.6ms)

Comment 1 Sachin Ghai 2014-05-02 08:09:44 UTC
Created attachment 891735 [details]
error when selecting org acme_1 with FF browser

Comment 2 Sachin Ghai 2014-05-02 08:10:42 UTC
Created attachment 891736 [details]
error when selecting org Ovevs1v2 with chrome browser

Comment 3 RHEL Program Management 2014-05-02 08:24:43 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 5 Walden Raines 2014-05-05 12:44:42 UTC
*** Bug 1089201 has been marked as a duplicate of this bug. ***

Comment 6 Dominic Cleal 2014-05-20 17:05:29 UTC
*** Bug 1096298 has been marked as a duplicate of this bug. ***

Comment 7 Dominic Cleal 2014-05-21 07:34:51 UTC
*** Bug 1099770 has been marked as a duplicate of this bug. ***

Comment 8 Walden Raines 2014-05-22 15:40:17 UTC
PR: https://github.com/Katello/katello/pull/4137

Comment 9 Walden Raines 2014-05-22 18:25:25 UTC
commit 665822433be6e065bec113de5c5c7e788c24f395
Merge: 6c8f142 c18e75f
Author: Walden Raines <walden>
Date:   Thu May 22 14:04:50 2014 -0400

    Merge pull request #4137 from waldenraines/4946
    
    Fixes #4946/BZ1093601 - allow org-switcher urls to pass through angular.

commit c18e75ff4d5e7337980af9be7dc7cdd1b368129a
Author: Walden Raines <walden>
Date:   Thu May 22 11:37:00 2014 -0400

    Fixes #4946/BZ1093601 - allow org-switcher urls to pass through angular.
    
    This will prevent a redirect loop that occurs when switching orgs or
    locations on a Bastion page.

Comment 11 Sachin Ghai 2014-05-23 09:29:52 UTC
Verified with sat6 beta snap6 

* apr-util-ldap-1.3.9-3.el6_0.1.x86_64
* candlepin-0.9.7-1.el6_5.noarch
* candlepin-scl-1-5.el6_4.noarch
* candlepin-scl-quartz-2.1.5-5.el6_4.noarch
* candlepin-scl-rhino-1.7R3-1.el6_4.noarch
* candlepin-scl-runtime-1-5.el6_4.noarch
* candlepin-selinux-0.9.7-1.el6_5.noarch
* candlepin-tomcat6-0.9.7-1.el6_5.noarch
* elasticsearch-0.90.10-4.el6sat.noarch
* foreman-1.6.0.13-1.el6sat.noarch
* foreman-compute-1.6.0.13-1.el6sat.noarch
* foreman-gce-1.6.0.13-1.el6sat.noarch
* foreman-libvirt-1.6.0.13-1.el6sat.noarch
* foreman-ovirt-1.6.0.13-1.el6sat.noarch
* foreman-postgresql-1.6.0.13-1.el6sat.noarch
* foreman-proxy-1.6.0.6-1.el6sat.noarch
* foreman-selinux-1.6.0-2.el6sat.noarch
* foreman-vmware-1.6.0.13-1.el6sat.noarch
* katello-1.5.0-24.el6sat.noarch
* katello-ca-1.0-1.noarch
* katello-certs-tools-1.5.5-1.el6sat.noarch
* katello-installer-0.0.44-1.el6sat.noarch
* openldap-2.4.23-32.el6_4.1.x86_64
* pulp-katello-plugins-0.3-1.el6sat.noarch
* pulp-nodes-common-2.4.0-0.18.beta.el6sat.noarch
* pulp-nodes-parent-2.4.0-0.18.beta.el6sat.noarch
* pulp-puppet-plugins-2.4.0-0.18.beta.el6sat.noarch
* pulp-puppet-tools-2.4.0-0.18.beta.el6sat.noarch
* pulp-rpm-plugins-2.4.0-0.18.beta.el6sat.noarch
* pulp-selinux-2.4.0-0.18.beta.el6sat.noarch
* pulp-server-2.4.0-0.18.beta.el6sat.noarch
* python-ldap-2.3.10-1.el6.x86_64
* ruby193-rubygem-net-ldap-0.3.1-3.el6sat.noarch
* ruby193-rubygem-runcible-1.1.0-2.el6sat.noarch
* rubygem-hammer_cli-0.1.0-13.el6sat.noarch
* rubygem-hammer_cli_foreman-0.1.0-15.el6sat.noarch
* rubygem-hammer_cli_foreman_tasks-0.0.2-6.el6sat.noarch
* rubygem-hammer_cli_katello-0.0.3-26.el6sat.noarch

Now org switching works without any error. I can switch orgs after creating any entity.

Comment 12 Sachin Ghai 2014-05-23 11:05:36 UTC
Re-opening this bz as UI is throwing same error for this scenario:

1. Login to UI
2. Create a new org or select existing org
3. Go to content menu --> select any entity like content view
4. Now select 'Any Organization' from top left org switcher.

Comment 13 Sachin Ghai 2014-05-23 11:07:33 UTC
Reproducible with sat6 beta snap6.

Comment 14 Walden Raines 2014-05-23 14:01:11 UTC
Another PR: https://github.com/Katello/katello/pull/4148

Comment 15 Walden Raines 2014-05-23 14:26:10 UTC
commit 3d8709f2de88cc0ba9bed6d77086d253f948139d
Merge: a8d5af3 3a3992f
Author: Walden Raines <walden>
Date:   Fri May 23 10:25:30 2014 -0400

    Merge pull request #4148 from waldenraines/5913
    
    Fixes #5913, BZ1093601 let org-switcher clear URLs pass through bastion.

commit 3a3992fc19d6a59ebe637a509f5da076096407c2
Author: Walden Raines <walden>
Date:   Fri May 23 09:56:22 2014 -0400

    Fixes #5913, BZ1093601 let org-switcher clear URLs pass through bastion.
    
    See also PR #4137 which only allowed org/location selection URLs
    to pass through bastion.  This adds org/location "clear" URLs as well.

Comment 17 Sachin Ghai 2014-05-29 08:29:14 UTC
Verified with sat6 beta snap7 compose 2(Satellite-6.0.3-RHEL-6-20140528.4):

Now org switching works without any error. I can switch orgs after creating any entity. Also scenario mentioned in comment12 is also behaving correctly. thanks.

Comment 18 Bryan Kearney 2014-07-02 14:10:00 UTC
This was delivered with 6.0.3, which is the Satellite 6 Beta.

Comment 19 Bryan Kearney 2014-07-02 14:10:21 UTC
This was delivered in 6.0.3, the Beta version of Satellite 6.0

Comment 20 Bryan Kearney 2014-07-02 14:14:52 UTC
This was delivered in the Satellite 6 Beta (6.0.3)