Bug 1012297 - oo-admin-ctl-app can not remove scaled-up gears with gear_uuid
oo-admin-ctl-app can not remove scaled-up gears with gear_uuid
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Pod (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Ravi Sankar
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-26 04:44 EDT by Qiushui Zhang
Modified: 2015-05-14 20:21 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-17 09:31:38 EDT
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)
log from instance (176.86 KB, application/zip)
2013-09-26 04:44 EDT, Qiushui Zhang
no flags Details

  None (edit)
Description Qiushui Zhang 2013-09-26 04:44:03 EDT
Created attachment 803279 [details]
log from instance

Description of problem:
Scale up an scalable app. Try to remove the scaled gear with "oo-admin-ctl-app -c remove-gear -l qiuzhang@redhat.com -a php1s --gear_uuid 5243ed4cfefcc4095d000014"
. The command returns successfully. But the gear is not removed.

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

How reproducible:
always

Steps to Reproduce:
1. Create an scalable app, with some add-on cartridge
e.g rhc app create php1s php-5.3 mysql-5.1 mongodb-2.2 postgresql-8.4 -s

2. Add disable_auto_scaling marker to the app. Git push the change

3. Scale up the app
curl -k -H "Accept: application/xml" --user qiuzhang@redhat.com:redhat https://ec2-54-226-197-118.compute-1.amazonaws.com/broker/rest/domains/qiuzhang/applications/php1s/events -d event=scale-up -X POST

4. Check the gears
[walter@dhcp-10-238 tmp]$ rhc app show php1s --gears
ID                               State   Cartridges          Size  SSH URL
-------------------------------- ------- ------------------- ----- ------------------------------------------------------------------------------------------
e1a3b550267d11e3a91322000ab93a8e started mongodb-2.2         small e1a3b550267d11e3a91322000ab93a8e@e1a3b550267d11e3a91322000ab93a8e-qiuzhang.dev.rhcloud.com
537523819696914446680064         started postgresql-8.4      small 537523819696914446680064@537523819696914446680064-qiuzhang.dev.rhcloud.com
5243e32ffefcc464f50000df         started php-5.3 haproxy-1.4 small 5243e32ffefcc464f50000df@php1s-qiuzhang.dev.rhcloud.com
5243ed4cfefcc4095d000014         started php-5.3 haproxy-1.4 small 5243ed4cfefcc4095d000014@5243ed4cfefcc4095d000014-qiuzhang.dev.rhcloud.com

5. On instance, try to remove the scaled gear
oo-admin-ctl-app -c remove-gear -l qiuzhang@redhat.com -a php1s --gear_uuid 5243ed4cfefcc4095d000014

Actual results:
The command returns "Success". But if checking the gear list, we will find that the gear is not removed.

walter@dhcp-10-238 tmp]$ rash php1s --gears
ID                               State   Cartridges          Size  SSH URL
-------------------------------- ------- ------------------- ----- ------------------------------------------------------------------------------------------
e1a3b550267d11e3a91322000ab93a8e started mongodb-2.2         small e1a3b550267d11e3a91322000ab93a8e@e1a3b550267d11e3a91322000ab93a8e-qiuzhang.dev.rhcloud.com
537523819696914446680064         started postgresql-8.4      small 537523819696914446680064@537523819696914446680064-qiuzhang.dev.rhcloud.com
5243e32ffefcc464f50000df         started php-5.3 haproxy-1.4 small 5243e32ffefcc464f50000df@php1s-qiuzhang.dev.rhcloud.com
5243ed4cfefcc4095d000014         started php-5.3 haproxy-1.4 small 5243ed4cfefcc4095d000014@5243ed4cfefcc4095d000014-qiuzhang.dev.rhcloud.com


Expected results:
The gear should be removed, since it is not a database gear or the last web gear.

Additional info:
Comment 1 Ravi Sankar 2013-09-26 19:36:06 EDT
Fixed in https://github.com/openshift/origin-server/pull/3716
Comment 2 openshift-github-bot 2013-09-27 20:46:58 EDT
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/b45f4ba794762d8474bc26180b786934b3a44cab
Bug 1012297 - Pass gear_id instead of gear_uuid to application remove_gear()
Comment 3 Qiushui Zhang 2013-09-29 22:22:36 EDT
Tested on devenv_3844.

Now the gear can be removed with "--gear_uuid" option.

[root@ip-10-184-54-37 ~]# oo-admin-ctl-app -c remove-gear -l qiuzhang@redhat.com -a php1s --gear_uuid b3d45364297511e38d2222000ab83625
Success
[root@ip-10-184-54-37 ~]# ll /var/lib/openshift/
total 4
drwxr-x---. 14 root 5248ddbe9a73acc911000007 4096 Sep 29 22:11 5248ddbe9a73acc911000007
-rw-r--r--.  1 root root                        0 Sep 29 22:00 last_access.log
lrwxrwxrwx.  1 root root                       24 Sep 29 22:11 php1s-qiuzhang -> 5248ddbe9a73acc911000007
[root@ip-10-184-54-37 ~]#

Mark the bug as verified.

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