Bug 1250729 - InnoDB settings do not match the defaults on a MySQL cartridge for scaled apps
InnoDB settings do not match the defaults on a MySQL cartridge for scaled apps
Product: OpenShift Online
Classification: Red Hat
Component: Image (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: John W. Lamb
Wenjing Zheng
Depends On:
  Show dependency treegraph
Reported: 2015-08-05 16:34 EDT by Chris Ryan
Modified: 2015-08-06 10:28 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-08-06 10:28:33 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Chris Ryan 2015-08-05 16:34:14 EDT
Description of problem:
When setting the env var OPENSHIFT_MYSQL_DEFAULT_STORAGE_ENGINE=INNODB, the innodb settings are different than the prescribed behavior in:

For example, in the PR, innodb_buffer_pool_size should equal either 16M or 96M, instead the value is reported as 256M. Similarly, in the PR, innodb_log_file_size and innodb_log_buffer_size should equal either 8M or 24M, but instead the value is reported as 76M for both. Lastly, the PR indicates that the default OPENSHIFT_MYSQL_DEFAULT_STORAGE_ENGINE should equal OPENSHIFT_MYSQL_DEFAULT_STORAGE_ENGINE or blank, which it shows blank - however, the default should by MyISAM according to https://bugzilla.redhat.com/show_bug.cgi?id=1002894#c6

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create a scalable app with the mysql cartridge attached
rhc app create ouazhoep php-5.3 -s
rhc cartridge add -a ouazhoep mysql-5.5

rhc env show -a ouazhoep --env OPENSHIFT_MYSQL_DEFAULT_STORAGE_ENGINE

3. Set the env var to INNODB
rhc env set -a ouazhoep --confirm --env OPENSHIFT_MYSQL_DEFAULT_STORAGE_ENGINE=INNODB

4. Restart the mysql cart
rhc cartridge restart mysql-5.5 -a ouazhoep

5. Verify that the INNODB values have been applied:
rhc ssh ouazhoep, run: cat ~/mysql/conf/my.cnf

Actual results:
the default value of OPENSHIFT_MYSQL_DEFAULT_STORAGE_ENGINE is blank
the default mysql values are:
      innodb_buffer_pool_size = 256M
      innodb_log_file_size = 76M
      innodb_log_buffer_size = 76M

Expected results:
the default mysql values are:
      innodb_buffer_pool_size = 96M
      innodb_log_file_size = 24M
      innodb_log_buffer_size = 24M

Additional info:
Related to https://bugzilla.redhat.com/show_bug.cgi?id=1002894#c6
Relevant PR: https://github.com/openshift/origin-server/commit/160dd519f5f07128e7070b2e8264a6d9c381dc0f
Comment 1 John W. Lamb 2015-08-06 10:28:33 EDT
The commit you cite was superseded by this commit just over a month later: https://github.com/openshift/origin-server/commit/f418cf6c1608dff1c896cbd5e78c2f3523ec7b02

The current version can be seen here: https://github.com/openshift/origin-server/blob/master/cartridges/openshift-origin-cartridge-mysql/conf/my.cnf.erb

The behavior you're seeing is as coded for scaled mysql carts. Also note that the value of OPENSHIFT_MYSQL_DEFAULT_STORAGE_ENGINE isn't taken into account when calculating the InnoDB buffer pool, log file and log buffer sizing. Rather, for unscaled apps hardcoded values are used, and for scaled apps the cartridge memory (as reported in OPENSHIFT_GEAR_MEMORY_MB) is used as a basis for calculating the appropriate sizes.

If I've misunderstood you, please reopen the bug, but for now this look like it's working as intended.

Note You need to log in before you can comment on or make changes to this bug.