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

Ambari UI keeps loading at step3 while adding the new namespace for HDFS for the second time

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.7.5
    • 2.8.0
    • ambari-web
    • None

    Description

      Problem Statement : I am Trying to add namespace to HDFS via Ambari, my HDFS already have two namespaces : namespace1,namespace2 . when i am trying to add the third one say : namespace3, it fails with below script error at Step3:

      app.js:5310 Uncaught TypeError: Cannot read property 'split' of undefined
          at Class.prepareDependencies (app.js:5310)
          at Class.tweakServiceConfigs (app.js:5337)
          at Class.onLoad (app.js:5293)
          at invokeAction (vendor.js:15179)
          at iterateSet (vendor.js:15161)
          at Object.sendEvent (vendor.js:15278)
          at notifyObservers (vendor.js:13870)
          at Object.Ember.notifyObservers (vendor.js:13985)
          at Object.propertyDidChange (vendor.js:14618)
          at set (vendor.js:13424)
      

      Analysis : Upon analysing the code : https://github.com/apache/ambari/blob/release-2.7.5/ambari-web/app/controllers/main/admin/federation/step3_controller.js#L110

      It looks we are blindly taking 0th nameService as the one that have namenode1 and namenode2 and then assiging the namenode1 and namenode2 :

          var nameServices = App.HDFSService.find().objectAt(0).get('masterComponentGroups').mapProperty('name');
          ret.nameServicesList = nameServices.join(',');
          ret.nameservice1 = nameServices[0];
          ret.newNameservice = this.get('content.nameServiceId');
          ret.namenode1 = hdfsSiteConfigs['dfs.namenode.rpc-address.' + ret.nameservice1 + '.nn1'].split(':')[0];
          ret.namenode2 = hdfsSiteConfigs['dfs.namenode.rpc-address.' + ret.nameservice1 + '.nn2'].split(':')[0];
      

      The abouve logic is wrong, when you try to fetch `nameServices` as abouve the order is not neccessarly the way it was created

      This logic need to rewramped.

      Attachments

        Issue Links

          Activity

            People

              bekisz Szabolcs Beki
              asnaik Akhil Naik
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m