Bug 851007 - https://github.com/openshift/django-example build fails when building with Jenkins
https://github.com/openshift/django-example build fails when building with Je...
Status: CLOSED DUPLICATE of bug 862078
Product: OpenShift Origin
Classification: Red Hat
Component: Templates (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Bill DeCoste
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-23 01:25 EDT by Nam Duong
Modified: 2015-05-14 22:03 EDT (History)
5 users (show)

See Also:
Fixed In Version: > ami-7518aa1c
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-02 16:44:40 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Nam Duong 2012-08-23 01:25:50 EDT
Description of problem:
See forum post:  https://openshift.redhat.com/community/forums/openshift/importerror-no-module-named-djangocoremanagement

I was able to reproduce this with:
1) Walking through https://github.com/openshift/django-example to onboard/debploy/build/start the django app
2) Create a jenkins app:  rhc app create -a jenkins -t jenkins-1.4
3) Add the jenkins client to django app:  rhc app cartridge add -a django -c jenkins-client-1.4
4) Run a build (e.g., modify README, git commit/push)

Output on Jenkins log for build failure:


WARNING: This ssh terminal was started without a tty.
          It is highly recommended to login with: ssh -t
+ /var/lib/stickshift/75e8a1f8eb4e4abc89c148695ee2f4bb/python-2.6/django_ctl.sh stop
httpd (no pid file) not running
+ rsync --delete-after -az -e /usr/libexec/stickshift/cartridges/jenkins-1.4/info/bin/git_ssh_wrapper.sh /var/lib/stickshift/14bdf4193fb8493b99d312161f8a3f3e/djangobldr/virtenv/ '75e8a1f8eb4e4abc89c148695ee2f4bb@django-macdomain.rhcloud.com:~/django/virtenv/'
+ rsync --delete-after -az -e /usr/libexec/stickshift/cartridges/jenkins-1.4/info/bin/git_ssh_wrapper.sh /var/lib/stickshift/14bdf4193fb8493b99d312161f8a3f3e/djangobldr/ci/jenkins/workspace/django-build/ '75e8a1f8eb4e4abc89c148695ee2f4bb@django-macdomain.rhcloud.com:~/django/repo/'
+ /usr/libexec/stickshift/cartridges/jenkins-1.4/info/bin/git_ssh_wrapper.sh 75e8a1f8eb4e4abc89c148695ee2f4bb@django-macdomain.rhcloud.com deploy.sh
Running .openshift/action_hooks/deploy
Executing 'python /var/lib/stickshift/75e8a1f8eb4e4abc89c148695ee2f4bb/app-root/runtime/repo//wsgi/openshift/manage.py syncdb --noinput'
Traceback (most recent call last):
  File "/var/lib/stickshift/75e8a1f8eb4e4abc89c148695ee2f4bb/app-root/runtime/repo/wsgi/openshift/manage.py", line 2, in <module>
    from django.core.management import execute_manager
ImportError: No module named django.core.management
Executing 'python /var/lib/stickshift/75e8a1f8eb4e4abc89c148695ee2f4bb/app-root/runtime/repo//wsgi/openshift/manage.py collectstatic --noinput'
Traceback (most recent call last):
  File "/var/lib/stickshift/75e8a1f8eb4e4abc89c148695ee2f4bb/app-root/runtime/repo/wsgi/openshift/manage.py", line 2, in <module>
    from django.core.management import execute_manager
ImportError: No module named django.core.management
Build step 'Execute shell' marked build as failure
Archiving artifacts
Finished: FAILURE
Comment 1 Bill DeCoste 2012-08-23 15:59:54 EDT
Haven't been able to recreate in dev. jenkins build log is below. Steps followed:

1) rhc app create -a jenkins -t jenkins-1.4
2) rhc app create -a python1 -t pythin-2.6 --enable-jenkins
3) Replace everything in the python1 git repo with the django files
4) git add/commit/push

Started by user Jenkins System Builder
Building remotely on python1bldr in workspace python1bldr/ci/jenkins/workspace/python1-build
Checkout:python1-build / python1bldr/ci/jenkins/workspace/python1-build - hudson.remoting.Channel@78ac86:python1bldr
Using strategy: Default
Last Built Revision: Revision 2e347e55ea9e42edf09b159023e97382088b01fe (origin/HEAD, origin/master)
Checkout:python1-build / python1bldr/ci/jenkins/workspace/python1-build - hudson.remoting.LocalChannel@7178ddc1
Fetching changes from 1 remote Git repository
Fetching upstream changes from ssh://77afef185bd44ac9bc7be112a307fc7f@python1-bdecoste8b.dev.rhcloud.com/~/git/python1.git/
Seen branch in repository origin/HEAD
Seen branch in repository origin/master
Commencing build of Revision aef1d7e6559a5338d18bdaffe29acbff66d182f5 (origin/HEAD, origin/master)
Checking out Revision aef1d7e6559a5338d18bdaffe29acbff66d182f5 (origin/HEAD, origin/master)
Warning : There are multiple branch changesets here
[python1-build] $ /bin/sh -xe /tmp/hudson7702102186745638108.sh
+ alias 'rsync=rsync --delete-after -az -e '\''/usr/libexec/stickshift/cartridges/jenkins-1.4/info/bin/git_ssh_wrapper.sh'\'''
+ rsync --delete-after -az -e /usr/libexec/stickshift/cartridges/jenkins-1.4/info/bin/git_ssh_wrapper.sh '77afef185bd44ac9bc7be112a307fc7f@python1-bdecoste8b.dev.rhcloud.com:~/python1/virtenv/' /var/lib/stickshift/d68c356d49bb465690740df4d74e760f/python1bldr/virtenv/
+ . ci_build.sh
++ set +x
Running .openshift/action_hooks/pre_build
setup.py found.  Setting up virtualenv
New python executable in /var/lib/stickshift/d68c356d49bb465690740df4d74e760f/python1bldr/virtenv/bin/python
Installing setuptools.............done.
Installing pip...............done.
running develop
running egg_info
writing requirements to YourAppName.egg-info/requires.txt
writing YourAppName.egg-info/PKG-INFO
writing top-level names to YourAppName.egg-info/top_level.txt
writing dependency_links to YourAppName.egg-info/dependency_links.txt
writing requirements to YourAppName.egg-info/requires.txt
writing YourAppName.egg-info/PKG-INFO
writing top-level names to YourAppName.egg-info/top_level.txt
writing dependency_links to YourAppName.egg-info/dependency_links.txt
warning: manifest_maker: standard file 'setup.py' not found
reading manifest file 'YourAppName.egg-info/SOURCES.txt'
writing manifest file 'YourAppName.egg-info/SOURCES.txt'
running build_ext
Creating /var/lib/stickshift/d68c356d49bb465690740df4d74e760f/python-2.6/virtenv/lib/python2.6/site-packages/YourAppName.egg-link (link to .)
YourAppName 1.0 is already the active version in easy-install.pth

Installed /var/lib/stickshift/d68c356d49bb465690740df4d74e760f/python-2.6/virtenv
Processing dependencies for YourAppName==1.0
Searching for Django>=1.3
Reading http://mirror1.stg.rhcloud.com/mirror/python/web/simple/Django/
Reading http://www.djangoproject.com/
Best match: Django 1.4
Downloading https://www.djangoproject.com/m/releases/1.4/Django-1.4.tar.gz
Processing Django-1.4.tar.gz

Running Django-1.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-pcI2oy/Django-1.4/egg-dist-tmp-CKG3zd

zip_safe flag not set; analyzing archive contents...
django.test._doctest: module references __file__
django.test._doctest: module MAY be using inspect.getsourcefile
django.utils.version: module references __path__
django.utils.module_loading: module references __path__
django.utils.autoreload: module references __file__
django.utils.unittest.loader: module references __file__
django.utils.unittest.collector: module references __file__
django.utils.translation.trans_real: module references __file__
django.utils.translation.__init__: module references __file__
django.views.i18n: module references __file__
django.contrib.flatpages.tests.views: module references __file__
django.contrib.flatpages.tests.middleware: module references __file__
django.contrib.flatpages.tests.csrf: module references __file__
django.contrib.flatpages.tests.templatetags: module references __file__
django.contrib.gis.tests.geogapp.tests: module references __file__
django.contrib.gis.tests.layermap.tests: module references __file__
django.contrib.gis.tests.geo3d.tests: module references __file__
django.contrib.gis.geometry.test_data: module references __file__
django.contrib.admindocs.views: module references __file__

django.contrib.auth.tests.context_processors: module references __file__
django.contrib.auth.tests.views: module references __file__
django.contrib.auth.tests.forms: module references __file__
django.contrib.staticfiles.storage: module references __file__
django.contrib.formtools.tests.__init__: module references __file__
django.contrib.formtools.tests.wizard.namedwizardtests.tests: module references __file__
django.contrib.formtools.tests.wizard.wizardtests.tests: module references __file__
django.contrib.sitemaps.tests.base: module references __file__
django.core.management.templates: module references __path__
django.core.management.sql: module references __file__
django.core.management.__init__: module references __file__
django.core.management.__init__: module references __path__
django.core.management.commands.makemessages: module references __file__
django.core.management.commands.loaddata: module references __file__
django.core.management.commands.loaddata: module references __path__
django.core.servers.basehttp: module references __path__
django.db.utils: module references __file__
django.db.models.loading: module references __file__
django.template.loaders.app_directories: module references __file__

Adding Django 1.4 to easy-install.pth file
Installing django-admin.py script to /var/lib/stickshift/d68c356d49bb465690740df4d74e760f/python1bldr/virtenv/bin

Installed /var/lib/stickshift/d68c356d49bb465690740df4d74e760f/python-2.6/virtenv/lib/python2.6/site-packages/Django-1.4-py2.6.egg

Finished processing dependencies for YourAppName==1.0

Script /var/lib/stickshift/d68c356d49bb465690740df4d74e760f/python1bldr/virtenv/bin/activate.csh cannot be made relative (it's not a normal script that starts with #!/var/lib/stickshift/d68c356d49bb465690740df4d74e760f/python1bldr/virtenv/bin/python)
Making script /var/lib/stickshift/d68c356d49bb465690740df4d74e760f/python1bldr/virtenv/bin/pip-2.6 relative
Making script /var/lib/stickshift/d68c356d49bb465690740df4d74e760f/python1bldr/virtenv/bin/easy_install-2.6 relative
Script /var/lib/stickshift/d68c356d49bb465690740df4d74e760f/python1bldr/virtenv/bin/activate.fish cannot be made relative (it's not a normal script that starts with #!/var/lib/stickshift/d68c356d49bb465690740df4d74e760f/python1bldr/virtenv/bin/python)
Making script /var/lib/stickshift/d68c356d49bb465690740df4d74e760f/python1bldr/virtenv/bin/pip relative
Making script /var/lib/stickshift/d68c356d49bb465690740df4d74e760f/python1bldr/virtenv/bin/easy_install relative
Making script /var/lib/stickshift/d68c356d49bb465690740df4d74e760f/python1bldr/virtenv/bin/django-admin.py relative
Running .openshift/action_hooks/build
+ /usr/libexec/stickshift/cartridges/jenkins-1.4/info/bin/git_ssh_wrapper.sh 77afef185bd44ac9bc7be112a307fc7f@python1-bdecoste8b.dev.rhcloud.com 'ctl_all stop'

    *********************************************************************

    You are accessing a service that is for use only by authorized users.  
    If you do not have authorization, discontinue use at once. 
    Any use of the services is subject to the applicable terms of the 
    agreement which can be found at: 
    https://openshift.redhat.com/app/legal

    *********************************************************************

    Welcome to OpenShift shell

    This shell will assist you in managing OpenShift applications.

    !!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!!
    Shell access is quite powerful and it is possible for you to
    accidentally damage your application.  Proceed with care!
    If worse comes to worst, destroy your application with 'rhc app destroy'
    and recreate it
    !!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!!

    Type "help" for more info.

WARNING: This ssh terminal was started without a tty.
          It is highly recommended to login with: ssh -t
+ /var/lib/stickshift/77afef185bd44ac9bc7be112a307fc7f/python-2.6/python1_ctl.sh stop

Waiting for stop to finish

+ rsync --delete-after -az -e /usr/libexec/stickshift/cartridges/jenkins-1.4/info/bin/git_ssh_wrapper.sh /var/lib/stickshift/d68c356d49bb465690740df4d74e760f/python1bldr/virtenv/ '77afef185bd44ac9bc7be112a307fc7f@python1-bdecoste8b.dev.rhcloud.com:~/python1/virtenv/'

+ rsync --delete-after -az -e /usr/libexec/stickshift/cartridges/jenkins-1.4/info/bin/git_ssh_wrapper.sh /var/lib/stickshift/d68c356d49bb465690740df4d74e760f/python1bldr/ci/jenkins/workspace/python1-build/ '77afef185bd44ac9bc7be112a307fc7f@python1-bdecoste8b.dev.rhcloud.com:~/python1/repo/'

+ /usr/libexec/stickshift/cartridges/jenkins-1.4/info/bin/git_ssh_wrapper.sh 77afef185bd44ac9bc7be112a307fc7f@python1-bdecoste8b.dev.rhcloud.com deploy.sh

Running .openshift/action_hooks/deploy
+ /usr/libexec/stickshift/cartridges/jenkins-1.4/info/bin/git_ssh_wrapper.sh 77afef185bd44ac9bc7be112a307fc7f@python1-bdecoste8b.dev.rhcloud.com 'ctl_all start'

    *********************************************************************

    You are accessing a service that is for use only by authorized users.  
    If you do not have authorization, discontinue use at once. 
    Any use of the services is subject to the applicable terms of the 
    agreement which can be found at: 
    https://openshift.redhat.com/app/legal

    *********************************************************************

    Welcome to OpenShift shell

    This shell will assist you in managing OpenShift applications.

    !!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!!
    Shell access is quite powerful and it is possible for you to
    accidentally damage your application.  Proceed with care!
    If worse comes to worst, destroy your application with 'rhc app destroy'
    and recreate it
    !!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!!

    Type "help" for more info.

WARNING: This ssh terminal was started without a tty.
          It is highly recommended to login with: ssh -t
+ /var/lib/stickshift/77afef185bd44ac9bc7be112a307fc7f/python-2.6/python1_ctl.sh start

+ /usr/libexec/stickshift/cartridges/jenkins-1.4/info/bin/git_ssh_wrapper.sh 77afef185bd44ac9bc7be112a307fc7f@python1-bdecoste8b.dev.rhcloud.com post_deploy.sh
Running .openshift/action_hooks/post_deploy

Archiving artifacts
Finished: SUCCESS
Comment 2 Bill DeCoste 2012-08-23 16:22:01 EDT
Can't reproduce in prod either
Comment 3 Bill DeCoste 2012-08-24 18:05:01 EDT
Now able to reproduce.
Comment 4 Bill DeCoste 2012-08-24 20:30:33 EDT
Suspect this is an rsync issue from the jenkins workspace to the app repo
Comment 5 Bill DeCoste 2012-09-27 20:05:20 EDT
Suspect this is due to the app gear and builder gear are using a copy of the virtenv. The activate script contains the uuid of the wrong gear.
Comment 6 Chandrika Gole 2012-10-01 18:01:12 EDT
I am still seeing this issue - 

Devenv - devenv_2259 (ami-1d78c574)
rhc  - rhc-0.99.3.gem	

WARNING: This ssh terminal was started without a tty.
          It is highly recommended to login with: ssh -t
+ /var/lib/stickshift/0cd584ab50584bb98e33883364033581/python-2.6/django_ctl.sh stop
Waiting for stop to finish
+ rsync --delete-after -az -e /usr/libexec/stickshift/cartridges/jenkins-1.4/info/bin/git_ssh_wrapper.sh /var/lib/stickshift/8cb9cf4a6190473bb3dfc6e877e6dc2a/djangobldr/virtenv/ '0cd584ab50584bb98e33883364033581@django-cgoletrew.dev.rhcloud.com:~/django/virtenv/'
+ rsync --delete-after -az -e /usr/libexec/stickshift/cartridges/jenkins-1.4/info/bin/git_ssh_wrapper.sh /var/lib/stickshift/8cb9cf4a6190473bb3dfc6e877e6dc2a/python-2.6/ci/jenkins/workspace/django-build/ '0cd584ab50584bb98e33883364033581@django-cgoletrew.dev.rhcloud.com:~/django/repo/'
+ /usr/libexec/stickshift/cartridges/jenkins-1.4/info/bin/git_ssh_wrapper.sh 0cd584ab50584bb98e33883364033581@django-cgoletrew.dev.rhcloud.com deploy.sh
Running .openshift/action_hooks/deploy
Executing 'python /var/lib/stickshift/0cd584ab50584bb98e33883364033581/app-root/runtime/repo//wsgi/openshift/manage.py syncdb --noinput'
Traceback (most recent call last):
  File "/var/lib/stickshift/0cd584ab50584bb98e33883364033581/app-root/runtime/repo/wsgi/openshift/manage.py", line 2, in <module>
    from django.core.management import execute_manager
ImportError: No module named django.core.management
Executing 'python /var/lib/stickshift/0cd584ab50584bb98e33883364033581/app-root/runtime/repo//wsgi/openshift/manage.py collectstatic --noinput'
Traceback (most recent call last):
  File "/var/lib/stickshift/0cd584ab50584bb98e33883364033581/app-root/runtime/repo/wsgi/openshift/manage.py", line 2, in <module>
    from django.core.management import execute_manager
ImportError: No module named django.core.management
Build step 'Execute shell' marked build as failure
Archiving artifacts
Finished: FAILURE
Comment 7 Ram Ranganathan 2012-10-02 16:44:40 EDT
The fix for bug 862078 will fix this issue. Please test this once that bug fix is in devenv.

*** This bug has been marked as a duplicate of bug 862078 ***

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