Bug 971136 - [web-console] Partially created/deleted app makes my applications page not accessible
Summary: [web-console] Partially created/deleted app makes my applications page not ac...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Website
Version: 1.x
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ---
: ---
Assignee: Justin Harris
QA Contact: libra bugs
URL:
Whiteboard:
: 972516 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-05 19:11 UTC by Kenny Woodson
Modified: 2013-07-04 21:10 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-24 14:51:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 973718 0 unspecified CLOSED Rest API returns partially created app objects without core attributes 2021-02-22 00:41:40 UTC

Internal Links: 973718

Description Kenny Woodson 2013-06-05 19:11:20 UTC
Description of problem:

In #openshift a user pinged and said that he was unable to login to his account and reach the "my applications" link.

I researched this and found that he had a partially deleted application in his account.  I did a search in the mcollective logs and found that his application had been destroyed:

I, [2013-06-05T13:56:44.292725 #31226]  INFO -- : openshift.rb:84:in `execute_action' Executing action [app-destroy] using method oo_app_destroy with args [{"--with-app-uuid"=>"51af78125973caa01100031e", "--with-app-name"=>"rssoverwolf", "--with-container-uuid"=>"51af78125973caa01100031e", "--with-container-name"=>"rssoverwolf", "--with-namespace"=>"ss2982", "--with-uid"=>6164, "--with-request-id"=>"62fd9ccb8915917409865e7b079507fe", "--cart-name"=>"openshift-origin-node"}]

Therefore I knew that his application just needed to be removed from the database.  This was fixed and the user was then able to access the applications page.

Specifically these lines below:

2013-06-05 14:01:12.187 [ERROR] Unhandled exception reference #0773dea08400c55880617881477e2aa8: undefined method `framework' for #<Application:0x000000060024d0>

Here was the error/output from the console log: 

2013-06-05 14:01:09.500 [DEBUG] Using cached domain vn (pid:19750)
2013-06-05 14:01:09.601 [DEBUG] ^[[1m^[[34mOpenShift API (98.5ms)^[[0m ^[[1m^[[1mget^[[0m https://localhost:443/broker/rest/user/keys.json [ code: ^[[1m^[[1m200^[[0m ] (pid:19750)
2013-06-05 14:01:09.613 [DEBUG] ^[[1m^[[34mOpenShift API (95.5ms)^[[0m ^[[1m^[[1mget^[[0m https://localhost:443/broker/rest/user/authorizations.json [ code: ^[[1m^[[1m200^[[0m ] (pid:19750)
2013-06-05 14:01:09.616 [INFO ] Rendered /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-console-1.9.11/app/views/settings/_keys.html.haml (1.3ms) (pid:19750)
2013-06-05 14:01:09.617 [INFO ] Rendered /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-console-1.9.11/app/views/settings/_domains.html.haml (0.4ms) (pid:19750)
2013-06-05 14:01:09.619 [INFO ] Rendered /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-console-1.9.11/app/views/settings/_authorizations.html.haml (1.8ms) (pid:19750)
2013-06-05 14:01:09.619 [INFO ] Rendered /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-console-1.9.11/app/views/settings/show.html.haml within layouts/console (4.7ms) (pid:19750)
2013-06-05 14:01:09.621 [INFO ] Rendered /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-console-1.9.11/app/views/layouts/_head.html.haml (1.3ms) (pid:19750)
2013-06-05 14:01:09.623 [INFO ] Rendered layouts/console/_stylesheets.html.haml (1.1ms) (pid:19750)
2013-06-05 14:01:09.627 [INFO ] Rendered layouts/console/_header.html.haml (3.6ms) (pid:19750)
2013-06-05 14:01:09.628 [INFO ] Rendered layouts/_footer.html.haml (0.9ms) (pid:19750)
2013-06-05 14:01:09.629 [INFO ] Rendered layouts/console/_javascripts.html.haml (0.5ms) (pid:19750)
2013-06-05 14:01:09.630 [INFO ] Rendered shared/_tracking.html.haml (0.9ms) (pid:19750)
2013-06-05 14:01:09.630 [INFO ] Completed 200 OK in 131ms (Views: 16.6ms) (pid:19750)
2013-06-05 14:01:12.109 [INFO ] Started GET "/app/console/applications" for 64.62.244.51 at 2013-06-05 14:01:12 -0400 (pid:19750)
2013-06-05 14:01:12.110 [INFO ] Processing by ApplicationsController#index as HTML (pid:19750)
2013-06-05 14:01:12.111 [DEBUG] Session contents: {"ticket"=>"0|jBnSCNI65yfz64SeVhayFT7Mdd1OcVcwveS", "api_ticket"=>"3969e0e83fa5720cc5e4628cc0c0164ae6165f89cee5ba2735352f17ab5d3b94", "login"=>"gw2empgaming", "streamline_type"=>:simple, "terms"=>true, "session_id"=>"7bc50d9d4bdca3ec86006d0747e9dd4f", "domain"=>"ss2982", "_csrf_token"=>"JW9PNj8aJJf2yvkH9GT2DbES6W1Yium1/VpcknIUZ7E="} (pid:19750)
2013-06-05 14:01:12.111 [DEBUG] Using cached domain ss2982 (pid:19750)
2013-06-05 14:01:12.185 [DEBUG] ^[[1m^[[34mOpenShift API (71.3ms)^[[0m ^[[1m^[[1mget^[[0m https://localhost:443/broker/rest/domains/ss2982/applications.json [ code: ^[[1m^[[1m200^[[0m ] (pid:19750)
2013-06-05 14:01:12.187 [ERROR] Unhandled exception reference #0773dea08400c55880617881477e2aa8: undefined method `framework' for #<Application:0x000000060024d0>
/opt/rh/ruby193/root/usr/share/gems/gems/activeresource-3.2.8/lib/active_resource/base.rb:1470:in `method_missing'
  /opt/rh/ruby193/root/usr/share/gems/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing'
  /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-console-1.9.11/app/models/rest_api/base.rb:762:in `method_missing'
  /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-console-1.9.11/app/controllers/applications_controller.rb:29:in `block in apply'
  /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-console-1.9.11/app/controllers/applications_controller.rb:28:in `select'
  /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-console-1.9.11/app/controllers/applications_controller.rb:28:in `apply'
  /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-console-1.9.11/app/controllers/applications_controller.rb:83:in `index'
  /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
  /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in `process_action'
  /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:10:in `process_action'
  /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
  /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:428:in `block (3 levels) in _run__1589524454067321786__process_action__4377660677709943888__callbacks'
  /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_205'
  /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in `around'
  /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in `_callback_around_61'
  /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_205'
  /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:416:in `block (2 levels) in _run__1589524454067321786__process_action__4377660677709943888__callbacks'
  /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_204'
  /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in `around'
  /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in `_callback_around_59'
  /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_204'
  /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:415:in `block in _run__1589524454067321786__process_action__4377660677709943888__callbacks'
  /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_203'
  /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in `around'
  /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in `_callback_around_35'



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

2.0.28

How reproducible:

I assume this is somewhat reproducible but difficult to arrive in this state.  It looks like a destroy was called on the application and left over remnants in the mongo database.  The dns was missing and the destroy on the node was successful.

Steps to Reproduce:
1.  Create an application.
2.  An oo-app-destroy on the node must happen.
3.  The DNS must be missing.
4.  Then attempt a login to the console.  
OR 
1. I assume the error message says that you can remove the framework information from mongo and you will receive this error.  Perform a mongo query and remove the framework information from the database and attempt to login to the console.

Actual results:

User was completely unable to login to the console.

Expected results:

User would be able to access the console and then be able to destroy the application or hide the application entirely.

Additional info:

Another option for this would be to show the application in a greyed out state but still allow the user to login.  This would denote the application is in his account but is unmanageable at this time.

Comment 1 Clayton Coleman 2013-06-06 01:53:30 UTC
Need to defend against missing attributes by specifying all accessed attributes in the schema.

Comment 2 Clayton Coleman 2013-06-10 12:55:50 UTC
*** Bug 972516 has been marked as a duplicate of this bug. ***

Comment 3 Thomas Wiest 2013-06-10 13:44:36 UTC
We're seeing this bug in PROD because of our app create loop checks. It seems that when the console gets the app list back, some of the apps are either half created or half deleted which causes this bug to show.

The problem goes away once the app has been fully created / deleted.

Comment 4 Clayton Coleman 2013-06-12 14:30:33 UTC
Fixed in https://github.com/openshift/origin-server/pull/2814

Comment 5 openshift-github-bot 2013-06-12 16:43:41 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/e06976a7d13d419a38cec2704a857229f95c4d5c
Add framework to the Application schema

Bug 971136

Comment 6 Yujie Zhang 2013-06-13 08:15:52 UTC
Tested on devenv_3355, the my app page can be accessed when there is app which is not fully created (make the dns bad when creating), so verify this bug, thanks.


Note You need to log in before you can comment on or make changes to this bug.