Bug 1258033 - Allow the override of pre-defined function for database connections
Summary: Allow the override of pre-defined function for database connections
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Containers
Version: 2.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Abhishek Gupta
QA Contact: Gaoyun Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-28 17:32 UTC by Eric Rich
Modified: 2019-11-14 06:54 UTC (History)
7 users (show)

Fixed In Version: rubygem-openshift-origin-node-1.38.7.1-1.el6op
Doc Type: Enhancement
Doc Text:
Feature: Allow the provided database connection helper functions mysql(), psql(), and mongo() to be overwritten. Reason: This change allows users to overwrite the helper functions to easily connect to external databases. Result: Users can now define mysql(), psql(), and mongo() functions in their $OPENSHIFT_DATA_DIR/.bash_profile, which can be used within an ssh connection to a gear.
Clone Of:
Environment:
Last Closed: 2017-01-04 20:23:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0017 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.2.11 bug fix and enhancement update 2017-01-05 01:22:16 UTC

Description Eric Rich 2015-08-28 17:32:44 UTC
Description of problem:

Customers who want a unified experience with openshift and external databases (who might be using SCL version of databases) need the capability to override database function, in the rhcsh script (because they are not using SCL cartridges that can be auto discovered.)

Comment 1 Eric Rich 2015-08-28 17:34:17 UTC
This relates to https://github.com/openshift/origin-server/pull/6227

Comment 5 Timothy Williams 2016-09-29 15:17:37 UTC
Re-opening this bug since the fix finally merged. The fix originally was meant to be merged but appears to have hit an issue with our automation and took ~8 months to merge:

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

Comment 9 Gaoyun Pei 2016-12-14 03:26:01 UTC
Verify this bug with puddle 2.2/2016-12-12.1 

1. Create an app
2. Log into the gear and modify ~/app-root/data/.bash_profile file with the following contents:

function mongo() {
  echo "mongo replaced!"
}

function mysql() {
  echo "mysql replaced!"
}

function psql() {
  echo "psql replaced!"
}

3. Log into it again and run `mysql`, `mongo`, and `psql`

[app3-yes.ose22-auto.com.cn 5850b7ad82611d5be4000001]\> mysql
mysql replaced!
[app3-yes.ose22-auto.com.cn 5850b7ad82611d5be4000001]\> mongo
mongo replaced!
[app3-yes.ose22-auto.com.cn 5850b7ad82611d5be4000001]\> psql
psql replaced!

Comment 11 errata-xmlrpc 2017-01-04 20:23:09 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.

https://rhn.redhat.com/errata/RHBA-2017-0017.html


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