Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-24992

Ambari Upgrade from 2.6.2.2 to 2.7.1.0 fails in Schema upgrade phase due to long certificate

    XMLWordPrintableJSON

Details

    Description

      I am trying to upgrade to ambari-2.7.0 using command : ambari-server upgrade

      the upgrade operation is failing on Schema upgrade phase

      The exception is :

      Internal Exception: java.sql.BatchUpdateException: Batch entry 2 INSERT INTO ambari_configuration (property_name, category_name, property_value) VALUES ('ambari.sso.provider.certificate','sso-configuration',<LONG VERTIFICATE VALUE>') was aborted: ERROR: value too long for type character varying(2048)  Call getNextException to see other errors in the batch.
      

      and i see as per https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql#L125

      ambari is having :

      CREATE TABLE ambari_configuration (
        category_name VARCHAR(100) NOT NULL,
        property_name VARCHAR(100) NOT NULL,
        property_value VARCHAR(2048),
        CONSTRAINT PK_ambari_configuration PRIMARY KEY (category_name, property_name));
      

      property_value as 2048 but i am having certificate length 2050 and ambari is not accepting it.

      this should be fixed.

      Attachments

        Issue Links

          Activity

            People

              hapylestat Dmytro Grinenko
              asnaik Akhil Naik
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 5h
                  5h