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

NPE when enabling security during Update Configurations stage (after upgrade from 1.6.1 to 2.1.2.1)

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.1.2
    • 2.2.0
    • ambari-server
    • None

    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".

      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)

      1. Deploy old version (1.6.1)
      2. Make Ambari Only Upgrade to 2.1.2.1
      3. Enable security

      Solution
      The fix for this is to make sure oldConfig.getPropertiesAttributes() != null before calling propertiesAttributes.putAll(oldConfig.getPropertiesAttributes()).

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            smagyari Magyari Sandor Szilard
            smagyari Magyari Sandor Szilard
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment