Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-13022

DB backup doesnt contain the content of config table

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Blocker
    • None
    • fuse-7.x-GA, fuse-7.6-GA
    • Fuse Online
    • None

    Description

      Syndesis saves the current DB schema in config table:

      sh-4.2$ psql -h localhost -p 5432 -d syndesis_restore -U syndesis -c "SELECT * FROM CONFIG"
               name         | value 
      ----------------------+-------
       model_schema_version | 32
      (1 row)
      

      However, the content of this table isn't present in the backup dump. This seems to be related to the change to use crunchydata/crunchy-pgdump docker image to do the backup.

      When inspecting the DB backup from version 1.9.1-20200127, the record it present:

      pg_restore syndesis-db > db.sql
      cat db.sql | grep model_schema
      model_schema_version	32
      

      When inspecting the backups from 1.9.1-20200219 (uses crunchydata/crunchy-pgdump:centos7-12.1-4.2.1 to do the backup) and my custom image from 1.9.x (uses crunchydata/crunchy-pgdump:centos7-9.6.16-4.2.1), the record isn't present:

      1.9.1-20200219 - needs pg_restore of version 12.x
      root@42f8c30cff8d:/tmp# pg_restore syndesis-db -f db.sql
      root@42f8c30cff8d:/tmp# cat db.sql | grep model_schema
      root@42f8c30cff8d:/tmp# 
      
      custom 1.9.x - needs pg_restore 9.6.x
      sh-4.2$ pg_restore syndesis-db > db.sql
      sh-4.2$ cat db.sql | grep model_schema
      sh-4.2$ 
      

      This causes restore to work initially, but when the server is (for some reason) restarted, because of the missing entry in config table, it thinks that this is a fresh start and drops the whole database and populates it with initial data:

      oc logs -f syndesis-server-1-tssnb                       
      ...
      2020-02-19 20:32:28.704  INFO 1 --- [ DB migration-0] io.syndesis.server.runtime.Migrations    : Setting up the DB for the first time.
      2020-02-19 20:32:28.807  INFO 1 --- [ DB migration-0] io.syndesis.server.runtime.Migrations    : DB schema changed.
      2020-02-19 20:32:28.995  INFO 1 --- [           main] o.c.s.w.s.ServerTracingAutoConfiguration : Creating WebMvcConfigurer bean with class io.opentracing.contrib.spring.web.interceptor.TracingHandlerInterceptor
      2020-02-19 20:32:29.594  INFO 1 --- [ DB migration-0] i.s.server.runtime.DefaultMigrator       : Migrating to schema: 25
      Migrated to schema 25
      2020-02-19 20:32:32.211  INFO 1 --- [ DB migration-0] i.s.server.runtime.DefaultMigrator       : Migrating to schema: 28
      Migrated to schema 28 completed
      2020-02-19 20:32:32.893  INFO 1 --- [ DB migration-0] i.s.server.runtime.DefaultMigrator       : Migrating to schema: 29
      2020-02-19 20:32:32.899  INFO 1 --- [           main] i.s.s.c.i.online.IntegrationController   : Starting IntegrationController (s2i)
      2020-02-19 20:32:32.901  INFO 1 --- [ler Scheduler-0] i.s.s.c.i.BaseIntegrationController      : Checking integrations for their status.
      Migration to schema 29 ...
      This migration will update API Client to new connector model
      Start connectors migration
      connectors: migrated 0 out of 0
      Start connections migration
      connections: migrated 0 out of 0
      Start integrations migration
      integrations: migrated 0 out of 0
      Migrated to schema 29 completed
      2020-02-19 20:32:33.209  INFO 1 --- [ DB migration-0] i.s.server.runtime.DefaultMigrator       : Migrating to schema: 30
      Migration to schema 30 ...
      Start integrations migration
      integrations: migrated 0 out of 0
      2020-02-19 20:32:33.512  INFO 1 --- [           main] com.jcabi.manifests.Manifests            : 126 attributes loaded from 240 stream(s) in 592ms, 126 saved, 3557 ignored: ["Agent-Class", "Ant-Version", "Application-Library-Allowable-Codebase", "Application-Name", "Archiver-Version", "Automatic-Module-Name", "Bnd-LastModified", "Branch", "Build-Date", "Build-Host", "Build-Id", "Build-Java-Version", "Build-Jdk", "Build-Jdk-Spec", "Build-Job", "Build-Number", "Build-Time", "Build-Timestamp", "Build-Version", "Built-By", "Built-Date", "Built-OS", "Built-Status", "Built-Time", "Bundle-ActivationPolicy", "Bundle-Activator", "Bundle-Category", "Bundle-ContactAddress", "Bundle-Copyright", "Bundle-Description", "Bundle-Developers", "Bundle-DocURL", "Bundle-License", "Bundle-ManifestVersion", "Bundle-Name", "Bundle-RequiredExecutionEnvironment", "Bundle-SCM", "Bundle-SymbolicName", "Bundle-Vendor", "Bundle-Version", "Caller-Allowable-Codebase", "Can-Redefine-Classes", "Can-Retransform-Classes", "Can-Set-Native-Method-Prefix", "Change", "Class-Path", "Codebase", "Created-By", "DynamicImport-Package", "Eclipse-ExtensibleAPI", "Embed-Dependency", "Export-Package", "Export-Service", "Extension-Name", "Git-Descriptor", "Git-Revision", "Git-SHA", "Git-Url", "Gradle-Version", "Implementation-Build", "Implementation-Build-Date", "Implementation-Build-Id", "Implementation-Title", "Implementation-URL", "Implementation-Vendor", "Implementation-Vendor-Id", "Implementation-Version", "Import-Package", "Include-Resource", "JCabi-Build", "JCabi-Date", "JCabi-Version", "Jar-Name", "Jar-Version", "Java-Vendor", "Java-Version", "Karaf-Info", "Log4jReleaseKey", "Log4jReleaseManager", "Log4jReleaseVersion", "Main-Class", "Major-Version", "Manifest-Version", "Maven-Version", "Module-Email", "Module-Origin", "Module-Owner", "Module-Source", "Multi-Release", "Originally-Created-By", "Os-Arch", "Os-Name", "Os-Version", "Package", "Permissions", "Premain-Class", "Private-Package", "Probe-Provider-XML-File-Names", "Provide-Capability", "Require-Capability", "SCM", "Scm-Connection", "Scm-Revision", "Scm-Url", "Specification-Title", "Specification-Vendor", "Specification-Version", "Spring-Boot-Classes", "Spring-Boot-Lib", "Spring-Boot-Version", "Start-Class", "Time-Zone-Database-Version", "Tool", "Trusted-Library", "URL", "X-BasePOM-Build-Id", "X-BasePOM-Git-Commit-Id", "X-BasePOM-Name", "X-Compile-Source-JDK", "X-Compile-Target-JDK", "camelkruntimeversion", "camelversion", "implementation-version", "mode", "package", "url"]
      Migrated to schema 30 completed
      2020-02-19 20:32:33.606  INFO 1 --- [ DB migration-0] i.s.server.runtime.DefaultMigrator       : Migrating to schema: 31
      Migrated to schema 31 completed
      2020-02-19 20:32:33.708  INFO 1 --- [ DB migration-0] i.s.server.runtime.DefaultMigrator       : Migrating to schema: 32
      Migrating to schema 32 ...
      Start integrations migration
      integrations: migrated 0 out of 0
      Migration to schema 32 completed
      ...
      

      Attachments

        Issue Links

          Activity

            People

              parichar@redhat.com Paul Richardson
              avano@redhat.com Andrej Vano
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: