Gaurav Nagar created AMBARI-17188:
-------------------------------------
Summary: Ambari upgrade from 2.2.2 to 2.4.0 fails if cluster name
was changed
Key: AMBARI-17188
URL: https://issues.apache.org/jira/browse/AMBARI-17188
Project: Ambari
Issue Type: Bug
Components: ambari-upgrade
Affects Versions: 2.4.0
Reporter: Gaurav Nagar
Assignee: Gaurav Nagar
Fix For: 2.4.0
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:
{code}
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
{code}
Error occurs in UpgradeCatalog240.upgradeCapSchedulerView(), here :
{code}
clusterEntity.setPassword(new
DefaultMasker().unmask(propertyMap.get("ambari.server.password")));
{code}
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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)