Revert "[autotest] Remove synch_id from database"
This reverts commit eb97ee7fffb4a2ef3155b07f2aa71f04d574b642.
But not quite. We never revert DB migration scripts, especially if
they've been run on any servers. So, this CL adds a new migration (111)
to revert the migration (110) that was already applied to the test
servers.
To reland, remove synch_id once again via a new migration.
Reason for revert:
This CL requires lab downtime for push-to-prod because host_scheduler
can not be cleanly restarted across this CL.
To push this CL to lab, one must:
- close the lab.
- migrate DB to the new schema (host_scheduler starts failing)
- push the CL to lab (host_scheduler recovers)
- open the lab.
Now is not the time to do this dance, so reverting with the hope to
reland at a better time.
BUG=chromium:696691
TEST=test_push host_scheduler can start with tip-of-tree code and with
tip-of-prod after applying both migration 110 and 111.
Change-Id: If2f5428f100af400d498eded9dfb08d6f22aa4dc
Reviewed-on: https://chromium-review.googlesource.com/447200
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Dan Shi <dshi@google.com>
diff --git a/frontend/afe/models_test.py b/frontend/afe/models_test.py
index f0cf5ab..a4eabfd 100755
--- a/frontend/afe/models_test.py
+++ b/frontend/afe/models_test.py
@@ -1,14 +1,13 @@
#!/usr/bin/python
+import datetime
import unittest
-
import common
-from autotest_lib.client.common_lib import control_data
-from autotest_lib.client.common_lib import global_config
from autotest_lib.frontend import setup_django_environment
from autotest_lib.frontend.afe import frontend_test_utils
-from autotest_lib.frontend.afe import model_logic
-from autotest_lib.frontend.afe import models
+from autotest_lib.frontend.afe import models, model_attributes, model_logic
+from autotest_lib.client.common_lib import global_config
+from autotest_lib.client.common_lib import control_data
class AclGroupTest(unittest.TestCase,
@@ -447,7 +446,8 @@
'locked': False,
'protection': 0,
'shard': {'hostname': '1', 'id': 1},
- 'status': 'Ready'}],
+ 'status': 'Ready',
+ 'synch_id': None}],
'jobs': [{'control_file': 'some control file\n\n\n',
'control_type': 2,
'created_on': '2014-09-04T13:09:35',