Bug 976874 - All the python app that is using virtenv tools will get failed in OSE env deployed on RHEL6.4
Summary: All the python app that is using virtenv tools will get failed in OSE env dep...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Containers
Version: 1.2.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Jason DeTiberus
QA Contact: libra bugs
URL:
Whiteboard:
Depends On: 907449 912672 968345
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-21 18:00 UTC by Jason DeTiberus
Modified: 2017-03-08 17:35 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 907449
Environment:
Last Closed: 2013-06-28 15:47:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jason DeTiberus 2013-06-21 18:00:08 UTC
+++ This bug was initially created as a clone of Bug #907449 +++

This bug is to track the workaround for the 1.2 release

Description of problem:
Deploy will be failed when enable Django dependency with python app.

Version of puddle:
http://buildvm-devops.usersys.redhat.com/puddle/build/OpenShiftEnterprise/1.1.z/2013-01-31.1/

How reproducible:
Always

Steps to Reproduce:
1. Create python app
# rhc app create python1 python -predhat
2.In app local git repo, edit setup.py, add Django dependency.
# cat setup.py
from setuptools import setup

setup(name='YourAppName',
      version='1.0',
      description='OpenShift App',
      author='Your Name',
      author_email='example',
      url='http://www.python.org/sigs/distutils-sig/',
      install_requires=['Django>=1.3'],
     )
3. git push

Actual results:
[jenkins5@openshift py]$ git commit -am "Enable Django";git push
[master 3d53be9] aa
 1 files changed, 1 insertions(+), 1 deletions(-)
reverse mapping checking getaddrinfo for dhcp-66-79-30.eng.nay.redhat.com [10.66.79.30] failed - POSSIBLE BREAK-IN ATTEMPT!
Counting objects: 5, done.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 276 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: restart_on_add=false
remote: Waiting for stop to finish
remote: Done
remote: restart_on_add=false
remote: ~/git/py.git ~/git/py.git
remote: ~/git/py.git
remote: Running .openshift/action_hooks/pre_build
remote: setup.py found. Setting up virtualenv
remote: 'import site' failed; use -v for traceback
remote: New python executable in /var/lib/openshift/63ee8716445f4147872cee9ac6b7173a//python-2.6/virtenv/bin/python
remote: Installing setuptools....................................
remote:   Complete output from command /var/lib/openshift/6...6/virtenv/bin/python -c "#!python
remote: \"\"\"Bootstra...sys.argv[1:])
remote: 
remote: 
remote: 
remote: 
remote: 
remote: 
remote: " /usr/lib/python2.6/s...ols-0.6c11-py2.6.egg:
remote:   'import site' failed; use -v for traceback
remote: Downloading http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg
remote: Traceback (most recent call last):
remote:   File "<string>", line 279, in <module>
remote:   File "<string>", line 213, in main
remote:   File "build/bdist.linux-i686/egg/setuptools/__init__.py", line 2, in <module>
remote:   File "build/bdist.linux-i686/egg/setuptools/extension.py", line 2, in <module>
remote:   File "build/bdist.linux-i686/egg/setuptools/dist.py", line 5, in <module>
remote:   File "build/bdist.linux-i686/egg/setuptools/command/install.py", line 2, in <module>
remote:   File "/usr/lib64/python2.6/distutils/command/install.py", line 21, in <module>
remote:     from site import USER_BASE
remote:   File "build/bdist.linux-i686/egg/site.py", line 73, in <module>
remote:     set
remote:   File "build/bdist.linux-i686/egg/site.py", line 22, in __boot
remote:     FOR DEBIAN, this sys.path is augmented with directories in /usr/local.
remote:   File "build/bdist.linux-i686/egg/site.py", line 73, in <module>
remote:     set
remote:   File "build/bdist.linux-i686/egg/site.py", line 33, in __boot
remote: 
remote:   File "/var/lib/openshift/63ee8716445f4147872cee9ac6b7173a/python-2.6/virtenv/lib64/python2.6/site.py", line 677, in <module>
remote:     main()
remote:   File "/var/lib/openshift/63ee8716445f4147872cee9ac6b7173a/python-2.6/virtenv/lib64/python2.6/site.py", line 660, in main
remote:     paths_in_sys = virtual_addsitepackages(paths_in_sys)
remote:   File "/var/lib/openshift/63ee8716445f4147872cee9ac6b7173a/python-2.6/virtenv/lib64/python2.6/site.py", line 618, in virtual_addsitepackages
remote:     return addsitepackages(known_paths, sys_prefix=sys.real_prefix)
remote:   File "/var/lib/openshift/63ee8716445f4147872cee9ac6b7173a/python-2.6/virtenv/lib64/python2.6/site.py", line 273, in addsitepackages
remote:     addsitedir(sitedir, known_paths)
remote:   File "/var/lib/openshift/63ee8716445f4147872cee9ac6b7173a/python-2.6/virtenv/lib64/python2.6/site.py", line 203, in addsitedir
remote:     addpackage(sitedir, name, known_paths)
remote:   File "/var/lib/openshift/63ee8716445f4147872cee9ac6b7173a/python-2.6/virtenv/lib64/python2.6/site.py", line 172, in addpackage
remote:     exec(line)
remote:   File "<string>", line 1, in <module>
remote: ImportError: No module named abrt_exception_handler
remote: ----------------------------------------
remote: ...Installing setuptools...done.
remote: Traceback (most recent call last):
remote:   File "/usr/bin/virtualenv", line 3, in <module>
remote:     virtualenv.main()
remote:   File "/usr/lib/python2.6/site-packages/virtualenv.py", line 928, in main
remote:     never_download=options.never_download)
remote:   File "/usr/lib/python2.6/site-packages/virtualenv.py", line 1040, in create_environment
remote:     search_dirs=search_dirs, never_download=never_download)
remote:   File "/usr/lib/python2.6/site-packages/virtualenv.py", line 593, in install_setuptools
remote:     search_dirs=search_dirs, never_download=never_download)
remote:   File "/usr/lib/python2.6/site-packages/virtualenv.py", line 567, in _install_req
remote:     cwd=cwd)
remote:   File "/usr/lib/python2.6/site-packages/virtualenv.py", line 1006, in call_subprocess
remote:     % (cmd_desc, proc.returncode))
remote: OSError: Command /var/lib/openshift/6...6/virtenv/bin/python -c "#!python
remote: \"\"\"Bootstra...sys.argv[1:])
remote: 
remote: 
remote: 
remote: 
remote: 
remote: 
remote: " /usr/lib/python2.6/s...ols-0.6c11-py2.6.egg failed with error code 1
remote: /usr/libexec/openshift/cartridges/python-2.6/info/bin/build.sh: line 32: ./bin/activate: No such file or directory
remote: running develop
remote: error: can't create or remove files in install directory
remote: 
remote: The following error occurred while trying to add or remove files in the
remote: installation directory:
remote: 
remote:     [Errno 13] Permission denied: '/usr/lib/python2.6/site-packages/test-easy-install-23151.write-test'
remote: 
remote: The installation directory you specified (via --install-dir, --prefix, or
remote: the distutils default setting) was:
remote: 
remote:     /usr/lib/python2.6/site-packages/
remote: 
remote: Perhaps your account does not have write access to this directory?  If the
remote: installation directory is a system-owned directory, you may need to sign in
remote: as the administrator or "root" account.  If you do not have administrative
remote: access to this machine, you may wish to choose a different installation
remote: directory, preferably one that is listed in your PYTHONPATH environment
remote: variable.
remote: 
remote: For information on other options, you may wish to consult the
remote: documentation at:
remote: 
remote:   http://peak.telecommunity.com/EasyInstall.html
remote: 
remote: Please make the appropriate changes for your system and try again.
remote: 
remote: The environment doesn't have a file /var/lib/openshift/63ee8716445f4147872cee9ac6b7173a//python-2.6/virtenv/bin/activate_this.py -- please re-run virtualenv on this environment to update it
remote: Running .openshift/action_hooks/build
remote: Running .openshift/action_hooks/deploy
remote: hot_deploy_added=false
remote: Done
remote: Running .openshift/action_hooks/post_deploy
To ssh://63ee8716445f4147872cee9ac6b7173a.com/~/git/py.git/
   dfeea1a..3d53be9  master -> master

Expected results:
Enable Django successed.

--- Additional comment from Luke Meyer on 2013-02-05 12:25:30 EST ---

Did this previously install successfully for OSE 1.1 / RHEL 6.3? Just wanting to know if this is a new problem or a problem in what we already released (please set Version flag accordingly).

--- Additional comment from nsun on 2013-02-06 00:45:53 EST ---

Version of puddle:
http://buildvm-devops.usersys.redhat.com/puddle/build/OpenShiftEnterprise/1.1.z/2013-02-04.1/

...
remote: " /usr/lib/python2.6/s...ols-0.6c11-py2.6.egg:
remote:   'import site' failed; use -v for traceback
remote: Downloading http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg
remote: Traceback (most recent call last):
remote:   File "<string>", line 279, in <module>
remote:   File "<string>", line 213, in main
remote:   File "build/bdist.linux-i686/egg/setuptools/__init__.py", line 2, in <module>
remote:   File "build/bdist.linux-i686/egg/setuptools/extension.py", line 2, in <module>
remote:   File "build/bdist.linux-i686/egg/setuptools/dist.py", line 5, in <module>
remote:   File "build/bdist.linux-i686/egg/setuptools/command/install.py", line 2, in <module>
remote:   File "/usr/lib64/python2.6/distutils/command/install.py", line 21, in <module>
remote:     from site import USER_BASE
remote:   File "build/bdist.linux-i686/egg/site.py", line 73, in <module>
remote:     set
remote:   File "build/bdist.linux-i686/egg/site.py", line 22, in __boot
remote:     FOR DEBIAN, this sys.path is augmented with directories in /usr/local.
remote:   File "build/bdist.linux-i686/egg/site.py", line 73, in <module>
remote:     set
remote:   File "build/bdist.linux-i686/egg/site.py", line 33, in __boot
remote: 
remote:   File "/var/lib/openshift/359da0cd9348401c8c33b6cd5894a7a9/python-2.6/virtenv/lib64/python2.6/site.py", line 677, in <module>
remote:     main()
remote:   File "/var/lib/openshift/359da0cd9348401c8c33b6cd5894a7a9/python-2.6/virtenv/lib64/python2.6/site.py", line 660, in main
remote:     paths_in_sys = virtual_addsitepackages(paths_in_sys)
remote:   File "/var/lib/openshift/359da0cd9348401c8c33b6cd5894a7a9/python-2.6/virtenv/lib64/python2.6/site.py", line 618, in virtual_addsitepackages
remote:     return addsitepackages(known_paths, sys_prefix=sys.real_prefix)
remote:   File "/var/lib/openshift/359da0cd9348401c8c33b6cd5894a7a9/python-2.6/virtenv/lib64/python2.6/site.py", line 273, in addsitepackages
remote:     addsitedir(sitedir, known_paths)
remote:   File "/var/lib/openshift/359da0cd9348401c8c33b6cd5894a7a9/python-2.6/virtenv/lib64/python2.6/site.py", line 203, in addsitedir
remote:     addpackage(sitedir, name, known_paths)
remote:   File "/var/lib/openshift/359da0cd9348401c8c33b6cd5894a7a9/python-2.6/virtenv/lib64/python2.6/site.py", line 172, in addpackage
remote:     exec(line)
remote:   File "<string>", line 1, in <module>
remote: ImportError: No module named abrt_exception_handler
remote: ----------------------------------------
remote: ...Installing setuptools...done.
remote: Traceback (most recent call last):
remote:   File "/usr/bin/virtualenv", line 3, in <module>
remote:     virtualenv.main()
remote:   File "/usr/lib/python2.6/site-packages/virtualenv.py", line 928, in main
remote:     never_download=options.never_download)
remote:   File "/usr/lib/python2.6/site-packages/virtualenv.py", line 1040, in create_environment
remote:     search_dirs=search_dirs, never_download=never_download)
remote:   File "/usr/lib/python2.6/site-packages/virtualenv.py", line 593, in install_setuptools
remote:     search_dirs=search_dirs, never_download=never_download)
remote:   File "/usr/lib/python2.6/site-packages/virtualenv.py", line 567, in _install_req
remote:     cwd=cwd)
remote:   File "/usr/lib/python2.6/site-packages/virtualenv.py", line 1006, in call_subprocess
remote:     % (cmd_desc, proc.returncode))
remote: OSError: Command /var/lib/openshift/3...6/virtenv/bin/python -c "#!python
remote: \"\"\"Bootstra...sys.argv[1:])
remote: 
remote: 
remote: 
remote: 
remote: 
remote: 
remote: " /usr/lib/python2.6/s...ols-0.6c11-py2.6.egg failed with error code 1
remote: /usr/libexec/openshift/cartridges/python-2.6/info/bin/build.sh: line 30: ./bin/activate: No such file or directory
remote: running develop
remote: error: can't create or remove files in install directory
remote: 
remote: The following error occurred while trying to add or remove files in the
remote: installation directory:
remote: 
remote:     [Errno 13] Permission denied: '/usr/lib/python2.6/site-packages/test-easy-install-24162.write-test'
remote: 
remote: The installation directory you specified (via --install-dir, --prefix, or
remote: the distutils default setting) was:
remote: 
remote:     /usr/lib/python2.6/site-packages/
...

--- Additional comment from nsun on 2013-02-07 00:19:03 EST ---

Version of puddle:
http://buildvm-devops.usersys.redhat.com/puddle/build/OpenShiftEnterprise/1.1.z/2013-02-06.2/Client/x86_64/os/Packages/

Results:
Failed to install Django for app.

--- Additional comment from nsun on 2013-02-07 01:15:41 EST ---

Tested on OSE 1.1 / RHEL 6.3, Django installed is Successed after git push. 
I think this is a new problem.

--- Additional comment from nsun on 2013-02-19 02:19:34 EST ---

Version of puddle:
http://buildvm-devops.usersys.redhat.com/puddle/build/OpenShiftEnterprise/1.1.z/2013-02-18.3/

Results:
Failed to install Django for python app.

--- Additional comment from Johnny Liu on 2013-02-21 08:04:57 EST ---

Setup OSE env using 1.1.z/2013-02-18.3 puddle on RHEL6.4, all the python app that is using virtenv will get failed as above comments. e.g: flask, webpy, Bottle quickstart app, and so on.

--- Additional comment from Brenton Leanhardt on 2013-02-21 13:44:53 EST ---

Originally this error did not happen for me.  Eventually I found Bug #912672 and later determined that the bug is related to abrt-addon-python-2.0.8-15.el6.x86_64.rpm being installed.

If you uninstall that package the error goes away.  I'm assuming a Z-stream release will be issued for the abrt package but I will follow up.

--- Additional comment from nsun on 2013-02-21 23:38:45 EST ---

Error goes away after remove abrt-addon-python-2.0.8-15.el6.x86_64.rpm package.

--- Additional comment from Johnny Liu on 2013-05-17 02:05:29 EDT ---

This bug is blocking python cartridge testing, QE think it is necessary to fix it in 1.2 release.

Comment 1 Jason DeTiberus 2013-06-21 18:03:37 UTC
To implement a workaround for the 1.2 release, the plan is to update the install/upgrade scripts to detect the conflict between abrt-addon-python and the v2 python cartridge and remove abrt-addon-python.  Also adding an oo-diagnostics check to detect the situation as well.

Comment 4 openshift-github-bot 2013-06-21 19:38:20 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/e3711b17d760907fec90f53b9433c10409368b8b
<oo-diagnostics> Bug 976874 - Detect abrt-addon-python conflicts

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

abrt-addon-python does not play nicely with the python cartridge, alert
if the following conditions are met:
1) RHEL 6.4 (RHEL 6.5 will contain an update to abrt-addon-python)
2) abrt-addon-python installed
3) python v2 cart installed

Comment 5 Jason DeTiberus 2013-06-21 19:59:04 UTC
enterprise-server workaround: https://github.com/openshift/enterprise-server/pull/92

Comment 6 Johnny Liu 2013-06-25 06:56:22 UTC
Verified this bug with rubygem-openshift-origin-common-1.8.11-1.el6op.noarch and latest installation script, and PASS.


[root@node1 ~]# oo-diagnostics 
WARN: test_vhost_servernames
        The VirtualHost defined by default in /etc/httpd/conf.d/ssl.conf is not needed
        and can cause spurious warnings. Please remove it by running this command:

          sed -i '/VirtualHost/,/VirtualHost/ d' /etc/httpd/conf.d/ssl.conf

FAIL: test_abrt_addon_python
        The following problems were found with your RPMs: 
	abrt-addon-python has a known conflict with openshift-origin-cartridge-python (https://bugzilla.redhat.com/show_bug.cgi?id=907449)

1 WARNINGS
1 ERRORS


After remove abrt-addon-python or change /etc/redhat-release to dummy 6.5 release, re-run oo-diagnostics, the conflict package failure message is not see.

About installation script, once abrt-addon-python and openshift-origin-cartridge-python is detected installed on rhel6.4, abrt-addon-python will be removed.

Comment 7 Luke Meyer 2013-06-28 15:47:46 UTC
Closing all bugs introduced, fixed, and verified during 1.2 release work (thus never shipped).


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