Bug 1019643

Summary: [deploy][origin_ui_82]force clean build doesn't work when rhc deploy with --force-clean-build option (no force_clean_build marker added)
Product: OpenShift Online Reporter: Yan Du <yadu>
Component: ContainersAssignee: Andy Goldstein <agoldste>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: agoldste, ffranz, xtian, zhewang
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-24 03:24:18 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:
Bug Depends On: 1018969    
Bug Blocks:    

Description Yan Du 2013-10-16 07:55:21 UTC
Description of problem:

Install dependenice for the app, then remove the dependenices and  deploy with force-clean-build, when readd the dependenice to app and  deploy, found the dependenice will not redownload and reinstall. just  show   "Django 1.5.4 is already the active version in easy-install.pth" 


Test same situation with force_clean_build marker, and the marker works, dependencies will redownload and reinstalled.



Version-Release number of selected component (if applicable):
devenv_3901
fork_ami_origin_ui_82_910
rhc-1.16.0 (build from fork_ami_origin_ui_82_910)



How reproducible:
Always


Steps to Reproduce:
1. Create a python-2.6 app
2. rhc configure-app -a p26 --no-auto-deploy
3. In local repo, add some dependencies to setup.py file and git push
4. Manual deploy the app: 
  # rhc deploy 4f5e1fd -a p26 
5. Remove the dependencies in setup.py and deploy with --force-clean-build option
  # rhc deploy 403b996 -a p26 --force-clean-build
6. check the deployment list by rhc deployment list command
7. Add same dependencies in setup.py again and deploy
  # rhc deploy b429c47 -a p26


Actual results:
step4, dependencies can be downloaded and installed

step6, 
[root@Daphne p26]# rhc deployment list
Deployment ID e299ffd8 (active)
-------------------------------
  Git Reference:     45754e3
  SHA1:              45754e3
  Created At:        1:21 PM
  Hot Deploy:        false
  Force Clean Build: true
  Activations:       1:22 PM

step7, the dependencies will not redownload and reinstalled

[root@Daphne p26]# rhc deploy 403b996 -a p26 
Deployment of git ref '403b996' in progress for application p26 ...
Stopping PYTHON cart
Waiting for stop to finish
Building git ref '403b996', commit 403b996
running develop
running egg_info
creating YourAppName.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
writing manifest file 'YourAppName.egg-info/SOURCES.txt'
reading manifest file 'YourAppName.egg-info/SOURCES.txt'
writing manifest file 'YourAppName.egg-info/SOURCES.txt'
running build_ext
Creating
/var/lib/openshift/525e1fd9704669359000002b/app-deployments/2013-10-16_01-23-22.604/dependencies/virtenv/lib/python2.6/site-packages/YourAppName.egg-link
(link to .)
Adding YourAppName 1.0 to easy-install.pth file
Installed /var/lib/openshift/525e1fd9704669359000002b/app-deployments/2013-10-16_01-23-22.604/repo
Processing dependencies for YourAppName==1.0
Searching for Django==1.5.4
Best match: Django 1.5.4
Processing Django-1.5.4-py2.6.egg
Django 1.5.4 is already the active version in easy-install.pth
Installing django-admin.py script to /var/lib/openshift/525e1fd9704669359000002b/python/virtenv/bin
Using
/var/lib/openshift/525e1fd9704669359000002b/app-deployments/2013-10-16_01-23-22.604/dependencies/virtenv/lib/python2.6/site-packages/Django-1.5.4-py2.6.egg
Finished processing dependencies for YourAppName==1.0
Script /var/lib/openshift/525e1fd9704669359000002b/python//virtenv/bin/activate.csh cannot be made relative
(it's not a normal script that starts with
#!/var/lib/openshift/525e1fd9704669359000002b/python/virtenv/bin/python)
Script /var/lib/openshift/525e1fd9704669359000002b/python//virtenv/bin/activate.fish cannot be made relative
(it's not a normal script that starts with
#!/var/lib/openshift/525e1fd9704669359000002b/python/virtenv/bin/python)
Preparing build for deployment
Prepared deployment artifacts in
/var/lib/openshift/525e1fd9704669359000002b/app-deployments/2013-10-16_01-23-22.604
Deployment id is 707f0a8d
Activating deployment
Script /var/lib/openshift/525e1fd9704669359000002b/python//virtenv/bin/activate.csh cannot be made relative
(it's not a normal script that starts with
#!/var/lib/openshift/525e1fd9704669359000002b/python/virtenv/bin/python)
Script /var/lib/openshift/525e1fd9704669359000002b/python//virtenv/bin/activate.fish cannot be made relative
(it's not a normal script that starts with
#!/var/lib/openshift/525e1fd9704669359000002b/python/virtenv/bin/python)
Starting PYTHON cart




Expected results:
step6, should redownload and reinstall denpendencies



Additional info:

Comment 1 Andy Goldstein 2013-10-16 12:17:02 UTC
There is an issue with force_clean_build that I'm working on. This is related to https://bugzilla.redhat.com/show_bug.cgi?id=1018969 and will be fixed when that bug is resolved.

Comment 2 Zhe Wang 2013-10-17 08:10:40 UTC
Force clean build also fails with the presence of a force_clean_build marker in devenv_3907.

Comment 3 Zhe Wang 2013-10-17 08:40:48 UTC
Sorry, the information in comment#2 was insufficient. force_clean_build only fails with Jenkins builds, and after removing the Jenkins client, the marker works again. I will open a new bug for this problem.

Comment 4 Andy Goldstein 2013-10-17 16:06:53 UTC
https://github.com/openshift/origin-server/pull/3913

Comment 5 Yan Du 2013-10-21 02:58:28 UTC
test on devenv_3921

After  deploy the app with the option --force-clean-build, re-added the dependencies and it will redownload and reinstall:

[root@Daphne p26]# rhc deploy master -a p26
Deployment of git ref 'master' in progress for application p26 ...
Stopping PYTHON cart
Waiting for stop to finish
Building git ref 'master', commit 5da5616
running develop
running egg_info
creating YourAppName.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
writing manifest file 'YourAppName.egg-info/SOURCES.txt'
reading manifest file 'YourAppName.egg-info/SOURCES.txt'
writing manifest file 'YourAppName.egg-info/SOURCES.txt'
running build_ext
Creating /var/lib/openshift/5264937c20dcc7e8050000bb/app-deployments/2013-10-20_22-50-22.548/dependencies/python/virtenv/lib/python2.6/site-packages/YourAppName.egg-link (link to .)
Adding YourAppName 1.0 to easy-install.pth file

Installed /var/lib/openshift/5264937c20dcc7e8050000bb/app-deployments/2013-10-20_22-50-22.548/repo
Processing dependencies for YourAppName==1.0
Searching for Django>=1.3
Reading http://mirror1.ops.rhcloud.com/mirror/python/web/simple/Django/
Best match: Django 1.5.4
Downloading http://mirror1.ops.rhcloud.com/mirror/python/web/packages/source/D/Django/Django-1.5.4.tar.gz#md5=b2685469bb4d1fbb091316e21f4108de
Processing Django-1.5.4.tar.gz
Writing /tmp/easy_install-CKfoH3/Django-1.5.4/setup.cfg
Running Django-1.5.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-CKfoH3/Django-1.5.4/egg-dist-tmp-ZJLK3Z
warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
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 __file__
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.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.admin.bin.compress: 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.http: 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.db.utils: module references __file__
django.db.models.loading: module references __file__
django.template.loaders.app_directories: module references __file__
Adding Django 1.5.4 to easy-install.pth file
Installing django-admin.py script to /var/lib/openshift/5264937c20dcc7e8050000bb/python/virtenv/bin

Installed /var/lib/openshift/5264937c20dcc7e8050000bb/app-deployments/2013-10-20_22-50-22.548/dependencies/python/virtenv/lib/python2.6/site-packages/Django-1.5.4-py2.6.egg
Finished processing dependencies for YourAppName==1.0
Script /var/lib/openshift/5264937c20dcc7e8050000bb/python//virtenv/bin/activate.csh cannot be made relative (it's not a normal script that starts with #!/var/lib/openshift/5264937c20dcc7e8050000bb/python/virtenv/bin/python)
Script /var/lib/openshift/5264937c20dcc7e8050000bb/python//virtenv/bin/activate.fish cannot be made relative (it's not a normal script that starts with #!/var/lib/openshift/5264937c20dcc7e8050000bb/python/virtenv/bin/python)
Preparing build for deployment
Prepared deployment artifacts in /var/lib/openshift/5264937c20dcc7e8050000bb/app-deployments/2013-10-20_22-50-22.548
Deployment id is dbe70645
Activating deployment
Script /var/lib/openshift/5264937c20dcc7e8050000bb/python//virtenv/bin/activate.csh cannot be made relative (it's not a normal script that starts with #!/var/lib/openshift/5264937c20dcc7e8050000bb/python/virtenv/bin/python)
Script /var/lib/openshift/5264937c20dcc7e8050000bb/python//virtenv/bin/activate.fish cannot be made relative (it's not a normal script that starts with #!/var/lib/openshift/5264937c20dcc7e8050000bb/python/virtenv/bin/python)
Starting PYTHON cart
Success


move the bug to verified