Page MenuHomeDevCentral

Upgrade Sentry to 23.3.1
Closed, ResolvedPublic

Description

Git diff: https://github.com/getsentry/self-hosted/compare/5119cfb8d0311e1806d42f27a2631057a6bf037a..master

Plan

  • Upgrade Kafka and Zookeeper to 5.5.7
  • Upgrade Snuba containers
  • Upgrade Symbolicator
  • Upgrade Sentry
  • Check version at https://sentry.nasqueron.org

Revisions and Commits

Related Objects

Event Timeline

Zookeeper

docker-002
$ docker logs sentry_zookeeper
[…]
===> User
uid=0(root) gid=0(root) groups=0(root)
===> Configuring ...
===> Running preflight checks ...
===> Check if /var/lib/zookeeper/data is writable ...
===> Check if /var/lib/zookeeper/log is writable ...
===> Launching ...
===> Launching zookeeper ...
[2023-03-24 20:43:14,853] WARN Either no config or no quorum defined in config, running  in standalone mode (org.apache.zookeeper.server.quorum.QuorumPeerMain)
[2023-03-24 20:43:15,007] WARN o.e.j.s.ServletContextHandler@33f88ab{/,null,STOPPED} contextPath ends with /* (org.eclipse.jetty.server.handler.ContextHandler)
[2023-03-24 20:43:15,007] WARN Empty contextPath (org.eclipse.jetty.server.handler.ContextHandler)
[2023-03-24 20:43:15,078] WARN ServletContext@o.e.j.s.ServletContextHandler@33f88ab{/,null,STARTING} has uncovered http methods for path: /* (org.eclipse.jetty.security.SecurityHandler)

Kafka

docker-002
$ docker logs sentry_kafka
[…]
[2023-03-24 20:45:10,826] INFO [GroupCoordinator 1001]: Stabilized group snuba-replacers generation 2 (__consumer_offsets-0) (kafka.coordinator.group.GroupCoordinator)
[2023-03-24 20:45:10,826] INFO [GroupCoordinator 1001]: Assignment received from leader for group snuba-transactions-subscriptions-consumers for generation 2 (kafka.coordinator.group.GroupCoordinator)
[2023-03-24 20:45:10,828] INFO [GroupCoordinator 1001]: Assignment received from leader for group snuba-post-processor for generation 6 (kafka.coordinator.group.GroupCoordinator)
[2023-03-24 20:45:10,829] INFO [GroupCoordinator 1001]: Assignment received from leader for group snuba-replacers for generation 2 (kafka.coordinator.group.GroupCoordinator)
[2023-03-24 20:45:10,831] INFO [GroupCoordinator 1001]: Assignment received from leader for group snuba-events-subscriptions-consumers for generation 2 (kafka.coordinator.group.GroupCoordinator)

Snuba

ModuleNotFoundError: No module named 'snuba.settings.settings_self_hosted'

Beware to pull the nightly tag, ie docker pull getsentry/snuba:nightly and not docker pull getsentry/snuba.

Snuba

docker-002
$ docker logs sentry_snuba_api
2023-03-24 20:58:44,295 Initializing Snuba...
2023-03-24 20:58:47,701 Snuba initialization took 3.4077668339014053s
2023-03-24 20:58:48,246 Initializing Snuba...
2023-03-24 20:58:51,448 Snuba initialization took 3.2032665936276317s
*** Starting uWSGI 2.0.20 (64bit) on [Fri Mar 24 20:58:51 2023] ***
compiled with version: 8.3.1 20190311 (Red Hat 8.3.1-3) on 11 November 2021 18:13:24
os: Linux-5.14.0-162.12.1.el9_1.0.2.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jan 30 22:14:42 UTC 2023
nodename: b225edf80078
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
current working directory: /usr/src/snuba
detected binary path: /usr/local/bin/python
your memory page size is 4096 bytes
detected max file descriptor number: 1073741816
lock engine: pthread robust mutexes
thunder lock: enabled
uwsgi socket 0 bound to TCP address 0.0.0.0:1218 fd 3
Python version: 3.8.13 (default, Aug 23 2022, 09:42:19)  [GCC 10.2.1 20210110]
--- Python VM already initialized ---
Python main interpreter initialized at 0x564efb872870
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 145808 bytes (142 KB) for 1 cores
*** Operational MODE: single process ***
initialized 38 metrics
spawned uWSGI master process (pid: 1)
spawned uWSGI worker 1 (pid: 28, cores: 1)
metrics collector thread started
2023-03-24 20:58:51,868 Initializing Snuba...
WSGI app 0 (mountpoint='') ready in 4 seconds on interpreter 0x564efb872870 pid: 28 (default app)

Sentry

docker-002
$ docker pull nasqueron/sentry
[…]
$ sentry nasqueron upgrade
[…]
Running migrations for default
Operations to perform:
  Apply all migrations: admin, auth, contenttypes, nodestore, replays, sentry, sessions, sites, social_auth
Running migrations:
  Applying sentry.0380_backfill_monitor_env_initial... OK
  Applying sentry.0381_fix_org_slug_casing... OK
  Applying sentry.0382_add_installation_id_to_service_hook... OK
  Applying sentry.0383_mv_user_avatar... OK
  Applying sentry.0384_backfill_installation_ids... OK
  Applying sentry.0385_service_hook_hc_fk... OK
  Applying sentry.0386_backfill_monitor_env_checkins... OK
  Applying sentry.0387_add_until_escalating_column_to_groupsnooze... OK
  Applying sentry.0388_remove_unique_constraint_artifact_bundle... OK
  Applying sentry.0389_nullify_debug_id_artifact_bundle_field... OK
  Applying sentry.0390_remove_field_in_bundle_model... OK
  Applying sentry.0391_remove_field_in_bundle_model_from_db... OK
  Applying sentry.0392_add_date_uploaded_field_to_bundle... OK
  Applying sentry.0393_create_groupforecast_table... OK
  Applying sentry.0394_set_none_date_uploaded_to_date_added... OK
Creating missing DSNs
Correcting Group.num_comments counter
$ deploy-container sentry
[…]

Sentry image upgraded, migration done and container reloaded.

Documenting steps at https://agora.nasqueron.org/Operations_grimoire/Sentry