Bug 1111077 - Failed to stop idled app
Summary: Failed to stop idled app
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 2.x
Assignee: Jhon Honce
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks: 1112445
TreeView+ depends on / blocked
 
Reported: 2014-06-19 08:21 UTC by chunchen
Modified: 2016-09-30 02:15 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1112445 (view as bug list)
Environment:
Last Closed: 2014-07-15 10:31:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description chunchen 2014-06-19 08:21:42 UTC
Description of problem:
After stopping idled app, the app still can be accessed.

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

How reproducible:
always

Steps to Reproduce:
1. Create an app
rhc app create crb9 ruby-1.9 --no-git

2. SSH into instance and idle the app
oo-admin-ctl-gears idlegear UUID

3. Stop the idled app and check the app state
rhc app stop crb9
rhc app show crb9 --state

4. Access the app via browser

5. Check the status of app
rhc app show crb9 --state

Actual results:
at step 3: Cartridge ruby-1.9 is stopped
at step 4: the app can be accessed
at step 5: Cartridge ruby-1.9 is started
 
Expected results:
Should stop idled app successfully

Additional info:

Comment 1 chunchen 2014-06-19 08:45:18 UTC
it also can be reproduced for "oo-admin-ctl-gears stopgear" command.

Comment 2 chunchen 2014-06-24 03:36:13 UTC
Checked on devenv_stage_883, it's reproduced. we missed the scenario before, QE will add cases to cover it.

Comment 3 openshift-github-bot 2014-06-24 16:29:34 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/26053a96424c25b331a135fee4c5424fbbc4c49f
Bug 1111077 - Ensure frontend and state in sync

* When stopping an idled application update http frontend configuration

Comment 4 chunchen 2014-06-25 03:03:34 UTC
Checked on devenv_4909, the issue is not fixed. I find below cases:

1. When trying to stop the idled app, the app will be started, and the app can be accessed;
2. Trying to stop idled app, will take many time about 2 minutes since less 15 seconds for stopping a started app.

Please refer to the following results:

1. Create an app
rhc app create cpl2 perl-5.10 --no-git

2. SSH into instance and idle the app
oo-admin-ctl-gears idlegear UUID

3. Stop the idled app and check the app state
1) time rhc app stop cpl2
2) rhc app show cpl2 --state

4. Access the app via browser


Results:
at step 3:
1) RESULT:
cpl2 stopped

real	1m53.669s
user	0m0.710s
sys	0m0.062s

2) Cartridge perl-5.10 is started

at step 4: the app can be accessed.

Comment 5 openshift-github-bot 2014-06-25 17:19:34 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/bfad149a7bf3625a03fc23c4a50ef1a18efeb9c5
Revert "Bug 1111077 - Ensure frontend and state in sync"

Comment 6 Jhon Honce 2014-06-30 16:11:58 UTC
Fixed in https://github.com/openshift/origin-server/pull/5561

Because of a design flaw, this condition cannot be prevented.  Rather GearStatePlugin of Watchman has been enhanced to set the Http Front Server server to honor the .state file.

Comment 7 openshift-github-bot 2014-06-30 21:50:55 UTC
Commits pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/d3834dff3f59cafac545abb5f02982f82c3ce1a7
Bug 1111077 - Enforce FrontendHttpServer state to match .state file

* Update GearStatePlugin to enforce stopped state on Frontend
  Http Server configuration

https://github.com/openshift/origin-server/commit/8f1389d6ccb843783d263af1817768a1db05feba
Bug 1111077 - Enforce FrontendHttpServer state to match .state file

* Update tests

Comment 8 chunchen 2014-07-01 02:41:29 UTC
All issues have been fixed, verified on devenv_4925, please refer to the following results:

1. Create an app
rhc app create cpl2 perl-5.10 --no-git

2. SSH into instance and idle the app
oo-admin-ctl-gears idlegear UUID

3. Stop the idled app and check the app state
1) time rhc app stop cpl2
2) rhc app show cpl2 --state

4. Access the app via browser


Results:
at step 3:
1) RESULT:
cpl2 stopped
real	0m5.006s
user	0m0.703s
sys	0m0.052s

2) Cartridge perl-5.10 is stopped

at step 4: the app can NOT be accessed and get 503 page.


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