Not calling streamline to get info about the full user (line 400 of streamline/user.rb), which means user gets locked out. The error "login is not a simple user" that is being returned also needs to be properly capitalized and cased - esp. if this is coming from streamline. Blocks partial alpha testing
Commit pushed to master at https://github.com/openshift/li https://github.com/openshift/li/commit/7315ed22dc5aa0acd1725a172a73221da20a4720 Bug 910091 - Users that exist in streamline are now populated from the streamline API
(In reply to comment #0) Tested this issue on devenv-stage_311, upgrade and downgrade using an actived RHN account "yujzhang", both can be successful, will verify this bug after it's on qa.
If trying to test it on STG, plan change is not allowed , not sure if STG has enabled aria. curl -k -H 'Accept: application/xml' --user yujzhang:changeme https://stg.openshift.redhat.com/broker/rest/user/ -d plan_id=megashift -X PUT <?xml version="1.0" encoding="UTF-8"?> <response> <status>unprocessable_entity</status> <type nil="true"></type> <data> <datum nil="true"></datum> </data> <messages> <message> <severity>error</severity> <text>Plan change is not allowed for this account</text> <exit-code>220</exit-code> <field nil="true"></field> </message> </messages> <version>1.3</version> If trying to test it on an integrated devenv-stage_311 for an RHN account, it could be successful: curl -k -H 'Accept: application/xml' --user yujzhang:changme https://ec2-23-21-37-163.compute-1.amazonaws.com/broker/rest/user/ -d plan_id=megashift -X PUT <?xml version="1.0" encoding="UTF-8"?> <response> <status>ok</status> <type>account</type> <data> <user> <login>yujzhang</login> <consumed-gears>0</consumed-gears> <capabilities> <plan-upgrade-enabled>true</plan-upgrade-enabled> <subaccounts>false</subaccounts> <gear-sizes> <gear-size>small</gear-size> <gear-size>medium</gear-size> </gear-sizes> <max-storage-per-gear>30</max-storage-per-gear> </capabilities> <max-gears>16</max-gears> <plan-id>megashift</plan-id> <usage-account-id>2022245</usage-account-id> BTW, the original account status is terminated, not sure why (see attachment about the account change history) , I have to change its status to active manually.
Created attachment 703897 [details] accountstatus change history Account status change history. it will always be changed to terminated peoridically
All accounts created in devenvs are marked as test users, which are terminated after a few days. Sounds like this is resolved on stage with the changes to both streamline and OpenShift?
(In reply to comment #5) Tested this issue on STG using actived account "yujzhang", the upgrade plan funtion is enabled, but when I click the "Upgrade" button on /app/account/plan page, it will redirect to /app/account/plans/megashift/upgrade/edit page and say "We appear to be having technical difficulties", could you please check this?
Tested this issue on devenv_2878 with a newly registered RHN user(which have not created fake account for it in aria manually) as follows: Steps to Reproduce: 1.Register a RHN user, and login the openshift website. 2.Go to My account page. 3.Click "upgrade now"--> "Upgrade". Actual results: 3.Got error page said "NoMethodError in AccountUpgradesController#edit undefined method `each_pair' for nil:NilClass" as the attachment shown. Expected results: 3.User should get a information edit page to update plan. development.log from /var/log/openshift/site is attached. Add some log below: ********************************************************************* 013-03-01 05:28:00.297 [DEBUG] Streamline call (739.5ms) roles! /wapps/streamline/cloudVerify.html [ args: {}, code: 200, response: {"username"=>"wsun22", "roles"=>["cloud_access_1", "orgadmin", "admin:org:all", "authenticated"]} ] (pid:5122) 2013-03-01 05:28:01.276 [DEBUG] Aria call (977.3ms) get_acct_no_from_user_id https://streamline-proxy1.ops.rhcloud.com/api/ws/api_ws_class_dispatcher.php [ code: 200, error_code: 1009, exception: ["Aria::AccountDoesNotExist", "account does not exist (1009)"] ] (pid:5122) 2013-03-01 05:28:01.278 [INFO ] Redirected to https://ec2-54-242-158-34.compute-1.amazonaws.com/app/account/plans/megashift/upgrade/edit (pid:5122) 2013-03-01 05:28:01.280 [INFO ] Completed 302 Found in 1854ms (pid:5122) 2013-03-01 05:28:01.578 [INFO ] Started GET "/app/account/plans/megashift/upgrade/edit" for 203.114.244.88 at 2013-03-01 05:28:01 -0500 (pid:5122) 2013-03-01 05:28:01.649 [INFO ] Processing by AccountUpgradesController#edit as HTML (pid:5122) 2013-03-01 05:28:01.666 [INFO ] Parameters: {"plan_id"=>"megashift"} (pid:5122) 2013-03-01 05:28:01.668 [DEBUG] Session contents: {"ticket"=>"0|zhnATfdcEvTbY2tbNYGs7Y2eC9TjkMon0ON", "api_ticket"=>"50cbac0251c7849f73097b0f563b930bb2f625075d690aa926e306ad2b5328ba", "login"=>"wsun22", "streamline_type"=>:full, "terms"=>true, "session_id"=>"b25162f071c7bf0151e5367985048f3b", "_csrf_token"=>"JnihF6p8/KcZX/V3r5OtHoUvlIKXrCuIrgjwzXqLbzM=", "caps"=>[3, 0, [:small], nil, true]} (pid:5122) 2013-03-01 05:28:02.361 [DEBUG] Streamline call (652.8ms) user_info! /wapps/streamline/userInfo.html [ args: {"login"=>"wsun22", "secretKey"=>"sw33tl1Qu0r"}, code: 200, response: {"lastName"=>"sun", "greeting"=>"Mrs.", "state"=>nil, "address1"=>"asdfasdfasdf", "emailAddress"=>"wsun", "address2"=>nil, "address3"=>nil, "city"=>"gsdfg", "country"=>nil, "title"=>nil, "address4"=>nil, "postalCode"=>"234534", "phoneNumber"=>"353523523", "company"=>"redhat", "login"=>"wsun22", "firstName"=>"wei"} ] (pid:5122) 2013-03-01 05:28:02.364 [INFO ] Completed 500 Internal Server Error in 697ms (pid:5122) 2013-03-01 05:28:02.380 [FATAL] NoMethodError (undefined method `each_pair' for nil:NilClass): lib/streamline/attributes.rb:78:in `from_streamline' lib/streamline/user.rb:401:in `full_user' app/controllers/account_upgrades_controller.rb:73:in `edit' lib/streamline/railties/controller_runtime.rb:12:in `process_action' (pid:5122) ********************************************************************* If use account "yujzhang"(which has been created fake account in aria manually), then the upgrade and downgrade works successfully on devenv_2878.
Created attachment 704130 [details] Error page when newly registered RHN user tried to upgrade on devenv_2878
Created attachment 704131 [details] development.log from /var/log/openshift/site on devenv_2878
Commits pushed to master at https://github.com/openshift/li https://github.com/openshift/li/commit/9019fe2c7b4a3a37fce880ef2155904705610b0b Bug 910091 - Corrected http_post call that was not returning JSON response https://github.com/openshift/li/commit/ff2143ea7795741324979df827b64b8242f3610f Merge pull request #953 from nhr/BZ910091_enable_streamline_user_retrieval Bug 910091 - Corrected http_post call that was not returning JSON response
Tested this issue on devenv_2878 with a newly registered RHN user(which have not created fake account for it in aria manually) as follows: Steps to Reproduce: 1.Register a RHN user, and login the openshift website. 2.Go to My account page. 3.Click "upgrade now"--> "Upgrade". 4.create 4 apps, and try to downgrade. 5.delete 1 app, and try to downgrade. 6.Repeat step 2-5 use account "yujzhang"(which has been created fake account in aria manually). Actual results: 3.Upgrade successfully. 4.Error message " You are currently using more gears than the new plan would allow. Please scale down or delete applications before downgrading." shown. 5.Downgrade successfully. 6.Result as result 2-5. So the issue on devenv for newly registered RHN account have been fixed. But the issue in Comment 6 still exist in STG. Waiting for further fix.
STG will not work correctly until you have a new stage build. Let's wait and confirm when it is available.
(In reply to comment #12) Will test it on new stage build.
(In reply to comment #13) Tested on devenv_2906, new registered user can upgrade and downgrade plan successfully, so verify this bug.