Bug 983190 - On a scaled app, the primary gear should be able to use psql 9.2 to connect to the remote server
On a scaled app, the primary gear should be able to use psql 9.2 to connect t...
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
Unspecified Unspecified
high Severity medium
: ---
: ---
Assigned To: Hiro Asari
libra bugs
Depends On:
  Show dependency treegraph
Reported: 2013-07-10 12:36 EDT by Hiro Asari
Modified: 2015-05-14 19:23 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-07-22 11:23:49 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 Hiro Asari 2013-07-10 12:36:44 EDT
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):

How reproducible:

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 12:41:03 EDT
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 11:29:42 EDT
Commit pushed to master at https://github.com/openshift/origin-server

Bug 983190

Publish $OPENSHIFT_POSTGRESQL_VERSION to all gears, and depending on
whether `scl` is available, set up the `psql()` wrapper in `rhcsh`
Comment 4 Yan Du 2013-07-11 23:14:40 EDT
verfied on devenv_3490


$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.