Repository: ambari Updated Branches: refs/heads/branch-2.2 fec733436 -> 2115abb5a
AMBARI-14642: Duplicate Kerberos related properties for HAWQ (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2115abb5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2115abb5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2115abb5 Branch: refs/heads/branch-2.2 Commit: 2115abb5a576f3ad07ffc29c84e0102510b42ec6 Parents: fec7334 Author: Jun Aoki <[email protected]> Authored: Thu Jan 14 12:42:22 2016 -0800 Committer: Jun Aoki <[email protected]> Committed: Thu Jan 14 12:42:22 2016 -0800 ---------------------------------------------------------------------- .../app/controllers/wizard/step7_controller.js | 46 ----------------- .../test/controllers/wizard/step7_test.js | 53 -------------------- 2 files changed, 99 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/2115abb5/ambari-web/app/controllers/wizard/step7_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js index 4c3dfde..4b27c76 100644 --- a/ambari-web/app/controllers/wizard/step7_controller.js +++ b/ambari-web/app/controllers/wizard/step7_controller.js @@ -722,9 +722,6 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E if (App.get('isRMHaEnabled')) { this.addHawqConfigsOnRMHa(configs); } - if (App.get('isKerberosEnabled')) { - this.addHawqConfigsOnKerberizedCluster(configs); - } } } if (App.get('isSingleNode')) this.removeHawqStandbyHostAddressConfig(configs); @@ -942,49 +939,6 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E }, /** - * For Kerberos Enabled cluster, HAWQ service requires additional config parameters in hdfs-client.xml and hawq-site.xml - * This method ensures that these additional parameters are added to hdfs-client.xml and hawq-site.xml - * @param configs existing configs on cluster - * @returns {Object[]} existing configs + additional config parameters in hdfs-client.xml and hawq-site.xml - */ - addHawqConfigsOnKerberizedCluster: function(configs) { - Em.A([ - { - name: 'hadoop.security.authentication', - value: 'kerberos', - filename: 'hdfs-client.xml', - isOverridable: false, - isReconfigurable: false - }, { - name: 'enable_secure_filesystem', - value: 'ON', - filename: 'hawq-site.xml', - isOverridable: false, - isReconfigurable: false - }, { - name: 'krb_server_keyfile', - value: '/etc/security/keytabs/hawq.service.keytab', - filename: 'hawq-site.xml', - isOverridable: true, - isReconfigurable: true - } - ]).forEach(function (property) { - var newProperty = App.config.createDefaultConfig(property.name, 'HAWQ', property.filename, true); - Em.setProperties(newProperty, { - displayName: property.name, - displayType: 'string', - name: property.name, - value: property.value, - recommendedValue: property.value, - isOverridable: property.isOverridable, - isReconfigurable: property.isReconfigurable, - isSecureConfig: true - }); - configs.push(App.ServiceConfigProperty.create(newProperty)); - }); - }, - - /** * render configs, distribute them by service * and wrap each in ServiceConfigProperty object * @param configs http://git-wip-us.apache.org/repos/asf/ambari/blob/2115abb5/ambari-web/test/controllers/wizard/step7_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/wizard/step7_test.js b/ambari-web/test/controllers/wizard/step7_test.js index 50a55e6..408a43e 100644 --- a/ambari-web/test/controllers/wizard/step7_test.js +++ b/ambari-web/test/controllers/wizard/step7_test.js @@ -2077,59 +2077,6 @@ describe('App.InstallerStep7Controller', function () { }); }); - - describe('#addHawqConfigsOnKerberizedCluster', function () { - var secureProperties = [ - { - name: 'hadoop.security.authentication', - value: 'kerberos', - file: 'hdfs-client', - isOverridable: false, - isReconfigurable: false - }, { - name: 'enable_secure_filesystem', - value: 'ON', - file: 'hawq-site', - isOverridable: false, - isReconfigurable: false - }, { - name: 'krb_server_keyfile', - value: '/etc/security/keytabs/hawq.service.keytab', - file: 'hawq-site', - isOverridable: true, - isReconfigurable: true - } - ]; - - var configs = [ - { - id: 'dummy__dummy-site', - description: 'dummy__dummy-site', - displayName: 'dummy', - displayType: 'string', - name: 'dummy', - value: 'dummy' - } - ]; - - it('should add three security related configs for HAWQ if Kerberos is enabled', function () { - var originalConfigsLength = configs.length; - installerStep7Controller.addHawqConfigsOnKerberizedCluster(configs); - // ensure 3 new configs are added - expect(configs.length - originalConfigsLength).to.be.eql(3); - // check if all three new properties were added - secureProperties.forEach(function (newProperty) { - var newPropertyAdded = configs.filterProperty('filename', newProperty.file + '.xml').findProperty('name', newProperty.name); - expect(newPropertyAdded.name).to.be.eql(newProperty.name); - expect(newPropertyAdded.displayName).to.be.eql(newProperty.name); - expect(newPropertyAdded.value).to.be.eql(newProperty.value); - expect(newPropertyAdded.recommendedValue).to.be.eql(newProperty.value); - expect(newPropertyAdded.isOverridable).to.be.eql(newProperty.isOverridable); - expect(newPropertyAdded.isReconfigurable).to.be.eql(newProperty.isReconfigurable); - }); - }); - }); - describe('#removeHawqStandbyAddressHostConfig', function() { var testHawqSiteConfigs = [ {
