Bug 1008043

Summary: drupal sql errors after 2.0.33 migration.
Product: OpenShift Online Reporter: Wesley Hearn <whearn>
Component: ContainersAssignee: Dan McPherson <dmcphers>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 2.xCC: chunchen, dmcphers, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-19 16:51:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
broker log none

Description Wesley Hearn 2013-09-13 23:55:13 UTC
Description of problem:
After migration for the 2.0.33 release drupal is unable to connect to SQL with the following error:

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1286 Unknown table engine 'InnoDB': SELECT expire, value FROM {semaphore} WHERE name = :name; Array ( [:name] => variable_init ) in lock_may_be_available() (line 167 of /var/lib/openshift/52336d03dbd93cd67e00017c/app-root/data/downloads/drupal-7.23/includes/lock.inc).

Version-Release number of selected component (if applicable):
openshift-origin-cartridge-php-0.9.3-1.el6oso.noarch
openshift-origin-cartridge-mysql-0.8.4-1.el6oso.noarch
rubygem-openshift-origin-node-1.14.7-1.el6oso.noarch
rhc-node-1.14.6-1.el6oso.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Create a drupal application with rhc app create drupal2 cron php-5.3 -k mysql-5 --from-code=https://github.com/openshift/drupal-quickstart.git
2. Migrate from 2.0.32 to 2.0.33
3. Try going to the application

Actual results:
Drupal fails with a HTTP 500 error and it shows SQL connection errors

Expected results:
It to display drupal

Additional info:

Comment 1 Xiaoli Tian 2013-09-16 09:12:32 UTC
Some errors in mysql log:
130916  3:20:13  InnoDB: Initializing buffer pool, size = 16.0M
130916  3:20:13  InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 8388608 bytes!
130916  3:20:13 [ERROR] Plugin 'InnoDB' init function returned error.
130916  3:20:13 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
130916  3:20:13 [Note] Event Scheduler: Loaded 0 events
130916  3:20:13 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.69'  socket: '/var/lib/openshift/5236a5ee41c5cf0aa0000033/mysql//socket/mysql.sock'  port: 3306  Source distribution

Comment 2 Xiaoli Tian 2013-09-16 09:23:37 UTC
Seems related to this change:
 https://github.com/openshift/origin-server/pull/3599/

Comment 3 Xiaoli Tian 2013-09-16 09:29:23 UTC
If change the following line back to 5M in mysql/conf/my.cnf.erb.hidden file and restart the app, the migrated drupal app will be back to normal.

 innodb_log_file_size = <%= ENV['OPENSHIFT_APP_DNS'] == ENV['OPENSHIFT_GEAR_DNS'] ? 5 : 24 %>M

Comment 4 Xiaoli Tian 2013-09-16 10:05:26 UTC
Created attachment 798200 [details]
broker log

If leave the log size unchanged for the existing app, but set the storage engine env, mysql and the app failed to restart after setting it, broker log is attached, not sure if it's a related bug.

[root@ip-10-179-2-148 conf]# rhc env set OPENSHIFT_MYSQL_DEFAULT_STORAGE_ENGINE=innodb -a drupalapp
Setting environment variable(s) ... done
[root@ip-10-179-2-148 conf]# rhc cartridge-restart -c mysql-5.1 -a drupalapp
Restarting mysql-5.1 ... 
Unable to complete the requested operation due to: Failed to correctly execute all parallel operations.
Reference ID: fc96d4a8fb56672dca3bb20b12345b0d

Comment 5 Dan McPherson 2013-09-16 15:27:08 UTC
Fix pushed with:

https://github.com/openshift/origin-server/commit/6b9312228370b54fd26aeadd1721d5f2e70e82f1

Will be in devenv-stage_474

Comment 6 Dan McPherson 2013-09-16 15:27:28 UTC
Fix pushed with:

https://github.com/openshift/origin-server/commit/6b9312228370b54fd26aeadd1721d5f2e70e82f1

Will be in devenv-stage_474

Comment 7 Vojtech Vitek 2013-09-16 16:38:32 UTC
*** Bug 1007779 has been marked as a duplicate of this bug. ***

Comment 8 chunchen 2013-09-17 02:46:42 UTC
It's fixed, verified on devenv_stage_465 to devenv_stage_475.