You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Sandor Magyari (JIRA)" <ji...@apache.org> on 2015/11/11 16:58:11 UTC

[jira] [Updated] (AMBARI-13836) NPE when enabling security during Update Configurations stage (after upgrade from 1.6.1 to 2.1.2.1)

     [ https://issues.apache.org/jira/browse/AMBARI-13836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sandor Magyari updated AMBARI-13836:
------------------------------------
    Description: 
It appears that the NPE is coming from org/apache/ambari/server/state/ConfigHelper.java:691 when the config being processed is "storm-site".
{code:title=org/apache/ambari/server/state/ConfigHelper.java:691}
      if (oldConfig == null) {
        oldConfigProperties = null;
      } else {
        oldConfigProperties = oldConfig.getProperties();
        if (oldConfigProperties != null) {
          properties.putAll(oldConfig.getProperties());
        }
==> propertiesAttributes.putAll(oldConfig.getPropertiesAttributes());
      }
{code}
When the config type is "storm-site", oldConfig.getPropertiesAttributes() returns null since the clusterconfig.config_attributes value is null.
Most other relevant records (latest version of the config type) have and empty JSON structure (not null). Except for "hbase-log4j", "hdfs-log4j", hive-exec-log4j", "hive-log4j", "mapreduce2-log4j", "pig-log4j". "yarn-log4j", "zookeeper-log4j" - which don't seem to come into play at this time.
Steps to Reproduce 
(this needs confirmation)
Deploy old version (1.6.1)
Make Ambari Only Upgrade to 2.1.2.1
Enable security
Solution
The fix for this is to make sure oldConfig.getPropertiesAttributes() != null before calling propertiesAttributes.putAll(oldConfig.getPropertiesAttributes()).

  was:
It appears that the NPE is coming from org/apache/ambari/server/state/ConfigHelper.java:691 when the config being processed is "storm-site".
org/apache/ambari/server/state/ConfigHelper.java:691
      if (oldConfig == null) {
        oldConfigProperties = null;
      } else {
        oldConfigProperties = oldConfig.getProperties();
        if (oldConfigProperties != null) {
          properties.putAll(oldConfig.getProperties());
        }
==> propertiesAttributes.putAll(oldConfig.getPropertiesAttributes());
      }
When the config type is "storm-site", oldConfig.getPropertiesAttributes() returns null since the clusterconfig.config_attributes value is null.
Most other relevant records (latest version of the config type) have and empty JSON structure (not null). Except for "hbase-log4j", "hdfs-log4j", hive-exec-log4j", "hive-log4j", "mapreduce2-log4j", "pig-log4j". "yarn-log4j", "zookeeper-log4j" - which don't seem to come into play at this time.
Steps to Reproduce 
(this needs confirmation)
Deploy old version (1.6.1)
Make Ambari Only Upgrade to 2.1.2.1
Enable security
Solution
The fix for this is to make sure oldConfig.getPropertiesAttributes() != null before calling propertiesAttributes.putAll(oldConfig.getPropertiesAttributes()).


> NPE when enabling security during Update Configurations stage (after upgrade from 1.6.1 to 2.1.2.1)
> ---------------------------------------------------------------------------------------------------
>
>                 Key: AMBARI-13836
>                 URL: https://issues.apache.org/jira/browse/AMBARI-13836
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.1.2
>            Reporter: Sandor Magyari
>            Assignee: Sandor Magyari
>            Priority: Critical
>             Fix For: 2.1.3
>
>
> It appears that the NPE is coming from org/apache/ambari/server/state/ConfigHelper.java:691 when the config being processed is "storm-site".
> {code:title=org/apache/ambari/server/state/ConfigHelper.java:691}
>       if (oldConfig == null) {
>         oldConfigProperties = null;
>       } else {
>         oldConfigProperties = oldConfig.getProperties();
>         if (oldConfigProperties != null) {
>           properties.putAll(oldConfig.getProperties());
>         }
> ==> propertiesAttributes.putAll(oldConfig.getPropertiesAttributes());
>       }
> {code}
> When the config type is "storm-site", oldConfig.getPropertiesAttributes() returns null since the clusterconfig.config_attributes value is null.
> Most other relevant records (latest version of the config type) have and empty JSON structure (not null). Except for "hbase-log4j", "hdfs-log4j", hive-exec-log4j", "hive-log4j", "mapreduce2-log4j", "pig-log4j". "yarn-log4j", "zookeeper-log4j" - which don't seem to come into play at this time.
> Steps to Reproduce 
> (this needs confirmation)
> Deploy old version (1.6.1)
> Make Ambari Only Upgrade to 2.1.2.1
> Enable security
> Solution
> The fix for this is to make sure oldConfig.getPropertiesAttributes() != null before calling propertiesAttributes.putAll(oldConfig.getPropertiesAttributes()).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)