On Fri, 26 May 2017 18:20:07 +1000
Brian May <b...@debian.org> wrote:

> Neil Williams <codeh...@debian.org> writes:
> 
> >   Applying linaro_django_xmlrpc.0001_initial... FAKED  
> 
> I am speculating this line might be very relevant. Taken from the
> Django 1.8 migration.
> 
> Looks like this never had a migration before, so now needs to be
> faked. I wonder if this is what is triggering the Django 1.10 bug.
> 
> To the best of my knowledge this should still be supported.
> 
> If I am right, then it should be possible to work around this by
> manually applying the migration in fake mode.

My first thought as well, but once the bug has triggered, django 1.10
refuses to even fake migrations, either linaro_django_xmlrpc or
lava_scheduler_app or any of the other apps in lava-server.

1.8 proceeds happily and as long as the user doesn't tinker too much
with trying to force migrations, downgrading to 1.8 does fix the
problem. Get the attempted fix wrong and the migrations fail to the
point where the database has to be restored from backup. (So if you're
testing this locally, snapshot the VM when you get to the point of
django 1.10 installed with lava-server 2016.12-1 partially installed):

iF  lava-server                   2016.12-1           all
ii  python-django                 1:1.10.7-1          all

I've been thinking it's related to these fixes in 1.10:
https://code.djangoproject.com/ticket/22325
https://code.djangoproject.com/ticket/27004

(as described in python-django-1.10.7/docs/releases/1.10.1.txt)

This is what happens with initial attempts to use --fake

neil@jessie:~$ sudo lava-server manage migrate linaro_django_xmlrpc 
--fake-initial 
...

django.db.migrations.exceptions.InconsistentMigrationHistory: Migration
lava_scheduler_app.0001_initial is applied before its dependency
linaro_django_xmlrpc.0001_initial on database 'default'.


neil@jessie:~$ sudo lava-server manage migrate linaro_django_xmlrpc 
--fake-initial
.....
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration
lava_scheduler_app.0001_initial is applied before its dependency
linaro_django_xmlrpc.0001_initial on database 'default'.


neil@jessie:~$ sudo lava-server manage migrate linaro_django_xmlrpc
....
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration
lava_scheduler_app.0001_initial is applied before its dependency
linaro_django_xmlrpc.0001_initial on database 'default'.

neil@jessie:~$ sudo lava-server manage migrate lava_scheduler_app --fake-initial
.....
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration
lava_scheduler_app.0001_initial is applied before its dependency
linaro_django_xmlrpc.0001_initial on database 'default'.

neil@jessie:~$ sudo lava-server manage migrate lava_scheduler_app --fake
....
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration
lava_scheduler_app.0001_initial is applied before its dependency
linaro_django_xmlrpc.0001_initial on database 'default'.



-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/

Attachment: pgpn0PXyTzORR.pgp
Description: OpenPGP digital signature

_______________________________________________
Python-modules-team mailing list
Python-modules-team@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team

Reply via email to