Bug 983190 - On a scaled app, the primary gear should be able to use psql 9.2 to connect to the remote server
Summary: On a scaled app, the primary gear should be able to use psql 9.2 to connect t...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Hiro Asari
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-10 16:36 UTC by Hiro Asari
Modified: 2015-05-14 23:23 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-22 15:23:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Hiro Asari 2013-07-10 16:36:44 UTC
Description of problem:
On the primary gear of a scaled app with PostgreSQL 9.2 cart, 'psql' invokes /usr/bin/psql, which is 8.4.

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

How reproducible:
Always

Steps to Reproduce:
1. app create rack ruby-1.9 postgresql-9.2 -s
2. app ssh rack
3. psql --version

Actual results:
[rack-fooooooooooo.dev.rhcloud.com 51dd8448e412c47550000001]\> psql
psql (8.4.13, server 9.2.4)
WARNING: psql version 8.4, server version 9.2.
         Some psql features might not work.
Type "help" for help.


Expected results:

[51dd8449e412c47550000002-fooooooooooo.dev.rhcloud.com 51dd8449e412c47550000002]\> psql
psql (9.2.4)
Type "help" for help.



Additional info:

Comment 1 Hiro Asari 2013-07-10 16:41:03 UTC
Since the normal user on the primary gear cannot inquire 'scl' whether or not a certain version of software is installed, we'll need to inject logic in the psql() wrapper depending on the value of $OPENSHIFT_POSTGRESQL_VERSION, which is not published at the moment.

Comment 3 openshift-github-bot 2013-07-11 15:29:42 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/99c5e17c9fcc38b57be6b07a2ee94fca69a86cdf
Bug 983190

Publish $OPENSHIFT_POSTGRESQL_VERSION to all gears, and depending on
whether `scl` is available, set up the `psql()` wrapper in `rhcsh`
appropriately.

Comment 4 Yan Du 2013-07-12 03:14:40 UTC
verfied on devenv_3490
rhc-1.11.4

steps:

$rhc app create rack ruby-1.9 postgresql-9.2 -s
$rhc app ssh rack

[rack-111.dev.rhcloud.com f4819c4cea9f11e2a0d512313d1ff52a]\> psql --version
psql (PostgreSQL) 9.2.4

[rack-111.dev.rhcloud.com f4819c4cea9f11e2a0d512313d1ff52a]\> psql
psql (9.2.4)
Type "help" for help.

move to verified.


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