Bug 1017656

Summary: Met "NoMethodError" when creating valid/invalid domain from /console/domains/new page.
Product: OpenShift Container Platform Reporter: Yujie Zhang <yujzhang>
Component: Management ConsoleAssignee: Brenton Leanhardt <bleanhar>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.0.0CC: adellape, bleanhar, isaac.christoffersen, jialiu, jkeck, jolamb, tfeng, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-openshift-origin-console-1.17.6.5-1.el6op, openshift-origin-console-1.15.1.2-2.el6op Doc Type: Bug Fix
Doc Text:
Users experienced failures when attempting to create multiple domains in the Management Console because a required method was missing from the code base. This issue has been fixed and users are now able to create multiple domains with the Management Console.
Story Points: ---
Clone Of:
: 1048992 (view as bug list) Environment:
Last Closed: 2014-01-28 16:38:51 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: 1048992    
Bug Blocks:    
Attachments:
Description Flags
Full log
none
log none

Description Yujie Zhang 2013-10-10 09:57:46 UTC
Created attachment 810421 [details]
Full log

Description of problem:

Tried to create multipul domains from console, but met "NoMethodError" as following:

2013-10-10 02:33:49.897 [INFO ] Started POST "/console/domains" for 127.0.0.1 at 2013-10-10 02:33:49 -0700 (pid:10951)
2013-10-10 02:33:49.899 [INFO ] Processing by DomainsController#create as HTML (pid:10951)
2013-10-10 02:33:49.899 [INFO ] Parameters: {"utf8"=>"✓", "authenticity_token"=>"OEjsvBy8QlsEezBIxBAOyPxvaElhPrmIm1dbiHOJHhY=", "then"=>"", "domain_param"=>"", "domain"=>{"name"=>"sasdfa"}} (pid:10951)
2013-10-10 02:33:49.941 [INFO ] Completed 500 Internal Server Error in 42ms (pid:10951)
2013-10-10 02:33:49.948 [FATAL] NoMethodError (undefined method `remote_request?' for #<DomainsController:0x0000000411d920>):
  openshift-origin-console (1.15.6) app/controllers/console_controller.rb:27:in `valid_referrer'
  openshift-origin-console (1.15.6) app/controllers/domains_controller.rb:22:in `create'
  actionpack (3.2.8) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
  actionpack (3.2.8) lib/abstract_controller/base.rb:167:in `process_action'
  actionpack (3.2.8) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (3.2.8) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
  activesupport (3.2.8) lib/active_support/callbacks.rb:428:in `block (3 levels) in _run__328336666741373877__process_action__3805827379399542533__callbacks'
  activesupport (3.2.8) lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_93'
  activesupport (3.2.8) lib/active_support/callbacks.rb:326:in `around'
  activesupport (3.2.8) lib/active_support/callbacks.rb:310:in `_callback_around_31'

Multi domains can be create successfully using rhc, this issue just exists on console.

Version-Release number of selected component (if applicable):
2.0/2013-10-08.1 puddle

How reproducible:
always

Steps to Reproduce:
1.Set MAX_DOMAINS_PER_USER="3" in file
2.Try do create the second domain from console/domains/new page
3.

Actual results:

Failed to create more than 1 domain and met "NoMethodError". Full log is as attachment.

Expected results:

Multi domains should be created successfully from console.

Additional info:

Comment 2 John Keck 2013-11-12 19:20:41 UTC
Repeated in the 2.0 Beta release.

Comment 3 Yujie Zhang 2013-12-05 08:19:58 UTC
Tested on 2.0/rhn-stage, user will get "An error has occurred" error when creating domain from /console/domains/new page, including valid or invalid domain, log is same as above, please fix it asap in case it will block the release, thanks.

Comment 4 Tian Feng 2013-12-24 03:24:27 UTC
Test on puddle: [2.0.1/2013-12-20.1]
When click link "create a new domain" on creating app page, it would meet  NoMethodError directly before creating domain. Add log for it.

Comment 5 Tian Feng 2013-12-24 03:24:56 UTC
Created attachment 841038 [details]
log

Comment 6 Luke Meyer 2013-12-31 18:42:54 UTC
I missed this bug because version wasn't set. Sorry. Will try to look into it.

Comment 7 Luke Meyer 2014-01-06 17:34:33 UTC
"remote_request?" method used by console/app/controllers/console_controller.rb#valid_referrer doesn't exist. Booting it upstream for a fix.

Comment 8 Brenton Leanhardt 2014-01-14 15:11:50 UTC
Upstream commit:

commit 38400e09a99089f28bddb17d4af38a4769491349
Author: liggitt <jliggitt>
Date:   Tue Jan 7 13:03:43 2014 -0500

    Fix bug 1048992: Define remote_request? in console controller


PR: https://github.com/openshift/enterprise-server/pull/197

Comment 10 Yujie Zhang 2014-01-15 03:08:21 UTC
Tested on [2.0.2/2014-01-14], the domain can be created successfully, and it can return correct error message when creating invalid domians, so verify this bug.

Comment 12 errata-xmlrpc 2014-01-28 16:38:51 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.

http://rhn.redhat.com/errata/RHBA-2014-0102.html