ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitro Lisnichenko" <dlysniche...@hortonworks.com>
Subject Review Request 39761: [preview] Express Upgrade: HDP 2.2 -> HDP 2.3 upgrade blocked on Updating configuration ranger-hdfs-policymgr-ssl
Date Thu, 29 Oct 2015 15:32:04 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39761/
-----------------------------------------------------------

Review request for Ambari, Alejandro Fernandez, Dmytro Grinenko, Jonathan Hurley, Jayush Luniya,
and Nate Cole.


Bugs: AMBARI-13635
    https://issues.apache.org/jira/browse/AMBARI-13635


Repository: ambari


Description
-------

HDP 2.2 -> HDP 2.3 express upgrade gets blocked at step "Updating configuration ranger-hdfs-policymgr-ssl".

{noformat}
java.lang.NullPointerException
at org.apache.ambari.server.serveraction.upgrades.ConfigureAction.execute(ConfigureAction.java:232)
at org.apache.ambari.server.serveraction.ServerActionExecutor$Worker.execute(ServerActionExecutor.java:537)
at org.apache.ambari.server.serveraction.ServerActionExecutor$Worker.run(ServerActionExecutor.java:474)
at java.lang.Thread.run(Thread.java:745)
{noformat}

The NPE is because _ranger-hdfs-policymgr-ssl_ is a new config type in HDP 2.3 and so the
desiredconfig returned in _ConfigureAction_ is null as this config-type does not exist.

{code}
Map<String, DesiredConfig> desiredConfigs = cluster.getDesiredConfigs();
DesiredConfig desiredConfig = desiredConfigs.get(configType);
Config config = cluster.getConfig(configType, desiredConfig.getTag());
{code}


Following difference in _UpgradeResourceProvider.java_ between RU and EU seems to be the root
cause

{code}
/**
During a Rolling Upgrade, change the desired Stack Id if jumping across
major stack versions (e.g., HDP 2.2 -> 2.3), and then set config changes
so they are applied on the newer stack.

During a {@link UpgradeType.NON_ROLLING} upgrade, the stack is applied during the middle of
the upgrade (after
stopping all services), and the configs are applied immediately before starting the services.
The Upgrade Pack is responsible for calling {@link org.apache.ambari.server.serveraction.upgrades.UpdateDesiredStackAction}
at the appropriate moment during the orchestration.
**/
if (pack.getType() == UpgradeType.ROLLING) {
// Desired configs must be set before creating stages because the config tag
// names are read and set on the command for filling in later
applyStackAndProcessConfigurations(targetStackId.getStackName(), cluster, version, direction,
pack);
}
{code}


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
ef21a2a 

Diff: https://reviews.apache.org/r/39761/diff/


Testing
-------

Trying to check EU 2.2->2.3 on live cluster with ranger

Broken unit tests pending.


Thanks,

Dmitro Lisnichenko


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message