Bug 1021798

Summary: Jenkins builds of python-3.3 apps always fail due to "[Errno 13] Permission denied: '/usr/lib/python2.6/site-packages/test-easy-install-14392.writ"
Product: OpenShift Online Reporter: Zhe Wang <zhewang>
Component: ContainersAssignee: Andy Goldstein <agoldste>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 2.xCC: xtian
Target Milestone: ---Keywords: Regression
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-24 03:26:01 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 Zhe Wang 2013-10-22 06:45:08 UTC
Description of problem:
It always fail to deploy a python-3.3 app due to lack of permission to add or remove files in the installation directory.

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-14392.write-test'



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

How reproducible:
always

Steps to Reproduce:
1. create a pytyon-3.3 app
2. make some changes in the local repo and trigger a build

Actual results:
The build fails with the following error:

remote: /usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info already patched.
remote: running install
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-14392.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://packages.python.org/distribute/easy_install.html
remote: 
remote: Please make the appropriate changes for your system and try again.

Moreover, the app became inaccessible ever since.


Expected results:
Building a python-3.3 app should be successful.

Additional info:

Comment 1 Zhe Wang 2013-10-22 07:05:22 UTC
Lower down the severity since others are not always able to reproduce this bug.

Comment 2 Zhe Wang 2013-10-22 07:19:19 UTC
Moreover, I confirmed that this app was a Python-3.3 one:

  py33 @ http://py33-dev3926tst.dev.rhcloud.com/ (uuid: 52661838c77079d104000013)
  -------------------------------------------------------------------------------
    Domain:  dev3926tst
    Created: 2:16 PM
    Gears:   1 (defaults to small)
    Git URL: ssh://52661838c77079d104000013.rhcloud.com/~/git/py33.git/
    SSH:     52661838c77079d104000013.rhcloud.com

    python-3.3 (Python 3.3)
    -----------------------
      Gears: 1 small

Comment 3 Zhe Wang 2013-10-22 08:16:59 UTC
More info about the description:

When building python-3.3 apps with jenkins-client added, the builds will always fail as described in comment#0. Thereafter, even removing the Jenkins client, building the python-3.3 app will be stuck at this bug.

(P.S., the bug was first caught in the jenkins builds of a python-3.3 app, and I tried to reproduce it by removing the Jenkins client suspecting that the problem had nothing to do with the jenkins client.. But it turns out that my assumption was wrong..)

Comment 4 Andy Goldstein 2013-10-23 12:17:32 UTC
https://github.com/openshift/origin-server/pull/3955

Comment 5 Zhe Wang 2013-10-24 06:18:47 UTC
Verified in devenv_3937:

[master 2b87477] test 
1 file changed, 1 insertion(+) 
create mode 100644 .openshift/markers/force_clean_build 
remote: Executing Jenkins build. 
remote: 
remote: You can track your build at https://j1-gonnkr.dev.rhcloud.com/job/app1-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://5268b3cfa6f43336070000a5.rhcloud.com/~/git/app1.git/ 
3d200e1..2b87477 master -> master