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

Ambari upgrade from 2.2.2 to 2.4.0 fails if cluster name was changed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.4.0
    • 2.4.0
    • ambari-upgrade
    • None

    Description

      STR:
      1) Install ambari 2.2.2 (with YARN)
      2) After cluster will be deployed, change cluster name
      3) try to upgrade ambari to 2.4.0 version

      During upgrade you will get this issue:

      Error output from schema upgrade command:
      Exception in thread "main" org.apache.ambari.server.AmbariException
              at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdates(SchemaUpgradeHelper.java:237)
              at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.main(SchemaUpgradeHelper.java:353)
      Caused by: java.lang.NullPointerException
              at java.lang.String.<init>(String.java:491)
              at org.apache.ambari.server.view.DefaultMasker.unmask(DefaultMasker.java:43)
              at org.apache.ambari.server.upgrade.UpgradeCatalog240.upgradeCapSchedulerView(UpgradeCatalog240.java:2407)
              at org.apache.ambari.server.upgrade.UpgradeCatalog240.executeDMLUpdates(UpgradeCatalog240.java:373)
              at org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.upgradeData(AbstractUpgradeCatalog.java:709)
              at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdates(SchemaUpgradeHelper.java:234)
              ... 1 more
      

      Error occurs in UpgradeCatalog240.upgradeCapSchedulerView(), here :

      clusterEntity.setPassword(new DefaultMasker().unmask(propertyMap.get("ambari.server.password")));
      

      because all properties in propertyMap has null value.
      In general this method "upgradeCapSchedulerView" was added to upgrade CUSTOM capacity scheduler view to Remote but "if" construction is not complete. Because when we are doing cluster name update, cluster_handle column will not be updated correctly(for ambari 2.2.2). So later during upgrade when you changing cluster_name from string to int(cluster id) nothing will be set in this column.

      Attachments

        1. AMBARI-17188_branch-2.4.patch
          3 kB
          Gaurav Nagar

        Issue Links

          Activity

            People

              gnagar Gaurav Nagar
              gnagar Gaurav Nagar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: