You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sr...@apache.org on 2015/05/13 23:43:47 UTC

ambari git commit: AMBARI-11115. KMS properties are not getting set on the hdfs-site.xml and core-site.xml during adding ranger-kms service (ababiichuk via srimanth)

Repository: ambari
Updated Branches:
  refs/heads/trunk 4232d32a1 -> 1db9471e7


AMBARI-11115. KMS properties are not getting set on the hdfs-site.xml and core-site.xml during adding ranger-kms service (ababiichuk via srimanth)


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

Branch: refs/heads/trunk
Commit: 1db9471e78f90dd2d30167c723a5e85c70a217bc
Parents: 4232d32
Author: Srimanth Gunturi <sg...@hortonworks.com>
Authored: Wed May 13 14:28:24 2015 -0700
Committer: Srimanth Gunturi <sg...@hortonworks.com>
Committed: Wed May 13 14:28:46 2015 -0700

----------------------------------------------------------------------
 ambari-web/app/controllers/wizard/step8_controller.js           | 3 ++-
 ambari-web/app/mixins/common/configs/enhanced_configs.js        | 5 ++++-
 .../app/models/configs/objects/service_config_property.js       | 1 +
 ambari-web/app/utils/config.js                                  | 1 +
 4 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1db9471e/ambari-web/app/controllers/wizard/step8_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js
index 39a76d8..2569723 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/ambari-web/app/controllers/wizard/step8_controller.js
@@ -860,7 +860,8 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs, App.wiz
     var configs = this.get('configs').slice(0);
     var configsMap = [];
     fileNamesToUpdate.forEach(function (fileName) {
-      if (!fileName || /^(core)/.test(fileName)) return;
+      // TODO - Temporarily commented out before refactoring should clean it more properly
+      // if (!fileName || /^(core)/.test(fileName)) return;
       var tagName = 'version' + (new Date).getTime();
       var configsToSave = configs.filterProperty('filename', fileName);
       configsToSave.forEach(function (item) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/1db9471e/ambari-web/app/mixins/common/configs/enhanced_configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js b/ambari-web/app/mixins/common/configs/enhanced_configs.js
index 90e3a31..a30d0c9 100644
--- a/ambari-web/app/mixins/common/configs/enhanced_configs.js
+++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js
@@ -570,7 +570,8 @@ App.EnhancedConfigsMixin = Em.Mixin.create({
             serviceName: stepConfigs.get('serviceName'),
             filename: App.config.getOriginalFileName(Em.get(propertyToAdd, 'fileName')),
             isNotSaved: !Em.get(propertyToAdd, 'isDeleted'),
-            isRequired: true
+            isRequired: true,
+            forceUpdate: true
           });
           stepConfigs.get('configs').pushObject(addedProperty);
           addedProperty.validate();
@@ -649,9 +650,11 @@ App.EnhancedConfigsMixin = Em.Mixin.create({
           var valueToSave = propertyToUpdate.saveRecommended ? propertyToUpdate.recommendedValue : propertyToUpdate.value;
           if (!selectedGroup || selectedGroup.get('isDefault')) {
             cp.set('value', valueToSave);
+            cp.set('forceUpdate', true);
           } else {
             if (stepConfigs.get('serviceName') !== this.get('content.serviceName')) {
               cp.set('value', cp.get('defaultValue'));
+              cp.set('forceUpdate', true);
             }
             var overriddenConfig = cp.get('overrides') && cp.get('overrides').findProperty('group.name', selectedGroup.get('name'));
             if (overriddenConfig) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/1db9471e/ambari-web/app/models/configs/objects/service_config_property.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/configs/objects/service_config_property.js b/ambari-web/app/models/configs/objects/service_config_property.js
index 4079e0c..c8971ec 100644
--- a/ambari-web/app/models/configs/objects/service_config_property.js
+++ b/ambari-web/app/models/configs/objects/service_config_property.js
@@ -84,6 +84,7 @@ App.ServiceConfigProperty = Em.Object.extend({
   rowStyleClass: null, // CSS-Class to be applied on the row showing this config
   showAsTextBox: false,
 
+  forceUpdate: false,
   /**
    * value that is returned from server as recommended
    * @type {String}

http://git-wip-us.apache.org/repos/asf/ambari/blob/1db9471e/ambari-web/app/utils/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index 40c6ce5..5949d6e 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -735,6 +735,7 @@ App.config = Em.Object.create({
             config.set('value', defaults[name]);
             config.set('defaultValue', defaults[name]);
             config.set('recommendedValue', defaults[name]);
+            config.set('forceUpdate', true);
           }
         });
       }