Hide Forgot
Description of problem: Create scalable app with database embedded, try to remove database gears through oo-admin-ctl-app and it's removed successfully. Version-Release number of selected component (if applicable): fork_ami_origin_broker_114_954 How reproducible: always Steps to Reproduce: 1.create scalable app with database imbedded. rhc app create appname php-5.3 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 Actual results: Step 3 finished successfully. 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: https://bugzilla.redhat.com/show_bug.cgi?id=998355
Removing the [fork] tag from the title as this code is now merged into master. Also, marking UpcomingRelease since this belongs to 2.0.37.
Fixed in https://github.com/openshift/origin-server/pull/4262
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/cdd26af507c9a8580a701658fa061e0846816c5a Bug 1034571 - Fix oo-admin-ctl-app script: 'remove-gear' option will not remove database gears
Verified on devenv_4081. The head web gear and database gears will not be removed. # rhc app show phps --gears ID State Cartridges Size SSH URL -------------------------------- ------- ------------------- ----- -------------------------------------------------------------------------------------- 899463612020411894595584 started mysql-5.1 small 899463612020411894595584.rhcloud.com 25fa3bfc580611e384a512313d2f5d14 started mongodb-2.2 small 25fa3bfc580611e384a512313d2f5d14.rhcloud.com 25faa132580611e384a512313d2f5d14 started postgresql-9.2 small 25faa132580611e384a512313d2f5d14.rhcloud.com 5296fd261333d38856000153 started php-5.3 haproxy-1.4 small 5296fd261333d38856000153.rhcloud.com 5296fe001333d30a6500000b started php-5.3 haproxy-1.4 small 5296fe001333d30a6500000b.rhcloud.com 132839267040436156366848 started php-5.3 haproxy-1.4 small 132839267040436156366848.rhcloud.com 5296fe001333d30a6500000c started php-5.3 haproxy-1.4 small 5296fe001333d30a6500000c.rhcloud.com # oo-admin-ctl-app -l lxia -a phps -c remove-gear --gear_uuid 899463612020411894595584 Gear 899463612020411894595584 cannot be removed. You need to remove cartridge mysql-5.1. # oo-admin-ctl-app -l lxia -a phps -c remove-gear --gear_uuid 25fa3bfc580611e384a512313d2f5d14 Gear 25fa3bfc580611e384a512313d2f5d14 cannot be removed. You need to remove cartridge mongodb-2.2. # oo-admin-ctl-app -l lxia -a phps -c remove-gear --gear_uuid 25faa132580611e384a512313d2f5d14 Gear 25faa132580611e384a512313d2f5d14 cannot be removed. You need to remove cartridge postgresql-9.2. # oo-admin-ctl-app -l lxia -a phps -c remove-gear --gear_uuid 5296fd261333d38856000153 Gear 5296fd261333d38856000153 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 phps -c remove-gear --gear_uuid 5296fe001333d30a6500000b Success # oo-admin-ctl-app -l lxia -a phps -c remove-gear --gear_uuid 132839267040436156366848 Success # rhc app show phps --gears ID State Cartridges Size SSH URL -------------------------------- ------- ------------------- ----- -------------------------------------------------------------------------------------- 899463612020411894595584 started mysql-5.1 small 899463612020411894595584.rhcloud.com 25fa3bfc580611e384a512313d2f5d14 started mongodb-2.2 small 25fa3bfc580611e384a512313d2f5d14.rhcloud.com 25faa132580611e384a512313d2f5d14 started postgresql-9.2 small 25faa132580611e384a512313d2f5d14.rhcloud.com 5296fd261333d38856000153 started php-5.3 haproxy-1.4 small 5296fd261333d38856000153.rhcloud.com 5296fe001333d30a6500000c started php-5.3 haproxy-1.4 small 5296fe001333d30a6500000c.rhcloud.com