To sum up: when using the console, don't have the ability to select a gear size for an add-on cart. When add-on carts are restricted in gear size so that the app's gear size isn't allowed, can't add the cart at all. +++ This bug was initially created as a clone of Bug #1150971 +++ Description of problem: Console failed to add restricted gear size cartridge to scalable app with different gear size. When set VALID_GEAR_SIZES_FOR_CARTRIDGE="mysql-5.1|small" in broker.conf. There is no choose button for gear size with mysql-5.1 on website, it use the app's gear size by default, so it failed when add mysql-5.1 to scalable medium size app.The expected action is that mysql-5.1 uses the gear size of ifself. Steps to Reproduce: 1.The user has allowed gear sizes with small and medium. Configure in broker.conf with:VALID_GEAR_SIZES_FOR_CARTRIDGE="mysql-5.1|small" Restart services: # /etc/init.d/openshift-console restart # /etc/init.d/openshift-broker restart 2.Create medium size scalable app on website,eg sphp54. 3.Add mysql-5.1 to the app sphp54 on website. 4.Add mysql-5.1 to the app sphp54 with rhc. Actual results: 2.Succeeded. 3.Failed with info: The cartridge, mysql-5.1, cannot run on a gear with size: medium. Per configuration, the cartridge can only run on the following gear sizes: small. 4. $ rhc cartridge add mysql-5.1 -a sphp54 -g small Adding mysql-5.1 to application 'sphp54' ... done mysql-5.1 (MySQL 5.1) --------------------- Gears: 1 small Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ Database Name: sphp54 Password: Xadr8XbR7-Bv Username: admindY1xGGl MySQL 5.1 database added. Please make note of these credentials: Root User: admindY1xGGl Root Password: Xadr8XbR7-Bv Database Name: sphp54 Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ $ rhc app show sphp54 --gears ID State Cartridges Size SSH URL ------------------------ ------- ------------------- ------ -------------------------------------------------------------------------- 54364c9282611da321000091 started php-5.4 haproxy-1.4 medium 54364c9282611da321000091.com.cn 543657f882611df693000025 started mysql-5.1 small 543657f882611df693000025.com.cn Expected results: 3.Should add mysql-5.1 successfully.
Fixed in https://github.com/openshift/origin-server/pull/5870
Will verify this bug after the code is merged.
Assign it back since the pull request has failed.
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/c2d34126849bb4c3bef936a6e3d07d07f92cb89a Bug 1151548 - adding cartridge must send supported gear size
Move it to on qa since the fix has been merged.
Tested on devenv_5235, with setting VALID_GEAR_SIZES_FOR_CARTRIDGE="mysql-5.1|small" in broker-dev.conf, scalable application still can add mysql-5.1 with medium gear successfully, so verify this bug, thanks.