Sentry postgres error while upgrading from 9.1.2 to 10.0.1

Hi all,
I am currently using version 9.1.2 in docker container

I updated with git pull
Then I tried running ./install.sh to upgrade
But it fails:

Setting up database…
Creating sentry_onpremise_memcached_1 …
Creating sentry_onpremise_symbolicator_1 …
Creating sentry_onpremise_postgres_1 …
Creating sentry_onpremise_smtp_1 …
Creating sentry_onpremise_snuba-outcomes-consumer_1 …
Creating sentry_onpremise_snuba-api_1 …
Creating sentry_onpremise_snuba-consumer_1 …
Creating sentry_onpremise_snuba-replacer_1 …
Creating sentry_onpremise_snuba-outcomes-consumer_1 … done
Creating sentry_onpremise_snuba-consumer_1 … done
Creating sentry_onpremise_snuba-replacer_1 … done
Creating sentry_onpremise_snuba-api_1 … done
Creating sentry_onpremise_symbolicator_1 … done
Creating sentry_onpremise_memcached_1 … done
Creating sentry_onpremise_smtp_1 … done
Creating sentry_onpremise_postgres_1 … done
Creating sentry_onpremise_web_run …
Creating sentry_onpremise_web_run … done
13:20:30 [WARNING] sentry.utils.geo: settings.GEOIP_PATH_MMDB not configured.
13:20:48 [INFO] sentry.plugins.github: apps-not-configured
Operations to perform:
Apply all migrations: nodestore, sessions, admin, sentry, jira_ac, sites, auth, social_auth, contenttypes
Running migrations:
Rendering model states… DONE
Applying sentry.0001_initial…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 164, 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 168, in upgrade
_upgrade(not noinput, traceback, verbosity, not no_repair)
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 119, in call_command
return command.execute(*args, **defaults)
File “/usr/local/lib/python2.7/site-packages/django/core/management/base.py”, line 399, in execute
output = self.handle(*args, **options)
File “/usr/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py”, line 200, in handle
executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)
File “/usr/local/lib/python2.7/site-packages/django/db/migrations/executor.py”, line 92, in migrate
self._migrate_all_forwards(plan, full_plan, fake=fake, fake_initial=fake_initial)
File “/usr/local/lib/python2.7/site-packages/django/db/migrations/executor.py”, line 121, 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 198, in apply_migration
state = migration.apply(state, schema_editor)
File “/usr/local/lib/python2.7/site-packages/django/db/migrations/migration.py”, line 123, 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/models.py”, line 59, in database_forwards
schema_editor.create_model(model)
File “/usr/local/lib/python2.7/site-packages/django/db/backends/base/schema.py”, line 284, in create_model
self.execute(sql, params or None)
File “/usr/local/lib/python2.7/site-packages/django/db/backends/base/schema.py”, line 110, in execute
cursor.execute(sql, params)
File “/usr/local/lib/python2.7/site-packages/sentry_sdk/integrations/django/init.py”, line 487, 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 95, 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 62, in execute
return self.cursor.execute(sql)
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 77, in execute
return self.cursor.execute(sql)
django.db.utils.ProgrammingError: DuplicateTable(‘relation “auth_user” already exists\n’,)
SQL: CREATE TABLE “auth_user” (“password” varchar(128) NOT NULL, “last_login” timestamp with time zone NULL, “id” serial NOT NULL PRIMARY KEY, “username” varchar(128) NOT NULL UNIQUE, “first_name” varchar(200) NOT NULL, “email” varchar(75) NOT NULL, “is_staff” boolean NOT NULL, “is_active” boolean NOT NULL, “is_superuser” boolean NOT NULL, “is_managed” boolean NOT NULL, “is_sentry_app” boolean NULL, “is_password_expired” boolean NOT NULL, “last_password_change” timestamp with time zone NULL, “flags” bigint NULL, “session_nonce” varchar(12) NULL, “date_joined” timestamp with time zone NOT NULL, “last_active” timestamp with time zone NULL)

Can anyone help me upgrading it?
Thanks!

Seems like your database and/or migrations are in a weird state. Have you had failed upgrade attempts before?

I deployed 2 copies of production containers and made several attempts to upgrade via ./install

At at what step they failed earlier? Do you have logs you can share from your upgrade attempts?

I create from 0 container 9.1.2 with a database with data -> run the update script -> error
There were 3-4 attempts and all ended in the same: /

Now I made another attempt, how the update will end, I will attach the logs

I tried again to update the current installation to version 10.0.1 and again the same error, I attach the logs, I missed some of the file migration messages due to the length of the post

Checking minimum requirement…
Removing network onpremie_default
Network onpremie_default not found.
Removing network entry_onpremie_default
Network entry_onpremie_default not found.

Creating volume for peritent torage…
Created sentry-data.
Created sentry-potgre.
Created sentry-redi.
Created sentry-zookeeper.
Created entry-kafka.
Created entry-clickhoue.
Created entry-ymbolicator.

Creating entry/entry.conf.py…
Creating entry/config.yml…
Creating entry/requirement.txt…

Generating secret key…
Secret key written to entry/config.yml
Fetching and updating Docker image…

Some ervice image() mut be built from ource by running:
docker-compoe build entry-cleanup pot-proce-forwarder nuba-cleanup ymbolicator-cleanup cron web worker
10.0.1: Pulling from getentry/entry

Statu: Downloaded newer image for getentry/entry:10.0.1
docker.io/getentry/entry:10.0.1

Building and tagging Docker image…

Building web

Removing intermediate container 52faef958d35
—> 1f2067f1c208

Succefully built 1f2067f1c208
—> Uing cache
Succefully tagged entry-onpremie-local:latet
Building web … done
Building worker
—> 1f2067f1c208

Succefully built 1f2067f1c208
Succefully tagged entry-onpremie-local:latet
Building pot-proce-forwarder … done
Step 1/5 : ARG BASE_IMAGE
Step 2/5 : FROM {BASE_IMAGE} ---> 1f2067f1c208 Step 3/5 : RUN apt-get update && apt-get intall -y --no-intall-recommend cron && rm -r /var/lib/apt/lit/* Step 1/8 : ARG SENTRY_IMAGE Step 2/8 : FROM {SENTRY_IMAGE}
—> 91b613230b6c
Step 3/8 : WORKDIR /ur/rc/entry
—> Uing cache
—> a27e82c2da5c
Step 4/8 : ENV PYTHONPATH /ur/rc/entry
—> Uing cache
—> a50557a6c5e5
Step 5/8 : COPY . /ur/rc/entry
—> Uing cache
—> ef199197eb07
Step 6/8 : RUN if [ - requirement.txt ]; then pip intall -r requirement.txt; fi
—> Uing cache
—> fbf180ed62c7
Step 7/8 : RUN if [ - etup.py ]; then pip intall -e .; fi
—> Uing cache
—> 35abf686ddf1
Step 8/8 : RUN if [ - entry.conf.py ]; then cp entry.conf.py $SENTRY_CONF/; fi && if [ - config.yml ]; then cp config.yml $SENTRY_CONF/; fi
—> Uing cache
—> 1f2067f1c208

Succefully built 1f2067f1c208
Succefully tagged entry-onpremie-local:latet
Building worker … done
—> Running in d12612fe042e
—> Running in 1c601b0d5a63
—> Running in 388e807768a8
Get:1 http://ecurity.debian.org/debian-ecurity buter/update InReleae [65.4 kB]
Get:2 http://deb.debian.org/debian buter InReleae [121 kB]
Ign:1 http://deb.debian.org/debian tretch InReleae
Get:1 http://ecurity.debian.org/debian-ecurity buter/update InReleae [65.4 kB]
Get:2 http://deb.debian.org/debian tretch-update InReleae [93.6 kB]
Get:2 http://deb.debian.org/debian buter InReleae [121 kB]
Get:3 http://ecurity.debian.org/debian-ecurity tretch/update InReleae [53.0 kB]
Get:3 http://deb.debian.org/debian buter-update InReleae [51.9 kB]
Get:4 http://deb.debian.org/debian tretch Releae [118 kB]
Get:3 http://deb.debian.org/debian buter-update InReleae [51.9 kB]
Get:4 http://ecurity.debian.org/debian-ecurity buter/update/main amd64 Package [243 kB]
Get:5 http://deb.debian.org/debian tretch Releae.gpg [2410 B]
Get:4 http://ecurity.debian.org/debian-ecurity buter/update/main amd64 Package [243 kB]
Get:6 http://deb.debian.org/debian tretch-update/main amd64 Package [2596 B]
Get:5 http://deb.debian.org/debian buter/main amd64 Package [7906 kB]
Get:7 http://ecurity.debian.org/debian-ecurity tretch/update/main amd64 Package [611 kB]
Get:5 http://deb.debian.org/debian buter/main amd64 Package [7906 kB]
Get:8 http://deb.debian.org/debian tretch/main amd64 Package [7080 kB]
Get:6 http://deb.debian.org/debian buter-update/main amd64 Package [7856 B]
Get:6 http://deb.debian.org/debian buter-update/main amd64 Package [7856 B]
Fetched 7960 kB in 3 (2253 kB/)
Reading package lit…Fetched 8396 kB in 4 (2262 kB/)
Reading package lit…Fetched 8396 kB in 4 (2042 kB/)
Reading package lit…
Reading package lit…
Reading package lit…
Reading package lit…
Building dependency tree…

Reading tate information…
Building dependency tree…Suggeted package:
anacron logrotate checkecurity
Recommended package:
exim4 | potfix | mail-tranport-agent
The following NEW package will be intalled:

cron

Reading tate information…
Building dependency tree…The following additional package will be intalled:
enible-util
Suggeted package:
anacron logrotate checkecurity
Recommended package:
default-mta | mail-tranport-agent
0 upgraded, 1 newly intalled, 0 to remove and 10 not upgraded.
Need to get 95.4 kB of archive.
After thi operation, 257 kB of additional dik pace will be ued.
Get:1 http://deb.debian.org/debian tretch/main amd64 cron amd64 3.0pl1-128+deb9u1 [95.4 kB]
The following NEW package will be intalled:
cron enible-util

Reading tate information…
0 upgraded, 2 newly intalled, 0 to remove and 16 not upgraded.
Need to get 115 kB of archive.
After thi operation, 333 kB of additional dik pace will be ued.
Get:1 http://deb.debian.org/debian buter/main amd64 enible-util all 0.0.12 [15.8 kB]
The following additional package will be intalled:
lb-bae enible-util
Suggeted package:
anacron logrotate checkecurity
Recommended package:
default-mta | mail-tranport-agent
Get:2 http://deb.debian.org/debian buter/main amd64 cron amd64 3.0pl1-134+deb10u1 [99.0 kB]
The following NEW package will be intalled:
cron lb-bae enible-util
debconf: delaying package configuration, ince apt-util i not intalled
Fetched 95.4 kB in 0 (246 kB/)
Selecting previouly unelected package cron.
(Reading databae … 6684 file and directorie currently intalled.)
Preparing to unpack …/cron_3.0pl1-128+deb9u1_amd64.deb …
debconf: delaying package configuration, ince apt-util i not intalled
Unpacking cron (3.0pl1-128+deb9u1) …
Fetched 115 kB in 0 (290 kB/)
Selecting previouly unelected package enible-util.
Setting up cron (3.0pl1-128+deb9u1) …
(Reading databae … 6849 file and directorie currently intalled.)
Preparing to unpack …/enible-util_0.0.12_all.deb …
Unpacking enible-util (0.0.12) …
Selecting previouly unelected package cron.
Preparing to unpack …/cron_3.0pl1-134+deb10u1_amd64.deb …
0 upgraded, 3 newly intalled, 0 to remove and 26 not upgraded.
Need to get 143 kB of archive.
After thi operation, 383 kB of additional dik pace will be ued.
Get:1 http://deb.debian.org/debian buter/main amd64 enible-util all 0.0.12 [15.8 kB]
Unpacking cron (3.0pl1-134+deb10u1) …
Adding group crontab' (GID 101) ... Done. Setting up enible-util (0.0.12) ... Setting up cron (3.0pl1-134+deb10u1) ... Get:2 http://deb.debian.org/debian buter/main amd64 lb-bae all 10.2019051400 [28.4 kB] Get:3 http://deb.debian.org/debian buter/main amd64 cron amd64 3.0pl1-134+deb10u1 [99.0 kB] Adding group crontab’ (GID 101) …
update-rc.d: warning: tart and top action are no longer upported; falling back to default
Done.
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of tart.
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of tart.
debconf: delaying package configuration, ince apt-util i not intalled
Fetched 143 kB in 1 (165 kB/)
Selecting previouly unelected package enible-util.
(Reading databae … 11918 file and directorie currently intalled.)
Preparing to unpack …/enible-util_0.0.12_all.deb …
Unpacking enible-util (0.0.12) …
Selecting previouly unelected package lb-bae.
Preparing to unpack …/lb-bae_10.2019051400_all.deb …
Unpacking lb-bae (10.2019051400) …
Selecting previouly unelected package cron.
Preparing to unpack …/cron_3.0pl1-134+deb10u1_amd64.deb …
Unpacking cron (3.0pl1-134+deb10u1) …
Setting up lb-bae (10.2019051400) …
Setting up enible-util (0.0.12) …
Setting up cron (3.0pl1-134+deb10u1) …
Removing intermediate container d12612fe042e
—> 8e4008cdbf90
Step 4/5 : COPY entrypoint.h /entrypoint.h
Adding group `crontab’ (GID 101) …
Done.
Removing intermediate container 1c601b0d5a63
—> 8329ac6eff5c
Step 4/5 : COPY entrypoint.h /entrypoint.h
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of tart.
—> d3ab19f6aa1f
Step 5/5 : ENTRYPOINT ["/entrypoint.h"]
—> Running in ef416331b5fc
—> dab82e8f5261
Step 5/5 : ENTRYPOINT ["/entrypoint.h"]
—> Running in 0272e4b0f341
Removing intermediate container ef416331b5fc
—> 74c8f8069eb2

Succefully built 74c8f8069eb2
Succefully tagged ymbolicator-cleanup-onpremie-local:latet
Building ymbolicator-cleanup … done
Removing intermediate container 0272e4b0f341
—> d29b7e4e5ed6

Succefully built d29b7e4e5ed6
Succefully tagged nuba-cleanup-onpremie-local:latet
Building nuba-cleanup … done
Removing intermediate container 388e807768a8
—> f9c08df256bd
Step 4/5 : COPY entrypoint.h /entrypoint.h
—> 81017086885e
Step 5/5 : ENTRYPOINT ["/entrypoint.h"]
—> Running in ee21b33a1b2e
Removing intermediate container ee21b33a1b2e
—> 30f31d507561

Succefully built 30f31d507561
Succefully tagged entry-cleanup-onpremie-local:latet
Building entry-cleanup … done

Docker image built.
Boottrapping Snuba…
Creating network “entry_onpremie_default” with the default driver
Creating volume “entry_onpremie_entry-ecret” with default driver
Creating volume “entry_onpremie_entry-mtp” with default driver
Creating volume “entry_onpremie_entry-zookeeper-log” with default driver
Creating volume “entry_onpremie_entry-kafka-log” with default driver
Creating volume “entry_onpremie_entry-mtp-log” with default driver
Creating entry_onpremie_clickhoue_1 …
Creating entry_onpremie_zookeeper_1 …
Creating entry_onpremie_redi_1 …
Creating entry_onpremie_clickhoue_1 … done
Creating entry_onpremie_redi_1 … done
Creating entry_onpremie_zookeeper_1 … done
Creating entry_onpremie_kafka_1 …
Creating entry_onpremie_kafka_1 … done
Creating entry_onpremie_nuba-api_run …
Creating entry_onpremie_nuba-api_run … done

  • ‘[’ boottrap = bah ‘]’
  • ‘[’ b = - ‘]’
  • ‘[’ boottrap = api ‘]’
  • nuba boottrap --help
  • et – nuba boottrap --force
  • exec gou nuba nuba boottrap --force
    2020-11-01 06:42:47,659 Connection to Kafka failed (attempt 0)
    Traceback (mot recent call lat):
    File “/ur/rc/nuba/nuba/cli/boottrap.py”, line 50, in boottrap
    client.lit_topic(timeout=1)
    cimpl.KafkaException: KafkaError{code=_TRANSPORT,val=-195,tr=“Failed to get metadata: Local: Broker tranport failure”}
    2020-11-01 06:42:49,666 Connection to Kafka failed (attempt 1)
    Traceback (mot recent call lat):
    File “/ur/rc/nuba/nuba/cli/boottrap.py”, line 50, in boottrap
    client.lit_topic(timeout=1)
    cimpl.KafkaException: KafkaError{code=_TRANSPORT,val=-195,tr=“Failed to get metadata: Local: Broker tranport failure”}
    2020-11-01 06:42:51,668 Connection to Kafka failed (attempt 2)
    Traceback (mot recent call lat):
    File “/ur/rc/nuba/nuba/cli/boottrap.py”, line 50, in boottrap
    client.lit_topic(timeout=1)
    cimpl.KafkaException: KafkaError{code=_TRANSPORT,val=-195,tr=“Failed to get metadata: Local: Broker tranport failure”}
    2020-11-01 06:42:53,673 Connection to Kafka failed (attempt 3)
    Traceback (mot recent call lat):
    File “/ur/rc/nuba/nuba/cli/boottrap.py”, line 50, in boottrap
    client.lit_topic(timeout=1)
    cimpl.KafkaException: KafkaError{code=_TRANSPORT,val=-195,tr=“Failed to get metadata: Local: Broker tranport failure”}
    2020-11-01 06:42:55,285 Topic outcome created
    2020-11-01 06:42:55,286 Topic cdc created
    2020-11-01 06:42:55,286 Topic event created
    2020-11-01 06:42:55,286 Topic event-replacement created
    2020-11-01 06:42:55,286 Topic nuba-commit-log created
    2020-11-01 06:42:55,416 Table for dataet outcome created.
    2020-11-01 06:42:55,473 Table for dataet groupaignee created.
    2020-11-01 06:42:55,487 Table for dataet tranaction created.
    2020-11-01 06:42:55,496 Table for dataet groupedmeage created.
    2020-11-01 06:42:55,497 Table for dataet dicover created.
    2020-11-01 06:42:55,500 Table for dataet outcome_raw created.
    2020-11-01 06:42:55,513 Table for dataet event created.
    Creating entry_onpremie_nuba-api_run …
    Creating entry_onpremie_nuba-api_run … done
  • ‘[’ migrate = bah ‘]’
  • ‘[’ m = - ‘]’
  • ‘[’ migrate = api ‘]’
  • nuba migrate --help
  • et – nuba migrate
  • exec gou nuba nuba migrate
    2020-11-01 06:43:01,644 Migrating dataet groupaignee
    2020-11-01 06:43:01,692 Migrating dataet event
    2020-11-01 06:43:01,715 Migrating dataet outcome_raw
    2020-11-01 06:43:01,721 Executing migration: ALTER TABLE outcome_raw_local ADD COLUMN ize Nullable(UInt32)
    2020-11-01 06:43:01,760 Column ‘ize’ exit in local ClickHoue but not in chema!
    2020-11-01 06:43:01,761 Migrating dataet groupedmeage
    2020-11-01 06:43:01,779 Migrating dataet tranaction
    2020-11-01 06:43:01,787 Column ‘tranaction_hah’ type differ between local ClickHoue and chema! (expected: UInt64 MATERIALIZED cityHah64(tranaction_name), i: UInt64)
    2020-11-01 06:43:01,788 Column ‘tranaction_tatu’ type differ between local ClickHoue and chema! (expected: UInt8 DEFAULT 2, i: UInt8)
    2020-11-01 06:43:01,788 Column ‘_tart_date’ type differ between local ClickHoue and chema! (expected: Date MATERIALIZED toDate(tart_t), i: Date)
    2020-11-01 06:43:01,788 Column ‘_finih_date’ type differ between local ClickHoue and chema! (expected: Date MATERIALIZED toDate(finih_t), i: Date)
    2020-11-01 06:43:01,788 Column ‘uer’ type differ between local ClickHoue and chema! (expected: String DEFAULT ‘’, i: String)
    2020-11-01 06:43:01,788 Column ‘uer_hah’ type differ between local ClickHoue and chema! (expected: UInt64 MATERIALIZED cityHah64(uer), i: UInt64)
    2020-11-01 06:43:01,788 Column ‘dk_name’ type differ between local ClickHoue and chema! (expected: LowCardinality(String) DEFAULT ‘’, i: LowCardinality(String))
    2020-11-01 06:43:01,788 Column ‘dk_verion’ type differ between local ClickHoue and chema! (expected: LowCardinality(String) DEFAULT ‘’, i: LowCardinality(String))
    2020-11-01 06:43:01,794 Column ‘tranaction_hah’ type differ between local ClickHoue and chema! (expected: UInt64 MATERIALIZED cityHah64(tranaction_name), i: UInt64)
    2020-11-01 06:43:01,795 Column ‘tranaction_tatu’ type differ between local ClickHoue and chema! (expected: UInt8 DEFAULT 2, i: UInt8)
    2020-11-01 06:43:01,795 Column ‘_tart_date’ type differ between local ClickHoue and chema! (expected: Date MATERIALIZED toDate(tart_t), i: Date)
    2020-11-01 06:43:01,795 Column ‘_finih_date’ type differ between local ClickHoue and chema! (expected: Date MATERIALIZED toDate(finih_t), i: Date)
    2020-11-01 06:43:01,795 Column ‘uer’ type differ between local ClickHoue and chema! (expected: String DEFAULT ‘’, i: String)
    2020-11-01 06:43:01,795 Column ‘uer_hah’ type differ between local ClickHoue and chema! (expected: UInt64 MATERIALIZED cityHah64(uer), i: UInt64)
    2020-11-01 06:43:01,795 Column ‘dk_name’ type differ between local ClickHoue and chema! (expected: LowCardinality(String) DEFAULT ‘’, i: LowCardinality(String))
    2020-11-01 06:43:01,795 Column ‘dk_verion’ type differ between local ClickHoue and chema! (expected: LowCardinality(String) DEFAULT ‘’, i: LowCardinality(String))
    2020-11-01 06:43:01,796 Migrating dataet dicover
    2020-11-01 06:43:01,797 Migrating dataet outcome
    2020-11-01 06:43:01,804 Column ‘ize’ exit in local ClickHoue but not in chema!

Error: No uch volume: entry-potgre-new
Unable to find image ‘tianon/potgre-upgrade:9.5-to-9.6’ locally
9.5-to-9.6: Pulling from tianon/potgre-upgrade
babf97a3f00a: Already exit
0526c44df6ea: Already exit
b2466ee00e96: Already exit
77c605d60192: Already exit
76b14ab41842: Already exit
440f557fff31: Already exit
30bba27806f4: Already exit
a4e155509054: Already exit
228bfc35d59e: Already exit
dae6d4aade3a: Already exit
0d38f3152b7f: Already exit
0c98e6187ea2: Already exit
8d7ef0097035: Already exit
4dbb62021d40: Already exit
e45351615fe7: Pulling f layer
daf2d5244afb: Pulling f layer
dec98c403f8d: Pulling f layer
a0fc9b0c52dd: Pulling f layer
a0fc9b0c52dd: Waiting
e45351615fe7: Verifying Checkum
e45351615fe7: Download complete
dec98c403f8d: Verifying Checkum
dec98c403f8d: Download complete
e45351615fe7: Pull complete
a0fc9b0c52dd: Verifying Checkum
daf2d5244afb: Verifying Checkum
daf2d5244afb: Download complete
daf2d5244afb: Pull complete
dec98c403f8d: Pull complete
a0fc9b0c52dd: Pull complete
Diget: ha256:172dd2dff03590b157a2a8d72225cc4cc335d26a5e82903448db51857098b329
Statu: Downloaded newer image for tianon/potgre-upgrade:9.5-to-9.6
The file belonging to thi databae ytem will be owned by uer “potgre”.
Thi uer mut alo own the erver proce.

The databae cluter will be initialized with locale “en_US.utf8”.
The default databae encoding ha accordingly been et to “UTF8”.
The default text earch configuration will be et to “englih”.

Data page checkum are diabled.

fixing permiion on exiting directory /var/lib/potgreql/9.6/data … ok
creating ubdirectorie … ok
electing default max_connection … 100
electing default hared_buffer … 128MB
electing default timezone … Etc/UTC
electing dynamic hared memory implementation … poix
creating configuration file … ok
running boottrap cript … ok
performing pot-boottrap initialization … ok
yncing data to dik … ok

Succe. You can now tart the databae erver uing:

pg_ctl -D /var/lib/potgreql/9.6/data -l logfile tart

WARNING: enabling “trut” authentication for local connection
You can change thi by editing pg_hba.conf or uing the option -A, or
–auth-local and --auth-hot, the next time you run initdb.
Performing Conitency Check

Checking cluter verion ok
Checking databae uer i the intall uer ok
Checking databae connection etting ok
Checking for prepared tranaction ok
Checking for reg* ytem OID uer data type ok
Checking for contrib/in with bigint-paing mimatch ok
Checking for role tarting with ‘pg_’ ok
Creating dump of global object ok
Creating dump of databae chema
potgre
entry
template1
ok
Checking for preence of required librarie ok
Checking databae uer i the intall uer ok
Checking for prepared tranaction ok

If pg_upgrade fail after thi point, you mut re-initdb the
new cluter before continuing.

Performing Upgrade

Analyzing all row in the new cluter ok
Freezing all row on the new cluter ok
Deleting file from new pg_clog ok
Copying old pg_clog to new erver ok
Setting next tranaction ID and epoch for new cluter ok
Deleting file from new pg_multixact/offet ok
Copying old pg_multixact/offet to new erver ok
Deleting file from new pg_multixact/member ok
Copying old pg_multixact/member to new erver ok
Setting next multixact ID and offet for new cluter ok
Reetting WAL archive ok
Setting frozenxid and minmxid counter in new cluter ok
Retoring global object in the new cluter ok
Retoring databae chema in the new cluter
potgre
entry
template1
ok
Copying user relation file

                                                      ok

Setting next OID for new cluter ok
Sync data directory to dik ok
Creating cript to analyze new cluter ok
Creating cript to delete old cluter ok

Upgrade Complete

Optimizer tatitic are not tranferred by pg_upgrade o,
once you tart the new erver, conider running:
./analyze_new_cluter.h

Running thi cript will delete the old cluter’ data file:
./delete_old_cluter.h
entry-potgre
entry-potgre
Unable to find image ‘alpine:latet’ locally
latet: Pulling from library/alpine
188c0c94c7c5: Already exit
Diget: ha256:c0e9560cda118f9ec63ddefb4a173a2b2a0347082d7dff7dc14272e7841a5b5a
Statu: Downloaded newer image for alpine:latet
‘./pg_dynhmem’ -> ‘/to/./pg_dynhmem’
‘./pg_hba.conf’ -> ‘/to/./pg_hba.conf’
‘./pg_tat/db_1.tat’ -> ‘/to/./pg_tat/db_1.tat’
‘./pg_tat/global.tat’ -> ‘/to/./pg_tat/global.tat’
‘./pg_tat/db_0.tat’ -> ‘/to/./pg_tat/db_0.tat’
‘./pg_tat/db_16400.tat’ -> ‘/to/./pg_tat/db_16400.tat’
‘./pg_tat/db_12407.tat’ -> ‘/to/./pg_tat/db_12407.tat’
‘./pg_tat/db_12406.tat’ -> ‘/to/./pg_tat/db_12406.tat’
‘./pg_tat’ -> ‘/to/./pg_tat’
‘./pg_naphot’ -> ‘/to/./pg_naphot’
‘./pg_tat_tmp’ -> ‘/to/./pg_tat_tmp’
‘./pg_ubtran/227A’ -> ‘/to/./pg_ubtran/227A’
‘./pg_ubtran’ -> ‘/to/./pg_ubtran’
‘./pg_tblpc’ -> ‘/to/./pg_tblpc’
‘./potgreql.conf’ -> ‘/to/./potgreql.conf’
‘./pg_ident.conf’ -> ‘/to/./pg_ident.conf’
‘./pg_multixact/member’ -> ‘/to/./pg_multixact/member’
‘./pg_multixact’ -> ‘/to/./pg_multixact’
‘.’ -> ‘/to/.’
sentry-potgres-new

Setting up databae…
Creating entry_onpremie_potgre_1 …
Creating entry_onpremie_ymbolicator_1 …
Creating entry_onpremie_memcached_1 …
Creating entry_onpremie_mtp_1 …
Creating entry_onpremie_nuba-replacer_1 …
Creating entry_onpremie_nuba-conumer_1 …
Creating entry_onpremie_nuba-outcome-conumer_1 …
Creating entry_onpremie_nuba-api_1 …
Creating entry_onpremie_ymbolicator_1 … done
Creating entry_onpremie_nuba-conumer_1 … done
Creating entry_onpremie_nuba-api_1 … done
Creating entry_onpremie_nuba-outcome-conumer_1 … done
Creating entry_onpremie_nuba-replacer_1 … done
Creating entry_onpremie_mtp_1 … done
Creating entry_onpremie_potgre_1 … done
Creating entry_onpremie_memcached_1 … done
Creating entry_onpremie_web_run …
Creating entry_onpremie_web_run … done
09:42:09 [WARNING] entry.util.geo: etting.GEOIP_PATH_MMDB not configured.
09:42:26 [INFO] entry.plugin.github: app-not-configured
Operation to perform:
Apply all migration: nodetore, eion, admin, entry, jira_ac, ite, auth, ocial_auth, contenttype
Running migration:
Rendering model tate… DONE
Applying entry.0001_initial…Traceback (mot recent call lat):
File “/ur/local/bin/entry”, line 8, in
y.exit(main())
File “/ur/local/lib/python2.7/ite-package/entry/runner/init.py”, line 164, in main
cli(prog_name=get_prog(), obj={}, max_content_width=100)
File “/ur/local/lib/python2.7/ite-package/click/core.py”, line 722, in call
return elf.main(*arg, **kwarg)
File “/ur/local/lib/python2.7/ite-package/click/core.py”, line 697, in main
rv = elf.invoke(ctx)
File “/ur/local/lib/python2.7/ite-package/click/core.py”, line 1066, in invoke
return _proce_reult(ub_ctx.command.invoke(ub_ctx))
File “/ur/local/lib/python2.7/ite-package/click/core.py”, line 895, in invoke
return ctx.invoke(elf.callback, **ctx.param)
File “/ur/local/lib/python2.7/ite-package/click/core.py”, line 535, in invoke
return callback(*arg, **kwarg)
File “/ur/local/lib/python2.7/ite-package/click/decorator.py”, line 17, in new_func
return f(get_current_context(), *arg, **kwarg)
File “/ur/local/lib/python2.7/ite-package/entry/runner/decorator.py”, line 30, in inner
return ctx.invoke(f, *arg, **kwarg)
File “/ur/local/lib/python2.7/ite-package/click/core.py”, line 535, in invoke
return callback(*arg, **kwarg)
File “/ur/local/lib/python2.7/ite-package/click/decorator.py”, line 17, in new_func
return f(get_current_context(), *arg, **kwarg)
File “/ur/local/lib/python2.7/ite-package/entry/runner/command/upgrade.py”, line 168, in upgrade
_upgrade(not noinput, traceback, verboity, not no_repair)
File “/ur/local/lib/python2.7/ite-package/entry/runner/command/upgrade.py”, line 130, in _upgrade
ignore_ghot_migration=True,
File “/ur/local/lib/python2.7/ite-package/django/core/management/init.py”, line 119, in call_command
return command.execute(*arg, **default)
File “/ur/local/lib/python2.7/ite-package/django/core/management/bae.py”, line 399, in execute
output = elf.handle(*arg, **option)
File “/ur/local/lib/python2.7/ite-package/django/core/management/command/migrate.py”, line 200, in handle
executor.migrate(target, plan, fake=fake, fake_initial=fake_initial)
File “/ur/local/lib/python2.7/ite-package/django/db/migration/executor.py”, line 92, in migrate
elf._migrate_all_forward(plan, full_plan, fake=fake, fake_initial=fake_initial)
File “/ur/local/lib/python2.7/ite-package/django/db/migration/executor.py”, line 121, in _migrate_all_forward
tate = elf.apply_migration(tate, migration, fake=fake, fake_initial=fake_initial)
File “/ur/local/lib/python2.7/ite-package/entry/new_migration/monkey/executor.py”, line 26, in apply_migration
tate, migration, fake=fake, fake_initial=fake_initial
File “/ur/local/lib/python2.7/ite-package/django/db/migration/executor.py”, line 198, in apply_migration
tate = migration.apply(tate, chema_editor)
File “/ur/local/lib/python2.7/ite-package/django/db/migration/migration.py”, line 123, in apply
operation.databae_forward(elf.app_label, chema_editor, old_tate, project_tate)
File “/ur/local/lib/python2.7/ite-package/django/db/migration/operation/model.py”, line 59, in databae_forward
chema_editor.create_model(model)
File “/ur/local/lib/python2.7/ite-package/django/db/backend/bae/chema.py”, line 284, in create_model
elf.execute(ql, param or None)
File “/ur/local/lib/python2.7/ite-package/django/db/backend/bae/chema.py”, line 110, in execute
curor.execute(ql, param)
File “/ur/local/lib/python2.7/ite-package/entry_dk/integration/django/init.py”, line 487, in execute
return real_execute(elf, ql, param)
File “/ur/local/lib/python2.7/ite-package/django/db/backend/util.py”, line 64, in execute
return elf.curor.execute(ql, param)
File “/ur/local/lib/python2.7/ite-package/django/db/util.py”, line 95, in exit
ix.reraie(dj_exc_type, dj_exc_value, traceback)
File “/ur/local/lib/python2.7/ite-package/django/db/backend/util.py”, line 62, in execute
return elf.curor.execute(ql)
File “/ur/local/lib/python2.7/ite-package/entry/db/potgre/decorator.py”, line 81, in inner
raie_the_exception(elf.db, e)
File “/ur/local/lib/python2.7/ite-package/entry/db/potgre/decorator.py”, line 79, in inner
return func(elf, *arg, **kwarg)
File “/ur/local/lib/python2.7/ite-package/entry/db/potgre/decorator.py”, line 22, in inner
return func(elf, *arg, **kwarg)
File “/ur/local/lib/python2.7/ite-package/entry/db/potgre/decorator.py”, line 99, in inner
ix.reraie(exc_info[0], exc_info0, exc_info[2])
File “/ur/local/lib/python2.7/ite-package/entry/db/potgre/decorator.py”, line 95, in inner
return func(elf, ql, *arg, **kwarg)
File “/ur/local/lib/python2.7/ite-package/entry/db/potgre/bae.py”, line 77, in execute
return elf.curor.execute(ql)
django.db.util.ProgrammingError: DuplicateTable(‘relation “auth_uer” already exit\n’,)
SQL: CREATE TABLE “auth_uer” (“paword” varchar(128) NOT NULL, “lat_login” timetamp with time zone NULL, “id” erial NOT NULL PRIMARY KEY, “uername” varchar(128) NOT NULL UNIQUE, “firt_name” varchar(200) NOT NULL, “email” varchar(75) NOT NULL, “i_taff” boolean NOT NULL, “i_active” boolean NOT NULL, “i_uperuer” boolean NOT NULL, “i_managed” boolean NOT NULL, “i_entry_app” boolean NULL, “i_paword_expired” boolean NOT NULL, “lat_paword_change” timetamp with time zone NULL, “flag” bigint NULL, “eion_nonce” varchar(12) NULL, “date_joined” timetamp with time zone NOT NULL, “lat_active” timetamp with time zone NULL)
Cleaning up…

hi, is there anyone here? :slight_smile:

Hi, sorry for the late response. Seems like the migration status table has an issue and it is starting from an invalid state. Were you able to fix this?

Also can you try using a newer version of Sentry, such as 20.11.1?

hello, i’m trying update to 20.11.1 … same error

Where did all the ses go in your paste? That’s weird! :open_mouth:

The basic error I’m seeing is (ses added back ;):

DuplicateTable(‘relation “auth_user” already exists\n’,)

The auth_user table is one of the basic tables from Django, it’s weird that the migration seems to be trying to create it. Django stores migration history in django_migrations. Here’s what it looks like for me:

postgres=# select * from django_migrations order by applied desc limit 8;
┌─────┬─────────────┬──────────────────────────────────────────┬───────────────────────────────┐
│ id  │     app     │                   name                   │            applied            │
├─────┼─────────────┼──────────────────────────────────────────┼───────────────────────────────┤
│ 154 │ social_auth │ 0001_initial                             │ 2020-11-24 20:05:23.276136+00 │
│ 153 │ sites       │ 0002_alter_domain_unique                 │ 2020-11-24 20:05:22.17472+00  │
│ 152 │ sites       │ 0001_initial                             │ 2020-11-24 20:05:22.131191+00 │
│ 151 │ sessions    │ 0001_initial                             │ 2020-11-24 20:05:22.099069+00 │
│ 150 │ sentry      │ 0135_removinguniquegroupownerconstraint  │ 2020-11-24 20:05:22.057443+00 │
│ 149 │ sentry      │ 0134_dashboard_drop_object_status_column │ 2020-11-24 20:05:21.266336+00 │
│ 148 │ sentry      │ 0133_dashboard_delete_object_status      │ 2020-11-24 20:05:21.218989+00 │
│ 147 │ sentry      │ 0132_groupownermodel                     │ 2020-11-24 20:05:20.748025+00 │
└─────┴─────────────┴──────────────────────────────────────────┴───────────────────────────────┘
(8 rows)

What is in that table for you? My hunch is that it’s empty for some reason.

1 Like