Bug 1123587
| Summary: | Openshift overwrites data/postgresql.conf during restart, destroying Locale and Formatting configuration | |||
|---|---|---|---|---|
| Product: | OpenShift Online | Reporter: | Jurgen <jurgencuiza> | |
| Component: | Image | Assignee: | Michal Fojtik <mfojtik> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> | |
| Severity: | unspecified | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 2.x | CC: | bmeng, chunchen, jdetiber, jokerman, mfojtik, mmccomas | |
| Target Milestone: | --- | Keywords: | UpcomingRelease | |
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | Bug Fix | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1123850 (view as bug list) | Environment: | ||
| Last Closed: | 2015-02-18 16:50:28 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: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1123850 | |||
|
Description
Jurgen
2014-07-26 22:43:56 UTC
Thanks for reporting this! I don't think customizing the data/postgresql.conf is something we want to support or encourage users to do. If you want to set the local vars, we should allow this via the specialized env variables, like: OPENSHIFT_POSTGRESQL_LOCALE="es_BO.utf8" I'm going to fix this and I will update the bug with the actual variable name. Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/0cdd022f6316d7597f54620d2805f23b8e866315 Bug 1123587 - Added OPENSHIFT_POSTGRESQL_LOCALE environment variable Thank for the quick response. I see that now i can configure local vars via env variables, but the datestyle is missing, would you please allow to change this var too, this variable is important to run some applications with other date styles like mine, for example i need to change: datestyle = 'iso, mdy' to datestyle = 'iso, dmy' or my application won't work. Checked on devenv_5020, the local vars can be configured via env variable, but the datestyle var still can be overwritten when restarting, so assign it back. For configuring local vars teting results: 1. Create an app with postgresql rhc app create cas jbossas-7 postgresql-9 --no-git 2. Set the env var rhc env-set OPENSHIFT_POSTGRESQL_LOCALE="zh_CN.utf8" -a cas 3. SSH into the app and check the local vars in ~/postgresqldata/postgresql.conf Results: the values take effect at step 2. I have made a mistake in the testing results steps in Comment 5, the mistake is i have restarted the postgresql between step 2 and step 3, but missed pasting the restarted step, sorry for any confused and please refer to the below total testing steps: For configuring local vars teting results: 1. Create an app with postgresql rhc app create cas jbossas-7 postgresql-9 --no-git 2. Set the env var for postgresql rhc env-set OPENSHIFT_POSTGRESQL_LOCALE="zh_CN.utf8" -a cas 3. Restart postgresql database rhc cartridge restart postgresql-9 -a cas 4. SSH into the app and check the local vars in ~/postgresqldata/postgresql.conf Results: the values take effect at step 2. Should be fixed here: https://github.com/openshift/origin-server/pull/5682 There is a new ENV variable: OPENSHIFT_POSTGRESQL_DATESTYLE as the format is not the same as locale. Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/d73cdebe4d5af47431991ca94e8481af2740c790 Bug 1123587 - Added OPENSHIFT_POSTGRESQL_DATESTYLE env var Checked on devenv_5039, the OPENSHIFT_POSTGRESQL_DATESTYLE var settings have taken effect for postgresql 9.2, but not for postgresql-8.4; from the PR, the changed codes only for postgresql 9.2, please help to have a look. Chunchen: Good catch! I'm sorry about that, I completely overseen the 8.2 configuration file. PR: https://github.com/openshift/origin-server/pull/5687 Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/91f2cffaed7a508764c009fc587c8e5b43061767 Bug 1123587 - Updated postgresql-8.2 to support OPENSHIFT_POSTGRESQL_DATESTYLE It's fixed, verified on devenv_5041, the OPENSHIFT_POSTGRESQL_DATESTYLE var also takes effect for postgresql-8.4 for now, so mark it as VERIFIED. Looks like this shipped with Sprint 50, any reason it isn't Closed? |