Description of problem: Creating a magento app from the quickstart works fine, but once scaling is enabled it fails. How reproducible: Steps to Reproduce: 1. rhc app create MYAPP php-5.3 mysql-5.1 --from-code=https://github.com/openshift/magento-example -s Actual results: The initial build for the application failed: Shell command '/sbin/runuser -s /bin/sh 520a3c694382ec17c5000595 -c "exec /usr/bin/runcon 'unconfined_u:system_r:openshift_t:s0:c4,c972' /bin/sh -c \"gear postreceive >> /tmp/initial-build.log 2>&1\""' returned an error. rc=255 .Last 10 kB of build output: httpd (no pid file) not running Starting application essence Extracting sample data Poulating database ERROR 2002 (HY000): Can't connect to local MySQL server through socket '' (111) An error occurred executing 'gear postreceive' (exit code: 1) Error message: Failed to execute action hook 'deploy' for 520a3c694382ec17c5000595 application MYAPP Expected results: Creating a scalable magento app Additional info:
It seems that this Quickstart needs OPENSHIFT_MYSQL_DB_SOCKET to be set, but this appears to be unset in a scaled app
Thanks @David! I attempted to modify the quickstart to deploy on a single-gear scalable app by updating a couple of lines: 1) Update: mysql --socket=${OPENSHIFT_MYSQL_DB_SOCKET} -u${OPENSHIFT_MYSQL_DB_USERNAME} -p${OPENSHIFT_MYSQL_DB_PASSWORD} ${OPENSHIFT_APP_NAME} < ${OPENSHIFT_TMP_DIR}magento-sample-data-1.6.1.0/magento_sample_data_for_1.6.1.0.sql To: mysql -u${OPENSHIFT_MYSQL_DB_USERNAME} -p${OPENSHIFT_MYSQL_DB_PASSWORD} -h${OPENSHIFT_MYSQL_DB_HOST} -P${OPENSHIFT_MYSQL_DB_PORT} ${OPENSHIFT_APP_NAME} < ${OPENSHIFT_TMP_DIR}magento-sample-data-1.6.1.0/magento_sample_data_for_1.6.1.0.sql 2) Update: --db_host "$OPENSHIFT_MYSQL_DB_HOST" \ To: --db_host "$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT" \ That got the quickstart to deploy, but on scale-up, it errors out due to the deploy hook being triggered. The quickstart needs to be revisited for scalable apps.
I've fixed it so you can at least create a scalable app now so if you want your db on a separate gear. As far as actually scaling, I have made it work if you git push before you scale up and anything you change in media is oh the head gear. So if you: create app change whatever you want in app-root/data/media or app-root/data/local.xml git push then scale up It will be synced to all the gears. You can scale up all you want after that but in order to change anything in media you would have to git push again. So basically scaling up is still for experts/limited use cases.
Verified on devenv_4509 Now could create a scalable magento app successfully. Change something in app-root/data/local.xml and git push,then scale up.Could scale up successfully.