When we try to upgrade from sentry 9.0 to 9.1.2,we are facing below error,could anyone help us on the same.
(use ./manage.py migrate to migrate these)
Running migrations for sentry:
- Migrating forwards to 0423_auto__add_index_grouphashtombstone_deleted_at.
> sentry:0365_auto__del_index_eventtag_project_id_key_id_value_id
FATAL ERROR - The following SQL query failed: DROP INDEX CONCURRENTLY sentry_eventtag_project_id_42979ba214ba3c43
The error was: ProgrammingError('index "sentry_eventtag_project_id_42979ba214ba3c43" does not exist\n',)
SQL: DROP INDEX CONCURRENTLY sentry_eventtag_project_id_42979ba214ba3c43
FATAL ERROR - The following SQL query failed: DROP INDEX sentry_eventtag_project_id_42979ba214ba3c43
The error was: ProgrammingError('index "sentry_eventtag_project_id_42979ba214ba3c43" does not exist\n',)
SQL: DROP INDEX sentry_eventtag_project_id_42979ba214ba3c43
Traceback (most recent call last):
File "/usr/local/bin/sentry", line 10, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/sentry/runner/__init__.py", line 162, in main
cli(prog_name=get_prog(), obj={}, max_content_width=100)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/sentry/runner/decorators.py", line 36, in inner
return ctx.invoke(f, *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/sentry/runner/commands/upgrade.py", line 67, in upgrade
_upgrade(not noinput, traceback, verbosity, not no_repair)
File "/usr/local/lib/python2.7/site-packages/sentry/runner/commands/upgrade.py", line 29, in _upgrade
verbosity=verbosity,
File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 159, in call_command
return klass.execute(*args, **defaults)
File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python2.7/site-packages/south/management/commands/migrate.py", line 115, in handle
ignore_ghosts=ignore_ghosts,
File "/usr/local/lib/python2.7/site-packages/south/migration/__init__.py", line 234, in migrate_app
success = migrator.migrate_many(target, workplan, database)
File "/usr/local/lib/python2.7/site-packages/south/migration/migrators.py", line 256, in migrate_many
result = migrator.__class__.migrate_many(migrator, target, migrations, database)
File "/usr/local/lib/python2.7/site-packages/south/migration/migrators.py", line 341, in migrate_many
result = self.migrate(migration, database)
File "/usr/local/lib/python2.7/site-packages/south/migration/migrators.py", line 132, in migrate
result = self.run(migration, database)
File "/usr/local/lib/python2.7/site-packages/south/migration/migrators.py", line 291, in run
return super(Forwards, self).run(migration, database)
File "/usr/local/lib/python2.7/site-packages/south/migration/migrators.py", line 114, in run
return self.run_migration(migration, database)
File "/usr/local/lib/python2.7/site-packages/south/migration/migrators.py", line 92, in run_migration
south.db.db.rollback_transaction()
File "/usr/local/lib/python2.7/site-packages/south/db/generic.py", line 1037, in rollback_transaction
transaction.leave_transaction_management(using=self.db_alias)
File "/usr/local/lib/python2.7/site-packages/django/db/transaction.py", line 78, in leave_transaction_management
get_connection(using).leave_transaction_management()
File "/usr/local/lib/python2.7/site-packages/django/db/backends/__init__.py", line 310, in leave_transaction_management
"This code isn't under transaction management")
django.db.transaction.TransactionManagementError: This code isn't under transaction management
we are using docker containers for sentry and linking psql which is configured in aws rds.
Host machine is amazon linux 2.
During Sentry upgrade, will the PSQL database will get any issues related INDEX recreation or something like that? Or is this a bug?
It will be great of someone, provide some information to resolve the issue.