Bug 1140544

Summary: "oo-admin-ctl-gears stopgear" failed to stop idled gear
Product: OpenShift Online Reporter: Liang Xia <lxia>
Component: ContainersAssignee: Jhon Honce <jhonce>
Status: CLOSED NOTABUG QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 2.xCC: dmcphers, jokerman, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1160934 (view as bug list) Environment:
Last Closed: 2015-06-12 03:12:55 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:
Bug Depends On:    
Bug Blocks: 1160934    

Description Liang Xia 2014-09-11 08:25:54 UTC
Description of problem:
Using "oo-admin-ctl-gears stopgear" to stop a gear which is in idle state,
while the output show stopped the gear successfully, the gear is still in idle state actually.

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

How reproducible:
always

Steps to Reproduce:
1.Create an app of any type.
  # rhc create-app appname <cart>
2.Idle the gear of above app.
  # oo-admin-ctl-gears idlegear <gear-uuid>
3.Check the app/gear state
  # rhc show-app appname --state
  # oo-devel-node app-state-show -c <gear-uuid>
4.Stop the gear
  # oo-admin-ctl-gears stopgear <gear-uuid>
5.Check the app/gear state
  # rhc show-app appname --state
  # oo-devel-node app-state-show -c <gear-uuid>

Actual results:
Step 3:
# rhc app show diy --state
Cartridge diy-0.1 is idle
# oo-devel-node app-state-show -c 541176aa96a860a03d000543
idle

Step 4:
# oo-admin-ctl-gears stopgear 541176aa96a860a03d000543
Stopping gear 541176aa96a860a03d000543 ... [  OK ]

Step 5:
# rhc app show diy --state
Cartridge diy-0.1 is idle
# oo-devel-node app-state-show -c 541176aa96a860a03d000543
idle

Expected results:
The gear should be stopped after step 4.

Additional info:
Using "rhc stop-app" to stop an app whose gear in idle state, then the gear will be show stopped.

Comment 1 Dan McPherson 2015-06-12 03:12:55 UTC
This actually seems correct.  An admin requesting an idle app to stop shouldn't remove it from idle.  Since idle it stopped + a flag to restart by request.  I am closing this bug but feel free to reopen if you still disagree.