Bug 979740 - Unable to add 'postgres' as an additional cartridge (both via UI & cli)
Unable to add 'postgres' as an additional cartridge (both via UI & cli)
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity high
: ---
: ---
Assigned To: Fotios Lindiakos
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-30 03:24 EDT by Ajay
Modified: 2015-05-14 19:22 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-22 11:18:52 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ajay 2013-06-30 03:24:36 EDT
Description of problem:
  I am using the free version of openshift and recently created a python app using flask and postgres. When I tried adding postgres cartridge to my app, it fails with the following message:

/var/lib/openshift/607bb3a873f442629a88328ea75ef36c/postgresql/bin/install: line 39: HOME: unbound variable

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


How reproducible:


Steps to Reproduce:
1. Login via openshift UI
2. Click postgres 'add cartridge'

Actual results:
 postgres did not install, get the message: /var/lib/openshift/607bb3a873f442629a88328ea75ef36c/postgresql/bin/install: line 39: HOME: unbound variable

Expected results:
  postgres cartridge should be installed.

Additional info:
  I had mongodb previously installed, but since I planned on using postgres, I removed mongodb.
Comment 1 Fotios Lindiakos 2013-07-10 12:52:35 EDT
PR Submitted: https://github.com/openshift/origin-server/pull/3041
Comment 2 openshift-github-bot 2013-07-10 14:35:49 EDT
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/b024b15d5c80f530a406e75be3643a31dcf41799
Bug 979740 - Fix Postgres cartridge using $HOME

https://bugzilla.redhat.com/show_bug.cgi?id=979740

The Postgres cartridge was using $HOME in some places, but it should be using $OPENSHIFT_HOMEDIR.
This is causing an unbound variable error.
Comment 3 Meng Bo 2013-07-11 05:16:53 EDT
Checked on devenv_3482,

Add "unset HOME" to the top of the bin/install script for the postgresql cartridge.
Try to add the postgresql to my app.
It will not report errors.
And the .psqlrc and .pgpass exist under the gear dir.

[pythonws-bmeng.dev.rhcloud.com dc6b15feea0711e2b3c022000a8a0ade]\> ls -a
.  ..  app-root  .env  .gem  git  .gitconfig  mongodb  .pgpass	postgresql  .psqlrc  python  .sandbox  .ssh  .tmp

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