Hey @BYK , first of all thanks for your quick support, so what i did:
-migrated from 9.12 not-containerized to containerized one
1)installed Sentry 9.1.2 containerized from scratch (https://github.com/getsentry/onpremise)
2)imported old dump from not-containerized setup to new one
so far all was fine, dump imported without any issues, dashboard was reachable with all data inside etc.
next step was to upgrade from 9.12 containerized to 20.6.0
What i did:
1)git checkout releases/20.9.0 (instead of 9.12)
2)./install.sh
3) after 5-10 minutes get this error:
Faking migration for contenttypes.0001_initial
Faking migration for contenttypes.0002_remove_content_type_name
Faking migration for auth.0001_initial
Faking migration for auth.0002_alter_permission_name_max_length
Faking migration for auth.0003_alter_user_email_max_length
Faking migration for auth.0004_alter_user_username_opts
Faking migration for auth.0005_alter_user_last_login_null
Faking migration for auth.0006_require_contenttypes_0002
Faking migration for sites.0001_initial
Faking migration for admin.0001_initial
Faking migration for sessions.0001_initial
Operations to perform:
Apply all migrations: admin, auth, contenttypes, jira_ac, nodestore, sentry, sessions, sites, social_auth
Running migrations:
Applying admin.0002_logentry_remove_auto_add… OK
Applying auth.0007_alter_validators_add_error_messages… OK
Applying auth.0008_alter_user_username_max_length… OK
Applying sentry.0002_912_to_recent…Traceback (most recent call last):
File “/usr/local/bin/sentry”, line 8, in
sys.exit(main())
File “/usr/local/lib/python2.7/site-packages/sentry/runner/init.py”, line 166, 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 30, 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 174, in upgrade
_upgrade(not noinput, traceback, verbosity, not no_repair, with_nodestore)
File “/usr/local/lib/python2.7/site-packages/sentry/runner/commands/upgrade.py”, line 130, in _upgrade
ignore_ghost_migrations=True,
File “/usr/local/lib/python2.7/site-packages/django/core/management/init.py”, line 131, in call_command
return command.execute(*args, **defaults)
File “/usr/local/lib/python2.7/site-packages/django/core/management/base.py”, line 330, in execute
output = self.handle(*args, **options)
File “/usr/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py”, line 204, in handle
fake_initial=fake_initial,
File “/usr/local/lib/python2.7/site-packages/django/db/migrations/executor.py”, line 115, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File “/usr/local/lib/python2.7/site-packages/django/db/migrations/executor.py”, line 145, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File “/usr/local/lib/python2.7/site-packages/sentry/new_migrations/monkey/executor.py”, line 26, in apply_migration
state, migration, fake=fake, fake_initial=fake_initial
File “/usr/local/lib/python2.7/site-packages/django/db/migrations/executor.py”, line 244, in apply_migration
state = migration.apply(state, schema_editor)
File “/usr/local/lib/python2.7/site-packages/django/db/migrations/migration.py”, line 129, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
File “/usr/local/lib/python2.7/site-packages/django/db/migrations/operations/fields.py”, line 221, in database_forwards
schema_editor.alter_field(from_model, from_field, to_field)
File “/usr/local/lib/python2.7/site-packages/django/db/backends/base/schema.py”, line 531, in alter_field
old_db_params, new_db_params, strict)
File “/usr/local/lib/python2.7/site-packages/django/db/backends/postgresql/schema.py”, line 112, in _alter_field
new_db_params, strict,
File “/usr/local/lib/python2.7/site-packages/django/db/backends/base/schema.py”, line 706, in _alter_field
params,
File “/usr/local/lib/python2.7/site-packages/django/db/backends/base/schema.py”, line 136, in execute
cursor.execute(sql, params)
File “/usr/local/lib/python2.7/site-packages/sentry_sdk/integrations/django/init.py”, line 489, in execute
return real_execute(self, sql, params)
File “/usr/local/lib/python2.7/site-packages/django/db/backends/utils.py”, line 64, in execute
return self.cursor.execute(sql, params)
File “/usr/local/lib/python2.7/site-packages/django/db/utils.py”, line 94, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File “/usr/local/lib/python2.7/site-packages/django/db/backends/utils.py”, line 64, in execute
return self.cursor.execute(sql, params)
File “/usr/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py”, line 81, in inner
raise_the_exception(self.db, e)
File “/usr/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py”, line 79, in inner
return func(self, *args, **kwargs)
File “/usr/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py”, line 22, in inner
return func(self, *args, **kwargs)
File “/usr/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py”, line 99, in inner
six.reraise(exc_info[0], exc_info0, exc_info[2])
File “/usr/local/lib/python2.7/site-packages/sentry/db/postgres/decorators.py”, line 95, in inner
return func(self, sql, *args, **kwargs)
File “/usr/local/lib/python2.7/site-packages/sentry/db/postgres/base.py”, line 78, in execute
return self.cursor.execute(sql, clean_bad_params(params))
django.db.utils.IntegrityError: NotNullViolation(‘column “project_id” contains null values\n’,)
SQL: ALTER TABLE “sentry_groupedmessage” ALTER COLUMN “project_id” SET NOT NULL
An error occurred, caught SIGERR on line 280
Cleaning up…
[root@jumphost onpremise]#
any ideas how to avoid this error and what went wrong?
Kristaps