Description of problem: Create scalable app with database imbedded, try to remove database gears through oo-admin-ctl-app and it's removed successfully. Version-Release number of selected component (if applicable): devenv_3672 How reproducible: always Steps to Reproduce: 1.create scalable app with database imbedded. rhc app create appname jbossews-2.0 mysql-5.1 mongodb-2.2 postgresql-9.2 -s 2.check the gears in the app rhc app show appname --gears 3.try to remove the db gear via oo-admin-ctl-app oo-admin-ctl-app -l user -a appname -c remove-gear --gear_uuid <uuid_of_mysql> oo-admin-ctl-app -l user -a appname -c remove-gear --gear_uuid <uuid_of_mongodb> oo-admin-ctl-app -l user -a appname -c remove-gear --gear_uuid <uuid_of_postgresql> 4.check the gears in the app rhc app show appname --gears 5.check the app rhc app show appname Actual results: Step 3 finished successfully. Step 5 still show the db info. Expected results: Step 3 should be failed to remove and get messages like below: Gear <uuid> hosts singleton components within its group instance. You cannot remove it. You can either remove the cartridge or delete the application. Additional info:
The tool and underlying logic are in the broker.
Recent changes for HA resulted in this change.
Fixed with pull request https://github.com/openshift/origin-server/pull/3423
Reproduced on devenv_3680. Database gears still can be removed. See steps and results below: [root@ip-10-204-134-218 ~]# rhc app show appname --gears ID State Cartridges Size SSH URL -------------------------------- ------- ------------------------ ----- -------------------------------------------------------------------------------------- f64494fc0a0811e3ba6612313b0a852c started mysql-5.1 small f64494fc0a0811e3ba6612313b0a852c.rhcloud.com 768029664124824480382976 started mongodb-2.2 small 768029664124824480382976.rhcloud.com 5214251f246e420729000001 started postgresql-9.2 small 5214251f246e420729000001.rhcloud.com f58521f80a0811e3ba6612313b0a852c started jbossews-2.0 haproxy-1.4 small f58521f80a0811e3ba6612313b0a852c.rhcloud.com [root@ip-10-204-134-218 ~]# oo-admin-ctl-app -l lxia -a appname -c remove-gear --gear_uuid f64494fc0a0811e3ba6612313b0a852c Success [root@ip-10-204-134-218 ~]# oo-admin-ctl-app -l lxia -a appname -c remove-gear --gear_uuid 768029664124824480382976 Success [root@ip-10-204-134-218 ~]# oo-admin-ctl-app -l lxia -a appname -c remove-gear --gear_uuid 5214251f246e420729000001 Success [root@ip-10-204-134-218 ~]# oo-admin-ctl-app -l lxia -a appname -c remove-gear --gear_uuid f58521f80a0811e3ba6612313b0a852c Gear f58521f80a0811e3ba6612313b0a852c hosts sparse components within its group instance. You cannot remove it. You can either remove the cartridge or delete the application.
Db cartridges may or may not be sparse carts by definition. Including checks for last gear of the group instance. Fixed with https://github.com/openshift/origin-server/pull/3447
Verified on devenv_3683, it has been fixed. Steps and results: # rhc app show jbossews2s --gears ID State Cartridges Size SSH URL -------------------------------- ------- ------------------------ ----- -------------------------------------------------------------------------------------- 474936161729949510664192 started mysql-5.1 small 474936161729949510664192.rhcloud.com ac3bafe60ad311e3b0d412313d08bd61 started postgresql-9.2 small ac3bafe60ad311e3b0d412313d08bd61.rhcloud.com ac3e41700ad311e3b0d412313d08bd61 started mongodb-2.2 small ac3e41700ad311e3b0d412313d08bd61.rhcloud.com abca29a20ad311e3b0d412313d08bd61 started jbossews-2.0 haproxy-1.4 small abca29a20ad311e3b0d412313d08bd61.rhcloud.com 482640281228607802572800 started jbossews-2.0 haproxy-1.4 small 482640281228607802572800.rhcloud.com e467776e0ad411e3b0d412313d08bd61 started jbossews-2.0 haproxy-1.4 small e467776e0ad411e3b0d412313d08bd61.rhcloud.com # oo-admin-ctl-app -l lxia -a jbossews2s -c remove-gear --gear_uuid 474936161729949510664192 Gear 474936161729949510664192 hosts sparse components within its group instance. You cannot remove it. You can either remove the cartridge or delete the application. # oo-admin-ctl-app -l lxia -a jbossews2s -c remove-gear --gear_uuid ac3bafe60ad311e3b0d412313d08bd61 Gear ac3bafe60ad311e3b0d412313d08bd61 hosts sparse components within its group instance. You cannot remove it. You can either remove the cartridge or delete the application. # oo-admin-ctl-app -l lxia -a jbossews2s -c remove-gear --gear_uuid ac3e41700ad311e3b0d412313d08bd61 Gear ac3e41700ad311e3b0d412313d08bd61 hosts sparse components within its group instance. You cannot remove it. You can either remove the cartridge or delete the application. # oo-admin-ctl-app -l lxia -a jbossews2s -c remove-gear --gear_uuid abca29a20ad311e3b0d412313d08bd61 Gear abca29a20ad311e3b0d412313d08bd61 hosts sparse components within its group instance. You cannot remove it. You can either remove the cartridge or delete the application. # oo-admin-ctl-app -l lxia -a jbossews2s -c remove-gear --gear_uuid 482640281228607802572800 Success # oo-admin-ctl-app -l lxia -a jbossews2s -c remove-gear --gear_uuid e467776e0ad411e3b0d412313d08bd61 Success # rhc app show jbossews2s --gears ID State Cartridges Size SSH URL -------------------------------- ------- ------------------------ ----- -------------------------------------------------------------------------------------- 474936161729949510664192 started mysql-5.1 small 474936161729949510664192.rhcloud.com ac3bafe60ad311e3b0d412313d08bd61 started postgresql-9.2 small ac3bafe60ad311e3b0d412313d08bd61.rhcloud.com ac3e41700ad311e3b0d412313d08bd61 started mongodb-2.2 small ac3e41700ad311e3b0d412313d08bd61.rhcloud.com abca29a20ad311e3b0d412313d08bd61 started jbossews-2.0 haproxy-1.4 small abca29a20ad311e3b0d412313d08bd61.rhcloud.com