Bug 1045661 - Some configurations on mysql/conf/my.cnf file, but after restarting the gear, the configuration is lost.
Summary: Some configurations on mysql/conf/my.cnf file, but after restarting the gear,...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Image
Version: 2.x
Hardware: All
OS: All
unspecified
medium
Target Milestone: ---
: ---
Assignee: Jakub Hadvig
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-21 00:25 UTC by Roberto
Modified: 2015-05-15 00:36 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-30 00:54:07 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Roberto 2013-12-21 00:25:02 UTC
Description of problem:

In a Mysql Cartridge I can configure the timezone on mysql/conf/my.cnf file, but after restarting the gear, the configuration is lost.

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

Mysql cartridge

How reproducible:

Steps to Reproduce:
1. Configure timezone on mysql/conf/my.cnf file from Mysql Cartridge
2. Restart the gear using gear restart
3. The configuration is lost

Actual results:

The timezone value, is not available as env varialbe, so on cartridge restart the manual configuration is lost.

Expected results:

Timezone value can be configured by an env variable, something like "rhc env set OPENSHIFT_MYSQL_TIMEZONE=-06:00"

Additional info:

Comment 1 Jakub Hadvig 2014-01-08 17:02:06 UTC
Hi Roberto,
thank you for the report.
I had add the OPENSHIFT_MYSQL_TIMEZONE, so now when you use:

rhc set-env -a a OPENSHIFT_MYSQL_TIMEZONE='+06:00'

it will set the default server timezone and after you restart the gear, the value is preserved. 

I had create a PR for this
https://github.com/openshift/origin-server/pull/4431
Once the PR is merged, the new release of openshift-online will have this functionality.

-Jakub

Comment 2 chunchen 2014-01-10 05:56:42 UTC
It's fixed on devenv_4204, check it with mysql embedded into non-scaled and scaled application, please refer to the following results:

1. For non-scaled app with mysql
1) Create a non-scaled app with mysql
rhc app create redmine9 ruby-1.9 mysql-5.1
2) Add the OPENSHIFT_MYSQL_TIMEZONE variable
rhc set-env -a a OPENSHIFT_MYSQL_TIMEZONE='+06:00' -a redmine9
3) Restart the app
rhc app restart redmine9
4) Check the variable
$ rhc list-env -a redmine9
OPENSHIFT_MYSQL_TIMEZONE=+06:00

1. For scaled app with mysql
1) Create a non-scaled app with mysql
rhc app create cphps php-5.4 mysql-5.5 -s --no-git
2) Add the OPENSHIFT_MYSQL_TIMEZONE variable
rhc set-env -a a OPENSHIFT_MYSQL_TIMEZONE='+06:00' -a cphps
3) Restart mysql cart and this app
rhc cartridge restart mysql-5.5 -a cphps
rhc app restart cphps
4) Check the variable
$ rhc ssh cphps --gear 'env | grep TIMEZONE | grep -v grep'
[52cf881a678cc086c400002b php-5.4+haproxy-1.4] OPENSHIFT_MYSQL_TIMEZONE=+06:00
[52cf881a678cc0092f000002 mysql-5.5] OPENSHIFT_MYSQL_TIMEZONE=+06:00


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