You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2016/04/13 14:48:40 UTC

[1/3] ambari git commit: AMBARI-15840. Sorting Alerts with ALERT NAMES in Alerts UI is not working as expected (alexantonenko)

Repository: ambari
Updated Branches:
  refs/heads/trunk 281307fce -> a7f0c09bd


AMBARI-15840. Sorting Alerts with ALERT NAMES in Alerts UI is not working as expected (alexantonenko)


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

Branch: refs/heads/trunk
Commit: a7f0c09bdedeea61965bc4a7629fc599de2c71b8
Parents: 9f803fe
Author: Alex Antonenko <hi...@gmail.com>
Authored: Tue Apr 12 18:44:03 2016 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Wed Apr 13 15:48:35 2016 +0300

----------------------------------------------------------------------
 ambari-web/app/views/common/sort_view.js       |  6 +++---
 ambari-web/test/views/common/sort_view_test.js | 12 ++++++++++++
 2 files changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a7f0c09b/ambari-web/app/views/common/sort_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/sort_view.js b/ambari-web/app/views/common/sort_view.js
index 011ddfc..bbb6004 100644
--- a/ambari-web/app/views/common/sort_view.js
+++ b/ambari-web/app/views/common/sort_view.js
@@ -177,8 +177,8 @@ var wrapperView = Em.View.extend({
         func = function (a, b) {
           var a_p = a.get(property.get('name'));
           var b_p = b.get(property.get('name'));
-          a_p = Em.isNone(a_p) ? '' : '' + a_p;
-          b_p = Em.isNone(b_p) ? '' : '' + b_p;
+          a_p = Em.isNone(a_p) ? '' : ('' + a_p).toLowerCase();
+          b_p = Em.isNone(b_p) ? '' : ('' + b_p).toLowerCase();
           return order ? b_p.localeCompare(a_p) : a_p.localeCompare(b_p);
         };
     }
@@ -239,7 +239,7 @@ var serverWrapperView = Em.View.extend({
     var childViews = this.get('childViews');
     var statuses = App.db.getSortingStatuses(this.get('controller.name'));
     if (statuses) {
-      var sortingColumn = App.db.getSortingStatuses(this.get('controller.name')).find(function(column){ return column.status != 'sorting'})
+      var sortingColumn = App.db.getSortingStatuses(this.get('controller.name')).find(function(column){ return column.status != 'sorting'});
       if (sortingColumn) {
         var sortingColumnView = childViews.findProperty('name', sortingColumn.name);
         sortingColumnView.set('status', sortingColumn.status);

http://git-wip-us.apache.org/repos/asf/ambari/blob/a7f0c09b/ambari-web/test/views/common/sort_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/common/sort_view_test.js b/ambari-web/test/views/common/sort_view_test.js
index 1820250..a21a352 100644
--- a/ambari-web/test/views/common/sort_view_test.js
+++ b/ambari-web/test/views/common/sort_view_test.js
@@ -96,6 +96,18 @@ describe('#wrapperView', function () {
             b: Em.Object.create({serviceName: 's2'}),
             order: false,
             e: -1
+          },
+          {
+            a: Em.Object.create({serviceName: 's1'}),
+            b: Em.Object.create({serviceName: 'S2'}),
+            order: true,
+            e: 1
+          },
+          {
+            a: Em.Object.create({serviceName: 's1'}),
+            b: Em.Object.create({serviceName: 'S2'}),
+            order: false,
+            e: -1
           }
         ]).forEach(function (test, i) {
           it('test #' + (i + 1), function () {


[2/3] ambari git commit: AMBARI-15838. Kerberos : Referencing an identity across service's kerberos files is not honored and hangs at 'configure identities'. (alexantonenko)

Posted by al...@apache.org.
AMBARI-15838. Kerberos : Referencing an identity across service's kerberos files is not honored and hangs at 'configure identities'. (alexantonenko)


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

Branch: refs/heads/trunk
Commit: 9f803fe9aca0c5817179f8f5a0bffc5ea1723d12
Parents: b3a9a7c
Author: Alex Antonenko <hi...@gmail.com>
Authored: Tue Apr 12 18:18:17 2016 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Wed Apr 13 15:48:35 2016 +0300

----------------------------------------------------------------------
 .../app/mixins/wizard/addSecurityConfigs.js     | 53 +++++++++++++++++---
 .../mixins/wizard/addSeccurityConfigs_test.js   | 18 +++++--
 2 files changed, 61 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/9f803fe9/ambari-web/app/mixins/wizard/addSecurityConfigs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/wizard/addSecurityConfigs.js b/ambari-web/app/mixins/wizard/addSecurityConfigs.js
index a829cb6..09fa561 100644
--- a/ambari-web/app/mixins/wizard/addSecurityConfigs.js
+++ b/ambari-web/app/mixins/wizard/addSecurityConfigs.js
@@ -245,13 +245,49 @@ App.AddSecurityConfigs = Em.Mixin.create({
    */
   processConfigReferences: function (kerberosDescriptor, configs) {
     var identities = kerberosDescriptor.identities;
-    identities = identities.concat(kerberosDescriptor.services.map(function (service) {
-      if (service.components && !!service.components.length) {
-        identities = identities.concat(service.components.mapProperty('identities').reduce(function (p, c) {
-          return p.concat(c);
-        }, []));
-        return identities;
+
+    /**
+     * Returns indentity object with additional attribute `referencePath`.
+     * Reference path depends on how deep identity is. Each level separated by `/` sign.
+     *
+     * @param {object} identity
+     * @param {string} [prefix=false] prefix to append e.g. 'SERVICE_NAME'
+     * @returns {object} identity object
+     */
+    var setReferencePath = function(identity, prefix) {
+      var name = Em.getWithDefault(identity, 'name', false);
+      if (name) {
+        if (prefix) {
+          name = prefix + '/' + name;
+        }
+        identity.referencePath = name;
       }
+      return identity;
+    };
+
+    // map all identities and add attribute `referencePath`
+    // `referencePath` is a path to identity it can be 1-3 levels
+    // 1 for "/global" identity e.g. `/spnego`
+    // 2 for "/SERVICE/identity"
+    // 3 for "/SERVICE/COMPONENT/identity"
+    identities = identities.map(function(i) {
+      return setReferencePath(i);
+    })
+    .concat(kerberosDescriptor.services.map(function (service) {
+      var serviceName = Em.getWithDefault(service, 'name', false);
+      var serviceIdentities = Em.getWithDefault(service, 'identities', []).map(function(i) {
+        return setReferencePath(i, serviceName);
+      });
+      var componentIdentities = Em.getWithDefault(service || {}, 'components', []).map(function(i) {
+        var componentName = Em.getWithDefault(i, 'name', false);
+        return Em.getWithDefault(i, 'identities', []).map(function(componentIdentity) {
+          return setReferencePath(componentIdentity, serviceName + '/' + componentName);
+        });
+      }).reduce(function(p, c) {
+        return p.concat(c);
+      }, []);
+      serviceIdentities.pushObjects(componentIdentities);
+      return serviceIdentities;
     }).reduce(function (p, c) {
       return p.concat(c);
     }, []));
@@ -260,7 +296,10 @@ App.AddSecurityConfigs = Em.Mixin.create({
     configs.forEach(function (item) {
       var reference = item.get('referenceProperty');
       if (!!reference) {
-        var identity = identities.findProperty('name', reference.split(':')[0])[reference.split(':')[1]];
+        // first find identity by `name`
+        // if not found try to find by `referencePath`
+        var identity = Em.getWithDefault(identities.findProperty('name', reference.split(':')[0]) || {}, reference.split(':')[1], false) ||
+              Em.getWithDefault(identities.findProperty('referencePath', reference.split(':')[0]) || {}, reference.split(':')[1], false);
         if (identity && !!identity.configuration) {
           item.set('observesValueFrom', identity.configuration.split('/')[1]);
         } else {

http://git-wip-us.apache.org/repos/asf/ambari/blob/9f803fe9/ambari-web/test/mixins/wizard/addSeccurityConfigs_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/mixins/wizard/addSeccurityConfigs_test.js b/ambari-web/test/mixins/wizard/addSeccurityConfigs_test.js
index e923144..ea44dcf 100644
--- a/ambari-web/test/mixins/wizard/addSeccurityConfigs_test.js
+++ b/ambari-web/test/mixins/wizard/addSeccurityConfigs_test.js
@@ -222,7 +222,12 @@ describe('App.AddSecurityConfigs', function () {
           name: 'SERVICE',
           identities: [
             { name: '/spnego' },
-            { name: '/hdfs' }
+            { name: '/hdfs' },
+            {
+              name: 'service_identity',
+              keytab: { configuration: 'service-site/service.keytab' },
+              principal: { configuration: 'service-site/service.principal' }
+            }
           ]
         },
         {
@@ -247,6 +252,7 @@ describe('App.AddSecurityConfigs', function () {
         }
       ]
     };
+
     var configs = Em.A([
       generateProperty('spnego_inherited_keytab', 'spnego:keytab'),
       generateProperty('spnego_inherited_principal', 'spnego:principal'),
@@ -255,8 +261,12 @@ describe('App.AddSecurityConfigs', function () {
       generateProperty('component_prop1_inherited_principal', 'component_prop1:principal'),
       generateProperty('component_prop1_inherited_keytab', 'component_prop1:keytab'),
       generateProperty('component_prop2_inherited_keytab', 'component_prop2:keytab'),
-      generateProperty('component_prop2_inherited_principal', 'component_prop2:principal')
+      generateProperty('component_prop2_inherited_principal', 'component_prop2:principal'),
+      generateProperty('component_prop2_inherited_principal', 'component_prop2:principal'),
+      generateProperty('component_prop3_inherited_principal', 'SERVICE2/COMPONENT/component_prop2:principal'),
+      generateProperty('service_prop1_inherited_principal', 'SERVICE/service_identity:principal')
     ]);
+
     var tests = [
       { name: 'spnego_inherited_keytab', e: 'spnego_keytab' },
       { name: 'spnego_inherited_principal', e: 'spnego_principal' },
@@ -265,7 +275,9 @@ describe('App.AddSecurityConfigs', function () {
       { name: 'component_prop1_inherited_keytab', e: 'component.keytab' },
       { name: 'component_prop1_inherited_principal', e: 'component_prop1_principal' },
       { name: 'component_prop2_inherited_keytab', e: 'component2.keytab' },
-      { name: 'component_prop2_inherited_principal', e: 'component2.principal' }
+      { name: 'component_prop2_inherited_principal', e: 'component2.principal' },
+      { name: 'component_prop3_inherited_principal', e: 'component2.principal' },
+      { name: 'service_prop1_inherited_principal', e: 'service.principal' }
     ];
     before(function() {
       controller.processConfigReferences(descriptor, configs);


[3/3] ambari git commit: AMBARI-15833. ResourceManager quicklink goes to the wrong address (alexantonenko)

Posted by al...@apache.org.
AMBARI-15833. ResourceManager quicklink goes to the wrong address (alexantonenko)


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

Branch: refs/heads/trunk
Commit: b3a9a7c361b910b7076263fde613ac5877e65a36
Parents: 281307f
Author: Alex Antonenko <hi...@gmail.com>
Authored: Tue Apr 12 16:03:53 2016 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Wed Apr 13 15:48:35 2016 +0300

----------------------------------------------------------------------
 .../stacks/HDP/2.0.6/services/YARN/quicklinks/quicklinks.json    | 4 ++--
 .../stacks/HDP/2.3/services/YARN/quicklinks/quicklinks.json      | 4 ++--
 ambari-server/src/test/resources/parent_quicklinks.json          | 4 ++--
 ambari-web/app/assets/data/configurations/quicklinks.json        | 4 ++--
 .../app/assets/data/configurations/quicklinks_services.json      | 4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b3a9a7c3/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/quicklinks/quicklinks.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/quicklinks/quicklinks.json b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/quicklinks/quicklinks.json
index 101be6d..56c54b8 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/quicklinks/quicklinks.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/quicklinks/quicklinks.json
@@ -21,9 +21,9 @@
         "requires_user_name": "false",
         "url": "%@://%@:%@",
         "port":{
-          "http_property": "yarn.timeline-service.webapp.address",
+          "http_property": "yarn.resourcemanager.webapp.address",
           "http_default_port": "8088",
-          "https_property": "yarn.timeline-service.webapp.https.address",
+          "https_property": "yarn.resourcemanager.webapp.https.address",
           "https_default_port": "8090",
           "regex": "\\w*:(\\d+)",
           "site": "yarn-site"

http://git-wip-us.apache.org/repos/asf/ambari/blob/b3a9a7c3/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/quicklinks/quicklinks.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/quicklinks/quicklinks.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/quicklinks/quicklinks.json
index 101be6d..56c54b8 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/quicklinks/quicklinks.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/quicklinks/quicklinks.json
@@ -21,9 +21,9 @@
         "requires_user_name": "false",
         "url": "%@://%@:%@",
         "port":{
-          "http_property": "yarn.timeline-service.webapp.address",
+          "http_property": "yarn.resourcemanager.webapp.address",
           "http_default_port": "8088",
-          "https_property": "yarn.timeline-service.webapp.https.address",
+          "https_property": "yarn.resourcemanager.webapp.https.address",
           "https_default_port": "8090",
           "regex": "\\w*:(\\d+)",
           "site": "yarn-site"

http://git-wip-us.apache.org/repos/asf/ambari/blob/b3a9a7c3/ambari-server/src/test/resources/parent_quicklinks.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/parent_quicklinks.json b/ambari-server/src/test/resources/parent_quicklinks.json
index 101be6d..56c54b8 100644
--- a/ambari-server/src/test/resources/parent_quicklinks.json
+++ b/ambari-server/src/test/resources/parent_quicklinks.json
@@ -21,9 +21,9 @@
         "requires_user_name": "false",
         "url": "%@://%@:%@",
         "port":{
-          "http_property": "yarn.timeline-service.webapp.address",
+          "http_property": "yarn.resourcemanager.webapp.address",
           "http_default_port": "8088",
-          "https_property": "yarn.timeline-service.webapp.https.address",
+          "https_property": "yarn.resourcemanager.webapp.https.address",
           "https_default_port": "8090",
           "regex": "\\w*:(\\d+)",
           "site": "yarn-site"

http://git-wip-us.apache.org/repos/asf/ambari/blob/b3a9a7c3/ambari-web/app/assets/data/configurations/quicklinks.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/configurations/quicklinks.json b/ambari-web/app/assets/data/configurations/quicklinks.json
index e5873ab..037645c 100644
--- a/ambari-web/app/assets/data/configurations/quicklinks.json
+++ b/ambari-web/app/assets/data/configurations/quicklinks.json
@@ -32,9 +32,9 @@
                   "port" : {
                     "regex" : "\\w*:(\\d+)",
                     "site" : "yarn-site",
-                    "http_property" : "yarn.timeline-service.webapp.address",
+                    "http_property" : "yarn.resourcemanager.webapp.address",
                     "http_default_port" : "8088",
-                    "https_property" : "yarn.timeline-service.webapp.https.address",
+                    "https_property" : "yarn.resourcemanager.webapp.https.address",
                     "https_default_port" : "8090"
                   },
                   "removed" : false,

http://git-wip-us.apache.org/repos/asf/ambari/blob/b3a9a7c3/ambari-web/app/assets/data/configurations/quicklinks_services.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/configurations/quicklinks_services.json b/ambari-web/app/assets/data/configurations/quicklinks_services.json
index 27d5b91..64ef08b 100644
--- a/ambari-web/app/assets/data/configurations/quicklinks_services.json
+++ b/ambari-web/app/assets/data/configurations/quicklinks_services.json
@@ -41,9 +41,9 @@
                       "port" : {
                         "regex" : "\\w*:(\\d+)",
                         "site" : "yarn-site",
-                        "http_property" : "yarn.timeline-service.webapp.address",
+                        "http_property" : "yarn.resourcemanager.webapp.address",
                         "http_default_port" : "8088",
-                        "https_property" : "yarn.timeline-service.webapp.https.address",
+                        "https_property" : "yarn.resourcemanager.webapp.https.address",
                         "https_default_port" : "8090"
                       },
                       "removed" : false,