Closed Bug 1095589 Opened 11 years ago Closed 11 years ago

"manage.py syncdb" not working on prod

Categories

(Socorro :: Infra, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rhelmer, Assigned: rhelmer)

References

Details

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
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
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
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.