Bug 867232 - Caught code error when access application details page during long time operation of scaling.
Caught code error when access application details page during long time opera...
Status: CLOSED CANTFIX
Product: OpenShift Origin
Classification: Red Hat
Component: Website (Show other bugs)
2.x
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Clayton Coleman
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-17 02:10 EDT by Yujie Zhang
Modified: 2015-05-14 21:15 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-31 01:41:52 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Click the app name from "My Application" page. (76.88 KB, image/png)
2012-10-17 02:10 EDT, Yujie Zhang
no flags Details
Refresh the application details page. (80.58 KB, image/png)
2012-10-17 02:47 EDT, Yujie Zhang
no flags Details

  None (edit)
Description Yujie Zhang 2012-10-17 02:10:45 EDT
Created attachment 628540 [details]
Click the app name from "My Application" page.

Description of problem:

After I scaled up using rest api, before the scale operation finished, I tried to access the application details page, but caught code error.
If I click the app name link from "My Application" page, it will return "LoadError in ApplicationsController#show" error.
If I refresh the app details page directly, it will return "AsyncAware::ThreadTimedOut in Applications Controller#show" error.

For the scale operation usually costs long time, I think we'd better try to deal with the above error to remind user. 

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

How reproducible:always


Steps to Reproduce:
1.Create a scalable application and do scale up/down using rest api
2.Before the scale operation finished, click the application name link to access the application details page
3.Before the scal operation finished, refresh the application page directly
  
Actual results:

After step 2, it will return "LoadError in ApplicationsController#show" error.
After step 3, it will return "AsyncAware::ThreadTimedOut in Applications Controller#show" error.

Expected results:

We'd better to have remind message for user like "we are scaling.....".

Additional info:
Comment 1 Yujie Zhang 2012-10-17 02:47:31 EDT
Created attachment 628551 [details]
Refresh the application details page.
Comment 2 Clayton Coleman 2012-10-17 10:30:00 EDT
The REST API operation should not block the UI retrieving.  It sounds like the calls to /cartridges and /gear_groups for the application are taking too long while a scale operation is going on, which is not acceptable (broker calls should return in <5s 99% of the time, <1s 95% of the time).  Transferring to broker - Dan says there's a possibility (small) that the status check that gear_groups is doing is blocking on the node.
Comment 3 Dan McPherson 2013-01-26 21:43:27 EST
I checked and the gear groups app state isn't blocking.  My guess is the system as a whole (running the site/broker/node scale up) was running slowly with all that going on.  Only cure would be to make everything faster.


I tried to recreate and I see app state is returned in well less than a second.

I, [2013-01-26T21:35:40.979066 #21198]  INFO -- : openshift.rb:736:in `execute_parallel_action' execute_par
allel_action call / request = #<MCollective::RPC::Request:0x000000023daa48
 @action="execute_parallel",
 @agent="openshift",
 @caller="uid=493",
 @data=
  {"domU-12-31-39-16-F8-29"=>
    [{:tag=>"",
      :gear=>"5104786b54cd909e0a000004",
      :job=>
       {:cartridge=>"openshift-origin-node",
        :action=>"app-state-show",
...
I, [2013-01-26T21:35:40.979317 #21198]  INFO -- : openshift.rb:225:in `oo_app_state_show' COMMAND: oo-app-state-show
I, [2013-01-26T21:35:40.981764 #21198]  INFO -- : openshift.rb:225:in `oo_app_state_show' COMMAND: oo-app-state-show
I, [2013-01-26T21:35:40.984287 #21198]  INFO -- : openshift.rb:789:in `execute_parallel_action' execute_parallel_action call - 10 [{:tag=>"", :gear=>"5104786b54cd909e0a000004", :job=>{:cartridge=>"openshift-origin-node", :action=>"app-state-show", :args=>{"--with-app-uuid"=>"5104786b54cd909e0a000004", "--with-container-uuid"=>"5104786b54cd909e0a000004"}}, :result_stdout=>"started", :result_stderr=>"", :result_exit_code=>0}, {:tag=>"", :gear=>"5104795454cd909e0a000056", :job=>{:cartridge=>"openshift-origin-node", :action=>"app-state-show", :args=>{"--with-app-uuid"=>"5104786b54cd909e0a000004", "--with-container-uuid"=>"5104795454cd909e0a000056"}}, :result_stdout=>"started", :result_stderr=>"", :result_exit_code=>0}]

And I wasn't able to see the error.  If you can recreate I would need to see the mcollective and broker logs to figure out what the slow part is.

Passing back to the UI to see if they want to do anything.
Comment 4 Clayton Coleman 2013-01-31 01:41:52 EST
Not yet ready to hack this around.  We have discussed having a specific story to handle this in the console, but for the CLI we're just going to wait.

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