Bug 1105107 - Incorrect PostgreSQL Version in Cron on Scalable Apps
Summary: Incorrect PostgreSQL Version in Cron on Scalable Apps
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: ImageStreams
Version: 2.1.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Brenton Leanhardt
QA Contact: libra bugs
URL:
Whiteboard:
Depends On: 1086807
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-05 12:00 UTC by Brenton Leanhardt
Modified: 2014-08-26 13:52 UTC (History)
8 users (show)

Fixed In Version: openshift-origin-cartridge-mysql-1.23.4.4-1.el6op, openshift-origin-cartridge-postgresql-1.23.3.4-1.el6op
Doc Type: Bug Fix
Doc Text:
A bug in the MySQL and PostgreSQL cartridges prevented the PATH from being set correctly. As a result, the wrong versions of executables could be loaded. This bug fix updates the publish-ld-library-path-info hook to correctly set the PATH. A cartridge upgrade is required after applying this fix.
Clone Of: 1086807
Environment:
Last Closed: 2014-08-26 13:52:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1095 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.1.5 bug fix and enhancement update 2014-08-26 17:51:34 UTC

Description Brenton Leanhardt 2014-06-05 12:00:10 UTC
+++ This bug was initially created as a clone of Bug #1086807 +++

Description of problem:
When checking the version number of postgresql via cron, an incorrect version is shown for scalable apps. This does not appear to affect non-scalable apps, and works correctly there.

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


How reproducible:
Always

Steps to Reproduce:
1. Create a scalable application
rhc create-app testapp1 php-5.4 -s
2. Embed postgresql-9.2 and cron-1.4
rhc cartridge add cron-1.4 -a testapp1
rhc cartridge add postgresql-9.2 -a testapp1
3. Create a script to run in cron
cd testapp1
touch .openshift/cron/minutely/version.sh
echo "psql --version" >> .openshift/cron/minutely/version.sh
git add . && git commit -m "Test." && git push
4. Check the cron log after a few minutes
rhc ssh testapp1
cat $OPENSHIFT_LOG_DIR/cron_minutely.log


Actual results:
the log shows:
psql (PostgreSQL) 8.4.20

Expected results:
psql (PostgreSQL) 9.2

Additional info:
This may be related to: https://bugzilla.redhat.com/show_bug.cgi?id=1076626

--- Additional comment from Ma xiaoqiang on 2014-04-22 02:26:37 EDT ---

This issue exists on puddle [2.1/2014-04-17.2]

--- Additional comment from Michal Fojtik on 2014-06-04 04:30:29 EDT ---

https://github.com/openshift/origin-server/pull/5256

--- Additional comment from openshift-github-bot on 2014-06-04 18:36:17 EDT ---

Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/603f44698df3a65d40be5d529611617edbbfd08e
Bug 1086807 - Advertise $PATH for scaled SCL based cartridges

--- Additional comment from Wenjing Zheng on 2014-06-05 04:21:40 EDT ---

Verified on devenv_4843 and the version displays well for postgresql-9.2 in scalable app, below is the test result:
https://tcms.engineering.redhat.com/run/144946/

Thu Jun  5 08:06:03 EDT 2014: START minutely cron run
__________________________________________________________________________
/var/lib/openshift/53905c24ad2cc3a3f90004df/app-root/runtime/repo//.openshift/cron/minutely/version.sh:
mysql  Ver 14.14 Distrib 5.5.37, for Linux (x86_64) using readline 5.1
psql (PostgreSQL) 9.2.8
__________________________________________________________________________

Comment 1 Brenton Leanhardt 2014-08-01 13:15:38 UTC
Upstream commit:

commit 603f44698df3a65d40be5d529611617edbbfd08e
Author: Michal Fojtik <mfojtik>
Date:   Mon Apr 14 11:49:25 2014 +0200

    Bug 1086807 - Advertise $PATH for scaled SCL based cartridges

Comment 4 Gaoyun Pei 2014-08-04 05:43:05 UTC
verify this bug with openshift-origin-cartridge-mysql-1.23.4.4-1.el6op.noarch and openshift-origin-cartridge-postgresql-1.23.3.4-1.el6op.noarch

1. Create a scalable application

2. Embed postgresql-9.2, mysql-5.5 and cron-1.4

3. Create a script to run in cron
touch .openshift/cron/minutely/version.sh
echo "psql --version" >> .openshift/cron/minutely/version.sh
echo "mysql --version" >> .openshift/cron/minutely/version.sh
git add . && git commit -m "Test." && git push

4. Check the cron log after a few minutes. ssh into the app, cat $OPENSHIFT_LOG_DIR/cron_minutely.log


[app3-666.ose21z-0804.gpei.com 53df196ff2268dc7f4000087]\> cat $OPENSHIFT_LOG_DIR/cron_minutely.log
__________________________________________________________________________
Mon Aug  4 01:39:05 EDT 2014: START minutely cron run
__________________________________________________________________________
/var/lib/openshift/53df196ff2268dc7f4000087/app-root/runtime/repo//.openshift/cron/minutely/version.sh:
psql (PostgreSQL) 9.2.8
mysql  Ver 14.14 Distrib 5.5.37, for Linux (x86_64) using readline 5.1
__________________________________________________________________________
Mon Aug  4 01:39:05 EDT 2014: END minutely cron run - status=0

Comment 6 errata-xmlrpc 2014-08-26 13:52:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1095.html


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