Bug#863939: unblock: lava-server/2016.12-2
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
Please unblock package lava-server
When migrating from jessie to stretch the migration did not complete due to the
bug reported here - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=847277
This is fixed with a patch available upstream here
https://review.linaro.org/#/c/19816/
There is a new upload with the above patch to unstable which fixes the
migration issue as observed in bug #847277
As a DM, I do not have upload privileges to lava-server package and the rest of
the active "Debian LAVA team" maintainers (DD) are on vacation this week, DD
Ritesh Raj Sarraf (rrs) sponsored to upload this package.
We are targeting this upload for inclusion into Debian Stretch release and
would request the Release team to do the needful.
unblock lava-server/2016.12-2
-- System Information:
Debian Release: 9.0
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.8.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_IN, LC_CTYPE=en_IN (charmap=UTF-8), LANGUAGE=en_IN:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru lava-server-2016.12/debian/changelog lava-server-2016.12/debian/changelog
--- lava-server-2016.12/debian/changelog 2016-12-22 17:20:17.000000000 +0530
+++ lava-server-2016.12/debian/changelog 2017-06-01 22:23:12.000000000 +0530
@@ -1,3 +1,9 @@
+lava-server (2016.12-2) unstable; urgency=medium
+
+ * Add a patch to fix jessie to stretch migration (Closes: #847277)
+
+ -- Senthil Kumaran S (stylesen) <stylesen@gmail.com> Thu, 01 Jun 2017 22:23:12 +0530
+
lava-server (2016.12-1) unstable; urgency=medium
* New production release
diff -Nru lava-server-2016.12/debian/patches/Fix-migrations-from-Debian-Jessie-to-Stretch-and-ens.patch lava-server-2016.12/debian/patches/Fix-migrations-from-Debian-Jessie-to-Stretch-and-ens.patch
--- lava-server-2016.12/debian/patches/Fix-migrations-from-Debian-Jessie-to-Stretch-and-ens.patch 1970-01-01 05:30:00.000000000 +0530
+++ lava-server-2016.12/debian/patches/Fix-migrations-from-Debian-Jessie-to-Stretch-and-ens.patch 2017-06-01 22:23:12.000000000 +0530
@@ -0,0 +1,58 @@
+From b283288853c3e7baa190ab290eab54d0c3613671 Mon Sep 17 00:00:00 2001
+From: Senthil Kumaran S <senthil.kumaran@linaro.org>
+Date: Mon, 29 May 2017 17:39:39 +0530
+Subject: [PATCH 1/3] Fix migrations from Debian Jessie to Stretch and ensure
+ smooth upgrade.
+
+Django 1.10.1 introduces consistency checks which introduces dependency
+problem with the order in which lava_scheduler_app and linaro_django_xmlrpc
+initial migrations gets applied.
+
+Related bugs:
+* Debian:
+ https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863267
+ https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=847277
+
+* Django:
+ https://code.djangoproject.com/ticket/28250
+
+Change-Id: I4ea7632d9e98d6fd5e01aca65c37410ce7dd628a
+---
+ lava_scheduler_app/migrations/0001_initial.py | 16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+diff --git a/lava_scheduler_app/migrations/0001_initial.py b/lava_scheduler_app/migrations/0001_initial.py
+index e3216829..eda8572b 100644
+--- a/lava_scheduler_app/migrations/0001_initial.py
++++ b/lava_scheduler_app/migrations/0001_initial.py
+@@ -1,12 +1,26 @@
+ # -*- coding: utf-8 -*-
+ from __future__ import unicode_literals
+
+-from django.db import models, migrations
++from django.db import models, migrations, DEFAULT_DB_ALIAS, connections
++from django.db.migrations.recorder import MigrationRecorder
+ import django.db.models.deletion
+ from django.conf import settings
+ import lava_scheduler_app.models
+
+
++connection = connections[DEFAULT_DB_ALIAS]
++recorder = MigrationRecorder(connection)
++linaro_django_xmlrpc_applied = False
++lava_scheduler_app_applied = False
++for app, name in recorder.applied_migrations():
++ if app == 'linaro_django_xmlrpc' and name == '0001_initial':
++ linaro_django_xmlrpc_applied = True
++ if app == 'lava_scheduler_app' and name == '0001_initial':
++ lava_scheduler_app_applied = True
++if not linaro_django_xmlrpc_applied and lava_scheduler_app_applied:
++ recorder.record_applied('linaro_django_xmlrpc', '0001_initial')
++
++
+ class Migration(migrations.Migration):
+
+ dependencies = [
+--
+2.11.0
+
diff -Nru lava-server-2016.12/debian/patches/series lava-server-2016.12/debian/patches/series
--- lava-server-2016.12/debian/patches/series 1970-01-01 05:30:00.000000000 +0530
+++ lava-server-2016.12/debian/patches/series 2017-06-01 22:23:12.000000000 +0530
@@ -0,0 +1 @@
+Fix-migrations-from-Debian-Jessie-to-Stretch-and-ens.patch
Reply to: