Migration error for south adapter! Upgrade the edx_platform_version to named-release/dogwood

273 views
Skip to first unread message

melvin bautista

unread,
Mar 4, 2016, 5:11:43 AM3/4/16
to General Open edX discussion
Hi all!
I try to upgrade the edx_platform_version: 'hotfix-2015-11-10 to edx_platform_version: 'named-release/dogwood'
But i encounter error while running the ansible script:

TASK: [edxapp | migrate] ******************************************************
 => (item=lms) => {"changed": true, "cmd": ["/edx/bin/edxapp-migrate-lms"], "delta": "0:00:03.658992", "end": "2016-03-04 18:01:05.218580", "item": "lms", "rc": 1, "start": "2016-03-04 18:01:01.559588", "warnings": []}
stderr: 2016-03-04 18:01:04,758 INFO 25562 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125
System check identified some issues:

WARNINGS:
wiki.ArticleRevision.ip_address: (fields.W900) IPAddressField has been deprecated. Support for it (except in historical migrations) will be removed in Django 1.9.
    HINT: Use GenericIPAddressField instead.
2016-03-04 18:01:05,023 WARNING 25562 [py.warnings] util.py:8 - /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/south/db/generic.py:9: RemovedInDjango19Warning: The django.db.backends.util module has been renamed. Use django.db.backends.utils instead.
  from django.db.backends.util import truncate_name

There is no South database module 'south.db.mysql' for your database. Please either choose a supported database, check for SOUTH_DATABASE_ADAPTER[S] settings, or remove South from INSTALLED_APPS.
failed: [10.0.3.131] => (item=cms) => {"changed": true, "cmd": ["/edx/bin/edxapp-migrate-cms"], "delta": "0:00:04.248434", "end": "2016-03-04 18:01:09.753658", "item": "cms", "rc": 1, "start": "2016-03-04 18:01:05.505224", "warnings": []}
stderr: 2016-03-04 18:01:09,378 INFO 25588 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125
2016-03-04 18:01:09,552 WARNING 25588 [py.warnings] util.py:8 - /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/south/db/generic.py:9: RemovedInDjango19Warning: The django.db.backends.util module has been renamed. Use django.db.backends.utils instead.
  from django.db.backends.util import truncate_name

There is no South database module 'south.db.mysql' for your database. Please either choose a supported database, check for SOUTH_DATABASE_ADAPTER[S] settings, or remove South from INSTALLED_APPS.

FATAL: all hosts have already failed -- aborting


seems that the south adapters database is remove in dogwood release.. How can i do the migration of the database??

Thanks in advance!

Ned Batchelder

unread,
Mar 4, 2016, 5:37:18 AM3/4/16
to edx-...@googlegroups.com
​This kind of question is better asked on the openedx-ops list: https://groups.google.com/forum/#!forum/openedx-ops

But since we have started here: what kind of installation do you have, what modifications did you make to it, and what instructions were you following to upgrade to Dogwood?   Remember that upgrading from Cypress to Dogwood is *complicated*: http://edx.readthedocs.org/projects/open-edx-icr/en/dogwood/dogwood.html . 

--Ned.

--
You received this message because you are subscribed to the Google Groups "General Open edX discussion" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/edx-code/c564938e-5a3f-4fba-ba11-2cb02e0a6085%40googlegroups.com.

melvin bautista

unread,
Mar 7, 2016, 2:34:42 AM3/7/16
to edx-...@googlegroups.com
Hi Ned sorry for posting the question here.

This is what i follow:
1) make sure to set the migrate_db variable to false (you will want to perform the migrations manually rather than have ansible do it at deploy time):
  - checkout the tag "release-2015-11-09" on the first one (this is the last release before django 1.8 upgrade)
  - checkout the tag "dogwood-first-18" on the second new server (this is the first django 1.8 release)
  - checkout "named-release/dogwood" on the third new server (this is the final dogwood release)

2) Once all three servers are ready, backup your mysql/mongo databases.

3) SSH into the first new server (the one hosting "release-2015-11-09" code), and migrate edx-platform and xqueue databases:
  sudo -Hu edxapp bash
  cd
  source edxapp_env
  cd edx-platform
  ./manage.py lms syncdb --migrate --settings aws && ./manage.py cms syncdb --migrate --settings aws

  exit

  sudo -Hu xqueue bash
  cd
  source venvs/xqueue/bin/activate
  cd xqueue
  SERVICE_VARIANT=xqueue /edx/app/xqueue/venvs/xqueue/bin/django-admin.py syncdb --migrate --settings=xqueue.aws_settings --pythonpath=/edx/app/xqueue/xqueue

4) SSH into the second new server (the one hosting "dogwood-first-18" code), and migrate edx-platform and xqueue databases, using --fake-initial flag:

  sudo -Hu edxapp bash
  cd
  source edxapp_env
  cd edx-platform
  ./manage.py lms migrate --settings=aws --fake-initial --noinput && ./manage.py cms migrate --settings=aws --fake-initial --noinput

But on the 4th step i ecnounter this error:

WARNINGS:
wiki.ArticleRevision.ip_address: (fields.W900) IPAddressField has been deprecated. Support for it (except in historical migrations) will be removed in Django 1.9.
HINT: Use GenericIPAddressField instead.
2016-03-07 15:29:04,710 WARNING 6055 [py.warnings] util.py:8 - /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/south/db/generic.py:9: RemovedInDjango19Warning: The django.db.backends.util module has been renamed. Use django.db.backends.utils instead.

from django.db.backends.util import truncate_name

There is no South database module 'south.db.mysql' for your database. Please either choose a supported database, check for SOUTH_DATABASE_ADAPTER[S] settings, or remove South from INSTALLED_APPS.

i know that because of the upgraded version of django but so far my database use the south.db.mysql. How can i remove that so that i can migrate successfuly?


-Melvin


Message has been deleted

Puntxo

unread,
Mar 7, 2016, 10:21:51 AM3/7/16
to General Open edX discussion
We also need to migrate our production servers from birch release to cypress and then to dogwood. We are trying with test servers and have encountered lots of errors with the migration script. We have fixed some of them with the help of other people comments, but my feeling is that there are so many components involved in the migration process that may vary, version changes, git tags removed, etc. that makes it unpredictable, so it that can either work fine one day or fail the next. Our main worry is that we want to preserve our data, but we don't mind if we loose the configuration settings, because probably we'll have to review them anyway in the new release. So, could be possible to group all the db migrations changes in one or several scripts, so we could migrate only the data using a reliable and not external factors dependent process? Is there any place where we can collect that information?

Walter Brunner

unread,
Jun 21, 2016, 12:14:31 PM6/21/16
to General Open edX discussion
Hi Puntxo,
do you have any info about this migration script for the database from birch to cypress to dogwood since your post in march? I would also need it here, because I didn't manage to upgrade my install and we decided to try with a new one.
Walter 

javier....@teltek.es

unread,
Sep 7, 2016, 6:54:13 AM9/7/16
to General Open edX discussion
Did you update the platform? Im in the same situation. 

Walter Brunner

unread,
Sep 8, 2016, 6:25:47 AM9/8/16
to General Open edX discussion
I did not update the Platform, but did a fresh install and imported the Database and mongodb from the old server. 
Find attached my "backup-script" for the database on the old server. I have some where clauses to avoid double ids. You have to check if there is some not default data in the other tables, but these were the tables where there were changes on our system.
dodbbackup.sh
Reply all
Reply to author
Forward
0 new messages