Bug 1036286

Summary: postgresql-9.2 cartridge added to python-2.7 cartridge is not picked up
Product: OpenShift Online Reporter: Stijn Hoop <stijn>
Component: ImageAssignee: Paul Morie <pmorie>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: yadu
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: 2014-01-30 00:51:25 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:

Description Stijn Hoop 2013-11-30 13:42:35 UTC
Description of problem:

While installing a scalable app with python-2.7 / postgresql-9.2 I saw the following during compilation of psycopg2 (the python postgres adapter):

remote:     gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.5.1 (dt dec pq3 ext)" -DPG_VERSION_HEX=0x080412 -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -I/opt/rh/python27/root/usr/include/python2.7 -I. -I/usr/include -I/usr/include/pgsql/server -c psycopg/adapter_qstring.c -o build/temp.linux-x86_64-2.7/psycopg/adapter_qstring.o -Wdeclaration-after-statement


Note the PG_VERSION_HEX identifier and the /usr/include/pgsql path, both of which are the 8.4 versions.


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

Current running version (November 2013)

How reproducible:

Always, this was off a freshly created app.

Steps to Reproduce:
1. rhc create app -s appname python-2.7 postgresql-9.2
2. echo 'psycopg2' > requirements.txt
3. git push

Actual results:

Linked with postgres 8.4

Expected results:

Linked with postgres 9.2

Additional info:

None

Comment 1 Paul Morie 2013-12-02 22:09:12 UTC
I wasn't able to reproduce this in the latest devenv.

Comment 2 Yan Du 2013-12-03 02:37:46 UTC
Test on devenv_4087, Issue can't be reproduced.


remote: Stopping PYTHON cart
remote: [Mon Dec 02 21:14:15 2013] [warn] PassEnv variable SHELL was undefined
remote: [Mon Dec 02 21:14:15 2013] [warn] PassEnv variable USER was undefined
remote: [Mon Dec 02 21:14:15 2013] [warn] PassEnv variable LOGNAME was undefined
remote: Waiting for stop to finish
remote: Syncing git content to other proxy gears
remote: Building git ref 'master', commit aa03b47
remote: Requirement already satisfied (use --upgrade to upgrade): psycopg2 in /opt/rh/python27/root/usr/lib64/python2.7/site-packages (from -r /var/lib/openshift/529d3ddf3dfc9ffad5000007/app-root/runtime/repo//requirements.txt (line 1))
remote: Cleaning up...
remote: running develop
remote: running egg_info
remote: creating YourAppName.egg-info
remote: writing YourAppName.egg-info/PKG-INFO
remote: writing top-level names to YourAppName.egg-info/top_level.txt
remote: writing dependency_links to YourAppName.egg-info/dependency_links.txt
remote: writing YourAppName.egg-info/PKG-INFO
remote: writing top-level names to YourAppName.egg-info/top_level.txt
remote: writing dependency_links to YourAppName.egg-info/dependency_links.txt
remote: writing manifest file 'YourAppName.egg-info/SOURCES.txt'
remote: reading manifest file 'YourAppName.egg-info/SOURCES.txt'
remote: writing manifest file 'YourAppName.egg-info/SOURCES.txt'
remote: running build_ext
remote: Creating /var/lib/openshift/529d3ddf3dfc9ffad5000007/app-root/runtime/dependencies/python/virtenv/lib/python2.7/site-packages/YourAppName.egg-link (link to .)
remote: Adding YourAppName 1.0 to easy-install.pth file
remote:
remote: Installed /var/lib/openshift/529d3ddf3dfc9ffad5000007/app-root/runtime/repo
remote: Processing dependencies for YourAppName==1.0
remote: Finished processing dependencies for YourAppName==1.0
remote: Script /var/lib/openshift/529d3ddf3dfc9ffad5000007/python//virtenv/bin/activate.csh cannot be made relative (it's not a normal script that starts with #!/var/lib/openshift/529d3ddf3dfc9ffad5000007/python/virtenv/bin/python)
remote: Script /var/lib/openshift/529d3ddf3dfc9ffad5000007/python//virtenv/bin/activate.fish cannot be made relative (it's not a normal script that starts with #!/var/lib/openshift/529d3ddf3dfc9ffad5000007/python/virtenv/bin/python)
remote: Preparing build for deployment
remote: Deployment id is f133b9a2
remote: Activating deployment
remote: HAProxy already running
remote: HAProxy instance is started
remote: Script /var/lib/openshift/529d3ddf3dfc9ffad5000007/python//virtenv/bin/activate.csh cannot be made relative (it's not a normal script that starts with #!/var/lib/openshift/529d3ddf3dfc9ffad5000007/python/virtenv/bin/python)
remote: Script /var/lib/openshift/529d3ddf3dfc9ffad5000007/python//virtenv/bin/activate.fish cannot be made relative (it's not a normal script that starts with #!/var/lib/openshift/529d3ddf3dfc9ffad5000007/python/virtenv/bin/python)
remote: Starting PYTHON cart
remote: Result: success
remote: Activation status: success
remote: Deployment completed with status: success
To ssh://529d3ddf3dfc9ffad5000007.rhcloud.com/~/git/py27.git/
   b17e913..aa03b47  master -> master

Comment 3 Stijn Hoop 2013-12-03 08:08:19 UTC
OK, so what could be the difference in our environments?