Bug 1123344

Summary: Some old accounts can not upgrade successfully after submitting the contact info.
Product: OpenShift Online Reporter: Yujie Zhang <yujzhang>
Component: Management ConsoleAssignee: Jessica Forrester <jforrest>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: jforrest, jokerman, mmccomas, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-10 00:49:45 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:

Description Yujie Zhang 2014-07-25 11:36:42 UTC
Description of problem:

Logged in using lxia+silver on devenv with streamline enabled, which is an old silver account, tried to upgrade again, then it is required to fulfill the contact info but when submitting the info, it met the following error "Unhandled exception reference #680c2e4392d991c6ef9a66d63781d5ed: undefined method `name' for nil:NilClass
/var/www/openshift/site/app/views/contact_info/_form.html.haml:32:in `block in _app_views_contact_info__form_html_haml___3451867908341135541_46113020'"

Only "lxia+silver" account met this issue up to now, but it may affect some other old accounts.

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

How reproducible:
always

Steps to Reproduce:
1.Login using old accounts which have upgraded before, like lxia+silver on devenv
2.Go plan upgrade page and input valid contact info 
3.Submit the info the upgrade


Actual results:

Got the following error:
2014-07-25 10:35:44.543 [ERROR] Unhandled exception reference #680c2e4392d991c6ef9a66d63781d5ed: undefined method `name' for nil:NilClass
/var/www/openshift/site/app/views/contact_info/_form.html.haml:32:in `block in _app_views_contact_info__form_html_haml___3451867908341135541_46113020'
  /opt/rh/ruby193/root/usr/share/gems/gems/formtastic-1.2.4/lib/formtastic.rb:573:in `call'
  /opt/rh/ruby193/root/usr/share/gems/gems/formtastic-1.2.4/lib/formtastic.rb:573:in `block (2 levels) in inputs_for_nested_attributes'
  /opt/rh/ruby193/root/usr/share/gems/gems/haml-4.0.3/lib/haml/helpers.rb:368:in `call'
  /opt/rh/ruby193/root/usr/share/gems/gems/haml-4.0.3/lib/haml/helpers.rb:368:in `block in capture_haml'
  /opt/rh/ruby193/root/usr/share/gems/gems/haml-4.0.3/lib/haml/helpers.rb:617:in `with_haml_buffer'
  /opt/rh/ruby193/root/usr/share/gems/gems/haml-4.0.3/lib/haml/helpers.rb:364:in `capture_haml'
  /opt/rh/ruby193/root/usr/share/gems/gems/haml-4.0.3/lib/haml/helpers/xss_mods.rb:61:in `capture_haml_with_haml_xss'
  /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-console-1.28.2/lib/console/formtastic/bootstrap_form_builder.rb:41:in `field_set_and_list_wrapping'
  /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-console-1.28.2/lib/console/formtastic/bootstrap_form_builder.rb:179:in `inputs'
  /opt/rh/ruby193/root/usr/share/gems/gems/formtastic-1.2.4/lib/formtastic.rb:573:in `block in inputs_for_nested_attributes'
  /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/capture_helper.rb:40:in `block in capture'
  /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/capture_helper.rb:187:in `with_output_buffer'
  /opt/rh/ruby193/root/usr/share/gems/gems/haml-4.0.3/lib/haml/helpers/action_view_xss_mods.rb:5:in `with_output_buffer_with_haml_xss'
  /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/capture_helper.rb:40:in `capture'
  /opt/rh/ruby193/root/usr/share/gems/gems/haml-4.0.3/lib/haml/helpers/action_view_mods.rb:59:in `capture_with_haml'
  /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/form_helper.rb:607:in `fields_for'
  /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/helpers/fo


Expected results:

Old accounts should be able to upgrade and downgrade successfully.

Additional info:

Comment 1 Jessica Forrester 2014-07-25 19:22:21 UTC
This case should not have been possible since this user was a simple user in streamline but had an account in Aria.  Suspect it was caused by the reset to the stage instance of streamline.  Fixed the code to handle this edge case but it should never happen in production.  FYI that the lxia+silver user is now upgraded to a full user in streamline so the bug would no longer be reproducible on that user name.

Fixed in https://github.com/openshift/li/pull/2758

Comment 2 Yujie Zhang 2014-07-28 03:16:29 UTC
Tested on devenv_5011, the account can be upgrade successfully, so verify this bug.

Comment 3 openshift-github-bot 2014-07-28 10:31:10 UTC
Commit pushed to master at https://github.com/openshift/li

https://github.com/openshift/li/commit/a011ed568ed4474d48213550f97f319f6c54d995
Bug 1123344 - upgrade controller throws exception for contact info country when aria user already exists but streamline user is not a full user