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

Upgrade tries to upgrade postgres even if the version is the same

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • fuse-7.6-CR4
    • fuse-7.6-GA
    • Fuse Online
    • None

      The upgrade process can handle the DB upgrade, if the image is different. This comparison however doesn't take into account that the image may be the same, but coming from another source (imagestream vs direct image reference). Copying the comment from ENTESB-12534 here:

      This seems to not work when upgrading from 7.5.0 (which used 9.6 pg) to a new version with this fix. In 7.5.0 we used an imagestream for the 9.6 database:

        triggers:
        - type: ConfigChange
        - imageChangeParams:
            automatic: true
            containerNames:
            - postgresql
            from:
              kind: ImageStreamTag
              name: postgresql:9.6
              namespace: openshift
      

      Whereas in 7.6 we use the direct image:

      image: registry.redhat.io/rhscl/postgresql-96-rhel7:latest
      

      This causes that we are trying to do the pg_upgrade from 9.6 to 9.6, which is not ok:

      oc logs -f syndesis-db-2-vjpkr -c postgresql           
      psql: could not connect to server: Connection refused
      	Is the server running on host "127.0.0.1" and accepting
      	TCP/IP connections on port 5432?
      Waiting for Postgres server...
      /usr/share/container-scripts/postgresql/common.sh: line 121: [: 9.6: integer expression expected
      
      == WARNING!! ==
      PostgreSQL server version matches the datadir PG_VERSION.
      The $POSTGRESQL_UPGRADE makes no sense and you probably
      made some mistake, keeping the variable set you might
      risk a data loss in future!
      ===============
      

            zregvart@redhat.com Zoran Regvart
            avano@redhat.com Andrej Vano
            Andrej Vano Andrej Vano
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: