"manage.py syncdb" not working on prod

RESOLVED FIXED

Status

Socorro
Infra
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: rhelmer, Assigned: rhelmer)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

4 years ago
We haven't needed this for a while, but the way "manage.py syncdb" is run does not use the virtualenv in the prod update script and so does not work.

From bug 1095025:
Nov 06 19:13:59 socorroadm update[9637] Running syncdb
Traceback (most recent call last):
  File "socorro/webapp-django/manage.py", line 7, in <module>
    from funfactory import manage
ImportError: No module named funfactory
(Assignee)

Comment 1

4 years ago
This particular doesn't appear to be checked in so I made this modification, after making a backup copy:

[rhelmer@socorroadm.private.phx1 crash-stats.mozilla.org]$ diff -u update-20141107 update
--- update-20141107	2014-11-07 17:21:54.888958343 +0000
+++ update	2014-11-07 17:22:28.504683819 +0000
@@ -35,7 +35,7 @@
 techo "Merging local.py"
 cp -f $DIR/local.py $DIR/socorro/webapp-django/crashstats/settings/
 techo "Running syncdb"
-python $APP/webapp-django/manage.py syncdb
+$APP/socorro-virtualenv/bin/python $APP/webapp-django/manage.py syncdb
 techo "Activating symbols_upload symlink"
 rm -rf $APP/webapp-django/media/symbols_upload
 ln -s /mnt/socorro/symbols_upload $APP/webapp-django/media
Status: NEW → ASSIGNED
(Assignee)

Comment 2

4 years ago
Ran this manually once, looks like the event_log table we were missing is now there:

[rhelmer@socorroadm.private.phx1 crash-stats.mozilla.org]$ ./socorro/socorro-virtualenv/bin/python socorro/webapp-django/manage.py syncdb
/data/crashstats/src/crash-stats.mozilla.org/socorro/socorro-virtualenv/lib/python2.6/site-packages/django/core/management/__init__.py:465: DeprecationWarning: The 'execute_manager' function is deprecated, you likely need to update your 'manage.py'; please see the Django 1.4 release notes (https://docs.djangoproject.com/en/dev/releases/1.4/).
  DeprecationWarning)
/data/crashstats/src/crash-stats.mozilla.org/socorro/socorro-virtualenv/lib/python2.6/site-packages/django/core/management/__init__.py:409: DeprecationWarning: The 'setup_environ' function is deprecated, you likely need to update your 'manage.py'; please see the Django 1.4 release notes (https://docs.djangoproject.com/en/dev/releases/1.4/).
  DeprecationWarning)
/data/crashstats/src/crash-stats.mozilla.org/socorro/socorro-virtualenv/lib/python2.6/site-packages/django/utils/hashcompat.py:9: DeprecationWarning: django.utils.hashcompat is deprecated; use hashlib instead
  DeprecationWarning)
Creating tables ...
Creating table eventlog_log
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
(Assignee)

Updated

4 years ago
Duplicate of this bug: 1095558
You need to log in before you can comment on or make changes to this bug.