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

Ambari upgrade failed while running 'Alter Table blueprint' - blueprint_name column

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.4.2
    • Fix Version/s: 2.4.2
    • Component/s: ambari-upgrade
    • Labels:
      None

      Description

      Observed errors in today's run during Ambari upgrade from 2.2.1.1 to 2.4.2.0-36
      ambari-server --hash
      c6da6776f029f15d3a7d6009697371eee4e5f4c5

      Ambari DB - MySQL; Secure HDP-2.4.0.0 cluster deployed via UI

      Upgrade Log indicates below:

      18 Oct 2016 14:17:59,115  INFO [main] DBAccessorImpl:824 - Executing query: ALTER TABLE users  MODIFY user_name VARCHAR(100)
      18 Oct 2016 14:17:59,154  INFO [main] DBAccessorImpl:824 - Executing query: ALTER TABLE users  MODIFY user_name VARCHAR(100) NOT NULL
      18 Oct 2016 14:17:59,191  INFO [main] DBAccessorImpl:824 - Executing query: ALTER TABLE host_role_command  MODIFY role VARCHAR(100)
      18 Oct 2016 14:17:59,428  INFO [main] DBAccessorImpl:824 - Executing query: ALTER TABLE host_role_command  MODIFY status VARCHAR(100)
      18 Oct 2016 14:17:59,656  INFO [main] DBAccessorImpl:824 - Executing query: ALTER TABLE blueprint  MODIFY blueprint_name VARCHAR(100)
      18 Oct 2016 14:17:59,678 ERROR [main] DBAccessorImpl:830 - Error executing query: ALTER TABLE blueprint  MODIFY blueprint_name VARCHAR(100)
      java.sql.SQLException: Cannot change column 'blueprint_name': used in a foreign key constraint 'FK_blueprint_setting_name' of table 'ambaricustom.blueprint_setting'
              at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:996)
              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3887)
              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823)
              at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435)
              at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582)
              at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2526)
              at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2484)
              at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:848)
              at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:742)
              at org.apache.ambari.server.orm.DBAccessorImpl.executeQuery(DBAccessorImpl.java:827)
              at org.apache.ambari.server.orm.DBAccessorImpl.executeQuery(DBAccessorImpl.java:819)
              at org.apache.ambari.server.orm.DBAccessorImpl.alterColumn(DBAccessorImpl.java:610)
              at org.apache.ambari.server.upgrade.UpgradeCatalog242.updateTablesForMysql(UpgradeCatalog242.java:120)
              at org.apache.ambari.server.upgrade.UpgradeCatalog242.executeDDLUpdates(UpgradeCatalog242.java:95)
              at org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.upgradeSchema(AbstractUpgradeCatalog.java:889)
              at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeUpgrade(SchemaUpgradeHelper.java:206)
              at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.main(SchemaUpgradeHelper.java:349)
      18 Oct 2016 14:17:59,680 ERROR [main] SchemaUpgradeHelper:208 - Upgrade failed.
      java.sql.SQLException: Cannot change column 'blueprint_name': used in a foreign key constraint 'FK_blueprint_setting_name' of table 'ambaricustom.blueprint_setting'
              at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:996)
              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3887)
              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823)
              at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435)
              at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582)
              at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2526)
              at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2484)
              at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:848)
      
      

        Attachments

        1. AMBARI-18640_part2.patch
          2 kB
          Vitaly Brodetskyi
        2. AMBARI-18640.patch
          5 kB
          Vitaly Brodetskyi

          Issue Links

            Activity

              People

              • Assignee:
                vbrodetskyi Vitaly Brodetskyi
                Reporter:
                vbrodetskyi Vitaly Brodetskyi
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: