Page MenuHomeDevCentral

Sentry database was forcefully updated during a PostgreSQL deployment
Closed, ResolvedPublic

Description

Image should have been no-op but:

2023-04-02 14:40:08.538 UTC [1] FATAL: database files are incompatible with server
2023-04-02 14:40:08.538 UTC [1] DETAIL: The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 15.2 (Debian 15.2-1.pgdg110+1).

Event Timeline

dereckson triaged this task as Unbreak Now! priority.Apr 2 2023, 14:41
dereckson created this task.
dereckson moved this task from Backlog to Bug and issues on the Salt board.
dereckson moved this task from Backlog to Sentry on the Monitoring and reporting board.

This deployment created the incident:

Complector
$ salt docker-002 state.apply roles/paas-docker/containers/postgresql 
----------
          ID: sentry_db
    Function: docker_container.running
      Result: True
     Comment: Replaced container 'sentry_db'. Container has a new image.
     Started: 14:38:09.953235
    Duration: 6040.037 ms
     Changes:
              ----------
              container:
                  ----------
                  Networks:
                      ----------
                      sentry:
                          ----------
                          Gateway:
                              ----------
                              new:
                                  172.18.3.1
                              old:
                                  None
                          IPAMConfig:
                              ----------
                              new:
                                  None
                              old:
                                  ----------
                                  IPv4Address:
                                      172.18.3.4
                          IPAddress:
                              ----------
                              new:
                                  172.18.3.4
                              old:
                                  None
              container_id:
                  ----------
                  added:
                      bf756d0e00984efbd61710dbdaa32c8ec458b53cd683f12c980ac7986fe1a7db
                  removed:
                      - 9e7eb8e6604a7492d91a533120e0e9328192b1a2d13ba519ee17d696404e1c2d
              image:
                  ----------
                  new:
                      sha256:3b6645d2c145df0062b13b5f4db33b428f7249d7139949e3c4a1fbc81b4d6de9
                  old:
                      sha256:409024676e343cc2766d12b7deed3e95a6de0a9ae91393724bedda5524440680

We should deploy nasqueron/sentry-postgresql, which is correctly 9.6.

Pillar definition currently doesn't specify any version or custom image. It should be:

postgresql:
  sentry_db:
    image: nasqueron/postgresql
    credential: nasqueron.sentry.postgresql
    network: sentry