Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 979740 - Unable to add 'postgres' as an additional cartridge (both via UI & cli)
Summary: Unable to add 'postgres' as an additional cartridge (both via UI & cli)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
: ---
Assignee: Fotios Lindiakos
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-30 07:24 UTC by Ajay
Modified: 2015-05-14 23:22 UTC (History)
3 users (show)

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


Attachments (Terms of Use)

Description Ajay 2013-06-30 07:24:36 UTC
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 16:52:35 UTC
PR Submitted: https://github.com/openshift/origin-server/pull/3041

Comment 2 openshift-github-bot 2013-07-10 18:35:49 UTC
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 09:16:53 UTC
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.