Updated Branches:
  refs/heads/trunk 4eaec1e2e -> 548710247

AMBARI-3452. Add host fails after configuring NN HA with JavaScript error. 
(yusaku)


Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/54871024
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/54871024
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/54871024

Branch: refs/heads/trunk
Commit: 54871024758d120f6591ffb1fea213109aa8a241
Parents: 4eaec1e
Author: Yusaku Sako <[email protected]>
Authored: Thu Oct 3 17:10:06 2013 -0700
Committer: Yusaku Sako <[email protected]>
Committed: Thu Oct 3 17:19:20 2013 -0700

----------------------------------------------------------------------
 ambari-web/app/models/service_config.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/54871024/ambari-web/app/models/service_config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/service_config.js 
b/ambari-web/app/models/service_config.js
index ca462c5..1c9bc97 100644
--- a/ambari-web/app/models/service_config.js
+++ b/ambari-web/app/models/service_config.js
@@ -236,7 +236,11 @@ App.ServiceConfigProperty = Ember.Object.extend({
         this.set('value', masterComponentHostsInDB.filterProperty('component', 
'NAMENODE').mapProperty('hostName'));
         break;
       case 'snamenode_host':
-        this.set('value', masterComponentHostsInDB.findProperty('component', 
'SECONDARY_NAMENODE').hostName);
+        // Secondary NameNode does not exist when NameNode HA is enabled
+        var snn = masterComponentHostsInDB.findProperty('component', 
'SECONDARY_NAMENODE');
+        if (snn) {
+          this.set('value', snn.hostName);
+        }
         break;
       case 'datanode_hosts':
         this.set('value', 
slaveComponentHostsInDB.findProperty('componentName', 
'DATANODE').hosts.mapProperty('hostName'));

Reply via email to