Bug 981150

Summary: can't install psycopg2 2.5.1 to python-2.7 apps
Product: OpenShift Online Reporter: congqiyuan <qcong>
Component: ContainersAssignee: Mrunal Patel <mpatel>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: admiller, bmeng, lzhang, mpatel, szhou, xtian, zhewang
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-22 15:21:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description congqiyuan 2013-07-04 06:40:15 UTC
Description of problem:

can't install psycopg2 2.5.1 to python-2.7 apps as a result of pg_config executable not found.


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

How reproducible:
always,

Steps to Reproduce:
1. create a  python-2.7 app
2. add postgresql-8.4 cartridge to the app
3. make sure install_requires has psycopg2.
4. clone app, do a minor cosmetic change and do a 'git push'
 
Actual results:
remote: Installed /var/lib/openshift/51d50cbbff9b34089800000b/app-root/runtime/repo
remote: Processing dependencies for YourAppName==1.0
remote: Searching for psycopg2
remote: Reading http://mirror1.ops.rhcloud.com/mirror/python/web/simple/psycopg2/
remote: Reading http://initd.org/psycopg/
remote: Reading http://initd.org/projects/psycopg2
remote: Best match: psycopg2 2.5.1
remote: Downloading http://initd.org/psycopg/tarballs/PSYCOPG-2-5/psycopg2-2.5.1.tar.gz
remote: Processing psycopg2-2.5.1.tar.gz
remote: Writing /tmp/easy_install-Grklk5/psycopg2-2.5.1/setup.cfg
remote: Running psycopg2-2.5.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Grklk5/psycopg2-2.5.1/egg-dist-tmp-U22EQ9
remote: Error: pg_config executable not found.
remote: 
remote: Please add the directory containing pg_config to the PATH
remote: or specify the full executable path with the option:
remote: 
remote:     python setup.py build_ext --pg-config /path/to/pg_config build ...
remote: 
remote: or with the pg_config option in 'setup.cfg'.
remote: error: Setup script exited with 1
remote:  - Done processing setup.py



Expected results:
psycopg2-2.5.1 installed successfully.

Additional info:

Comment 2 congqiyuan 2013-07-09 01:34:51 UTC
Fail to verify the bug

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


Steps to Reproduce:
1. create a  python-2.7 app
2. add postgresql-8.4 cartridge to the app
3. make sure install_requires has psycopg2.
4. clone app, do a minor cosmetic change and do a 'git push'

Actual results:
remote: Processing psycopg2-2.5.1.tar.gz
remote: Writing /tmp/easy_install-OO21Xq/psycopg2-2.5.1/setup.cfg
remote: Running psycopg2-2.5.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-OO21Xq/psycopg2-2.5.1/egg-dist-tmp-JRwaZX
remote: Error: pg_config executable not found.
remote: 
remote: Please add the directory containing pg_config to the PATH
remote: or specify the full executable path with the option:
remote: 
remote:     python setup.py build_ext --pg-config /path/to/pg_config build ...
remote: 
remote: or with the pg_config option in 'setup.cfg'.
remote: error: Setup script exited with 1
remote:  - Done processing setup.py


Expected results:
There should be no errors.

Comment 3 Xiaoli Tian 2013-07-09 01:46:58 UTC
Move it back to ON_QA since the pull request is not merged yet.

Comment 4 congqiyuan 2013-07-09 05:28:52 UTC
Version-Release number of selected component (if applicable):
devenv_3462


Steps to Reproduce:
1. create a  python-2.7 app
2. add postgresql-8.4 cartridge to the app
3. make sure install_requires has psycopg2.
4. clone app, do a minor cosmetic change and do a 'git push'

Actual results:
all success, no error messages.

Comment 5 congqiyuan 2013-07-15 06:10:16 UTC
Regression

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

How reproducible:
always,

Steps to Reproduce:
1. create a  python-2.7 app
2. add postgresql-8.4 cartridge to the app
3. make sure install_requires has psycopg2.
4. clone app, do a minor cosmetic change and do a 'git push'
 
Actual results:
remote: Searching for psycopg2
remote: Reading http://mirror1.ops.rhcloud.com/mirror/python/web/simple/psycopg2/
remote: Couldn't find index page for 'psycopg2' (maybe misspelled?)
remote: Scanning index of all packages (this may take a while)
remote: Reading http://mirror1.ops.rhcloud.com/mirror/python/web/simple/
remote: No local packages or download links found for psycopg2
remote: error: Could not find suitable distribution for Requirement.parse('psycopg2')
remote:  - Done processing setup.py


Expected results:
psycopg2-2.5.1 installed successfully.

Additional info:

Comment 6 Mrunal Patel 2013-07-15 19:43:46 UTC
This is a more widespread issue because of an issue with our mirror. Ops is at work to correct the issue.

Comment 7 Hiro Asari 2013-07-15 19:44:52 UTC
*** Bug 984396 has been marked as a duplicate of this bug. ***

Comment 8 Zhe Wang 2013-07-16 11:18:29 UTC
The problem is fixed in STG(devenv-stage_406).

Steps:

1. create a python-2.7 application
2. require psycopg in the app's setup.py file
3. push the change

Results:
The psycopg package installed successfully.

remote: Installed /var/lib/openshift/51e52051dbd93c223b000569/app-root/runtime/repo
remote: Processing dependencies for YourAppName==1.0
remote: Searching for psycopg2
remote: Reading http://mirror1.ops.rhcloud.com/mirror/python/web/simple/psycopg2/
remote: Reading http://initd.org/psycopg/
remote: Reading http://initd.org/projects/psycopg2
remote: Best match: psycopg2 2.5.1
remote: Downloading http://mirror1.ops.rhcloud.com/mirror/python/web/packages/source/p/psycopg2/psycopg2-2.5.1.tar.gz#md5=1b433f83d50d1bc61e09026e906d84c7
remote: Processing psycopg2-2.5.1.tar.gz
remote: Writing /tmp/easy_install-YxSrJi/psycopg2-2.5.1/setup.cfg
remote: Running psycopg2-2.5.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-YxSrJi/psycopg2-2.5.1/egg-dist-tmp-Fe8nRR
remote: zip_safe flag not set; analyzing archive contents...
remote: psycopg2.tests.test_types_basic: module references __file__
remote: Adding psycopg2 2.5.1 to easy-install.pth file

Could you please move the bug to ON_QA to avoid blocking the release in this sprint? I will verify this bug as soon as it is ON_QA.

Many thanks,
Zhe Wang

Comment 9 congqiyuan 2013-07-17 00:40:35 UTC
verified

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

Steps to Reproduce:
1. create a  python-2.7 app
2. add postgresql-8.4 cartridge to the app
3. make sure install_requires has psycopg2.
4. clone app, do a minor cosmetic change and do a 'git push'
 
Actual results:
remote: Installed /var/lib/openshift/51e5e653e0a0bd085a000001/app-root/runtime/repo
remote: Processing dependencies for YourAppName==1.0
remote: Searching for psycopg2
remote: Reading http://mirror1.ops.rhcloud.com/mirror/python/web/simple/psycopg2/
remote: Reading http://initd.org/psycopg/
remote: Reading http://initd.org/projects/psycopg2
remote: Best match: psycopg2 2.5.1
remote: Downloading http://mirror1.ops.rhcloud.com/mirror/python/web/packages/source/p/psycopg2/psycopg2-2.5.1.tar.gz#md5=1b433f83d50d1bc61e09026e906d84c7
remote: Processing psycopg2-2.5.1.tar.gz
remote: Writing /tmp/easy_install-WOMQGu/psycopg2-2.5.1/setup.cfg
remote: Running psycopg2-2.5.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-WOMQGu/psycopg2-2.5.1/egg-dist-tmp-KDWFAc
remote: zip_safe flag not set; analyzing archive contents...
remote: psycopg2.tests.test_types_basic: module references __file__
remote: Adding psycopg2 2.5.1 to easy-install.pth file

Expected results:
psycopg2-2.5.1 installed successfully.