Closed alxschwarz closed 8 years ago
How annoying. I guess it needs to be
python manage.py syncdb --migrate
In the fabfile.
Can you try and let me know how you get on?
I just tried it but the result is the same.
@AlexFinn can you try again with master? I've merged #328 to revert the changes that I think have caused this
@dbuxton log:
out: > cabotapp:0010_plugin_data_migration
out: Adding content type 'cabotapp | alertpluginuserdata'
out: Adding content type 'cabotapp | service'
out: Adding content type 'cabotapp | instancestatussnapshot'
out: Adding content type 'cabotapp | graphitestatuscheck'
out: Adding content type 'cabotapp | statuscheckresult'
out: Adding content type 'cabotapp | instance'
out: Adding content type 'cabotapp | jenkinsstatuscheck'
out: Adding content type 'cabotapp | shift'
out: Adding content type 'cabotapp | alertplugin'
out: Adding content type 'cabotapp | httpstatuscheck'
out: Adding content type 'cabotapp | servicestatussnapshot'
out: Adding content type 'cabotapp | icmpstatuscheck'
out: Adding content type 'cabotapp | statuscheck'
out: Adding content type 'cabotapp | alertacknowledgement'
out: Adding content type 'cabotapp | userprofile'
out: Error in migration: cabotapp:0010_plugin_data_migration
out: Traceback (most recent call last):
out: File "manage.py", line 11, in <module>
out: execute_from_command_line(sys.argv)
out: File "/home/ubuntu/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
out: utility.execute()
out: File "/home/ubuntu/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
out: self.fetch_command(subcommand).run_from_argv(self.argv)
out: File "/home/ubuntu/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
out: self.execute(*args, **options.__dict__)
out: File "/home/ubuntu/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
out: output = self.handle(*args, **options)
out: File "/home/ubuntu/venv/local/lib/python2.7/site-packages/south/management/commands/migrate.py", line 111, in handle
out: ignore_ghosts = ignore_ghosts,
out: File "/home/ubuntu/venv/local/lib/python2.7/site-packages/south/migration/__init__.py", line 220, in migrate_app
out: success = migrator.migrate_many(target, workplan, database)
out: File "/home/ubuntu/venv/local/lib/python2.7/site-packages/south/migration/migrators.py", line 256, in migrate_many
out: result = migrator.__class__.migrate_many(migrator, target, migrations, database)
out: File "/home/ubuntu/venv/local/lib/python2.7/site-packages/south/migration/migrators.py", line 331, in migrate_many
out: result = self.migrate(migration, database)
out: File "/home/ubuntu/venv/local/lib/python2.7/site-packages/south/migration/migrators.py", line 133, in migrate
out: result = self.run(migration, database)
out: File "/home/ubuntu/venv/local/lib/python2.7/site-packages/south/migration/migrators.py", line 114, in run
out: return self.run_migration(migration, database)
out: File "/home/ubuntu/venv/local/lib/python2.7/site-packages/south/migration/migrators.py", line 84, in run_migration
out: migration_function()
out: File "/home/ubuntu/venv/local/lib/python2.7/site-packages/south/migration/migrators.py", line 60, in <lambda>
out: return (lambda: direction(orm))
out: File "/home/ubuntu/2016-03-29-fa61497/cabot/cabotapp/migrations/0010_plugin_data_migration.py", line 28, in forwards
out: polymorphic_ctype = orm['contenttypes.contenttype'].objects.get(model='hipchatalert'),
out: File "/home/ubuntu/venv/local/lib/python2.7/site-packages/django/db/models/manager.py", line 151, in get
out: return self.get_queryset().get(*args, **kwargs)
out: File "/home/ubuntu/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 304, in get
out: num = len(clone)
out: File "/home/ubuntu/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 77, in __len__
out: self._fetch_all()
out: File "/home/ubuntu/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 857, in _fetch_all
out: self._result_cache = list(self.iterator())
out: File "/home/ubuntu/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 220, in iterator
out: for row in compiler.results_iter():
out: File "/home/ubuntu/venv/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 713, in results_iter
out: for rows in self.execute_sql(MULTI):
out: File "/home/ubuntu/venv/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 786, in execute_sql
out: cursor.execute(sql, params)
out: File "/home/ubuntu/venv/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
out: return self.cursor.execute(sql, params)
out: File "/home/ubuntu/venv/local/lib/python2.7/site-packages/django/db/utils.py", line 99, in __exit__
out: six.reraise(dj_exc_type, dj_exc_value, traceback)
out: File "/home/ubuntu/venv/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
out: return self.cursor.execute(sql, params)
out: django.db.utils.InternalError: current transaction is aborted, commands ignored until end of transaction block
out:
out:
Fatal error: sudo() received nonzero return code 1 while executing!
Requested: foreman run -e conf/production.env python manage.py migrate cabotapp --noinput
Executed: sudo -S -p 'sudo password:' /bin/bash -l -c "cd /home/ubuntu/2016-03-29-fa61497 >/dev/null && source /home/ubuntu/venv/bin/activate && foreman run -e conf/production.env python manage.py migrate cabotapp --noinput"
Aborting.
Did you drop the database first?
it was clean instance
@AlexFinn is it working for you now?
@cmclaughlin I will try tomorrow
@cmclaughlin @dbuxton All works! Thanks :)
and little "error":
[ubuntu@54.173.] sudo: restart cabot
[ubuntu@54.173.] out: restart: Unknown instance:
[ubuntu@54.173.] out:
Warning: sudo() received nonzero return code 1 while executing 'restart cabot'!
[ubuntu@54.173.] sudo: start cabot
[ubuntu@54.173.] out: cabot start/running
[ubuntu@54.173.] out:
Done!
Thanks for testing @AlexFinn :)
:)
Log: