Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-4456

Migration: zync-database restore fails due to open sessions

XMLWordPrintable

    • integration-doc-2020-01-27, integration-doc-2020-03-09

      Following the draft for migration guide from template based OCP3.x installation to OCP4.x operator based deployment outlined in THREESCALE-2929 THREESCALE-2935 the failure of restore of zync-database appears when executing:

      {{
      oc rsh $(oc get pods -l 'deploymentConfig=zync-database' -o json | jq -r '.items[0].metadata.name') bash -c 'psql -f ${HOME}/zync-database-backup'
      }}

      The failure is due to open connections to DB, here is message printed at the very beginning of restore process:

      {{
      psql:/var/lib/pgsql/zync-database-backup:14: ERROR:  database "zync_production" is being accessed by other users
      DETAIL:  There are 8 other sessions using the database.
      }}

      Result: DB is not populated with new data (many more errors are printed)

      Both upstream & customer documentation seems to have missing instructions to stop the services using this db

      Dev notes

      Shutdown zync-* pods before doing any database dump/restore

            Unassigned Unassigned
            mganisin@redhat.com Marian Ganisin (Inactive)
            Priscill Orue Priscill Orue
            Priscill Orue Priscill Orue
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: