Hide Forgot
Description of problem: With a scalable app, after configuring e.g. keep-deployments and scaling up, the new child gears are missing e.g. ~/.env/OPENSHIFT_KEEP_DEPLOYMENTS Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. Create a scalable app 2. Set keep deployments (rhc app configure -a <app name> --keep-deployments 5) 3. Verify /var/lib/openshift/$gear_for_app/.env/OPENSHIFT_KEEP_DEPLOYMENTS exists 3. Scale up to 2 (rhc cartridge scale -a <app name> -c <cartridge> 2) 4. Verify /var/lib/openshift/$child_gear/.env/OPENSHIFT_KEEP_DEPLOYMENTS exists Actual results: In step 4, you get file not found Expected results: In step 4, the file exists Additional info: [root@ip-10-80-234-239 ~]# rhc app create ps2 php-5.3 -s --no-git Application Options ------------------- Domain: agoldste Cartridges: php-5.3 Gear Size: default Scaling: yes Creating application 'ps2' ... done Waiting for your DNS name to be available ... done Your application 'ps2' is now available. URL: http://ps2-agoldste.dev.rhcloud.com/ SSH to: 52a0ad19254d044042000086.rhcloud.com Git remote: ssh://52a0ad19254d044042000086.rhcloud.com/~/git/ps2.git/ Run 'rhc show-app ps2' for more details about your app. [root@ip-10-80-234-239 ~]# rhc app configure -a ps2 --keep-deployments 5 Configuring application 'ps2' ... done ps2 @ http://ps2-agoldste.dev.rhcloud.com/ (uuid: 52a0ad19254d044042000086) --------------------------------------------------------------------------- Deployment: auto (on git push) Keep Deployments: 5 Deployment Type: git Deployment Branch: master Your application 'ps2' is now configured as listed above. Use 'rhc show-app ps2 --configuration' to check your configuration values any time. [root@ip-10-80-234-239 ~]# cat /var/lib/openshift/ps2-agoldste/.env/OPENSHIFT_KEEP_DEPLOYMENTS 5 [root@ip-10-80-234-239 ~]# rhc cartridge scale -a ps2 php-5.3 2 This operation will run until the application is at the minimum scale and may take several minutes. Setting scale range for php-5.3 ... done php-5.3 (PHP 5.3) ----------------- Scaling: x2 (minimum: 2, maximum: 2) on small gears [root@ip-10-80-234-239 ~]# rhc app show ps2 --gears ID State Cartridges Size SSH URL -------------------------------- ------- ------------------- ----- ------------------------------------------------------------------------------------------ 52a0ad19254d044042000086 started php-5.3 haproxy-1.4 small 52a0ad19254d044042000086.rhcloud.com 790c96fc5dcc11e3848812313d1cdd01 started php-5.3 haproxy-1.4 small 790c96fc5dcc11e3848812313d1cdd01.rhcloud.com [root@ip-10-80-234-239 ~]# cat /var/lib/openshift/ps2-agoldste/.env/OPENSHIFT_KEEP_DEPLOYMENTS 5 [root@ip-10-80-234-239 ~]# cat /var/lib/openshift/790c96fc5dcc11e3848812313d1cdd01/.env/OPENSHIFT_KEEP_DEPLOYMENTS cat: /var/lib/openshift/790c96fc5dcc11e3848812313d1cdd01/.env/OPENSHIFT_KEEP_DEPLOYMENTS: No such file or directory
Fixed with --> https://github.com/openshift/origin-server/pull/4292 This fix ensures that any new gear that gets created gets the existing application configuration. New gears are created in the following cases: 1. Adding a db gear on a scalable app. 2. scaling up the cartridge. 3. adding a new haproxy gear for a multi-ha setup
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/0f547b9f35123f89ed825693b5c4e5483584a10f Fix for bug 1038730
Verified on devenv_4102 Steps: 1. Create a scalable app 2. Set the number of keep deployments 3. Scale up this app 4. ssh into both gears and check the value of env $OPENSHIFT_KEEP_DEPLOYMENTS 5. Add db gear and repeat step 5 Result: The env $OPENSHIFT_KEEP_DEPLOYMENTS has the correct value in the new gears