Bug 1032486

Summary: Jenkins build failed with python cart
Product: OpenShift Container Platform Reporter: nsun <nsun>
Component: ContainersAssignee: Brenton Leanhardt <bleanhar>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.0.0CC: libra-onpremise-devel, xtian
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-02-04 14:45:45 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 nsun 2013-11-20 09:47:34 UTC
Description of problem:
Jenkins build with  python's app will be failed.

Version-Release number of selected component (if applicable):
OSE 2.0/2013-11-15.1

How reproducible:
aways 

Steps to Reproduce:
1. Create one python app with --enable-jenkins parameter
2. Change something and push it 

Actual results:
Warning: Permanently added 'pys-uqhqsh.ose-1115.com.cn,10.4.59.156' (RSA) to the list of known hosts.
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 252 bytes, done.
Total 2 (delta 1), reused 0 (delta 0)
remote: Executing Jenkins build.
remote: 
remote: You can track your build at https://j1-uqhqsh.ose-1115.com.cn/job/pys-build
remote: 
remote: Waiting for build to schedule...............................Done
remote: Waiting for job to complete....................Done
remote: SUCCESS
remote: New build has been deployed.
remote: Result: success
remote: Deployment completed with status: success
To ssh://528c7de067ee3c38d900011f.com.cn/~/git/pys.git/
   53ffdaa..5d4299f  master -> maste

But actually It's failed with jenkins job, build log : 
<---snip--->
running develop
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
    [Errno 13] Permission denied: '/usr/lib/python2.6/site-packages/test-easy-install-3158.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
    /usr/lib/python2.6/site-packages/
Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
  http://peak.telecommunity.com/EasyInstall.html
Please make the appropriate changes for your system and try again.
<---snip--->

Expected results:
Successed 

Additional info:

Comment 2 nsun 2013-11-20 10:37:15 UTC
Addition info :

  You must be create python-2.6 app and add some file when you change repo, because it's write permission denied.

  Python-2.7 cartridge is ok, and Online env is ok.

Comment 3 Brenton Leanhardt 2013-11-20 15:48:31 UTC
Major kudos for finding this.  I was able to reproduce the problem and comparing it with Online shoes that our version of python-virtualenv is old.  Apparently with 1.7 virtenv was trying to install to the system path instead of inside the gear.

Comment 5 nsun 2013-11-25 05:26:52 UTC
Verfied at puddle 2.0/2013-11-22.1.
Python virtenv version : python-virtualenv-1.10.1-1.el6op.noarch