Description of problem: While looking in to merging upstream sprint 54 in to OSE 2.2 I noticed the following code in the mysql cartridge upgrade script: if [[ $new_cart_version == "0.2.16" ]]; then set_env_var 'OPENSHIFT_MYSQL_VERSION' $mysql_version $env_dir fi The problem with that is that OSE 2.1 never shipped 0.2.16 and OSE 2.2 shipped 0.2.17. As part of the OSE 2.1->2.2 upgrade process gears will go from whatever OSE 2.1 cartridge version was installed directly to 0.2.17. That means that if statement will never be true for OSE. I'm planning to fix this by changing the code to something like this: if version_lt $curr $SPRINT_54; then if [[ ! -f ${OPENSHIFT_MYSQL_DIR}/env/OPENSHIFT_MYSQL_VERSION ]]; then # There is now a VERSION variable to allow the detection of 5.5 # in rhcsh. set_env_var 'OPENSHIFT_MYSQL_VERSION' $mysql_version "${OPENSHIFT_MYSQL_DIR}/env" fi fi Technically it's safe to run set_env_var over again but I thought this shows our intention of only touching gears that have the problem. This will of course be a compatible upgrade.
For QE, please qa_ack this bug if you can verify that the 2.1->2.2 upgrade doesn't indeed fail to create this environment variable.
Check on puddle [2.2.z/2014-12-08.2] 1. install the env for ose-2.1 2. create apps #rhc app create phps php-5.4 mysql-5.1 -s #rhc app create phpapp php-5.4 mysql-5.5 3. Check the env in the mysql gears There is no 'OPENSHIFT_MYSQL_VERSION' env 4. Upgrade the env 5. Check the env in the mysql gears [5486983b87692b817500000a-xiaom.ose-21.com.cn 5486983b87692b817500000a]\> env|grep -i mysq; <--snip--> OPENSHIFT_MYSQL_VERSION=5.1 [phpapp-xiaom.ose-21.com.cn 5486987087692bcb59000001]\> env|grep -i mysql <--snip--> OPENSHIFT_MYSQL_VERSION=5.5
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-0019.html