You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2013/06/13 02:48:09 UTC
svn commit: r1492513 - in
/incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security:
add/step3.js disable.js
Author: jaimin
Date: Thu Jun 13 00:48:09 2013
New Revision: 1492513
URL: http://svn.apache.org/r1492513
Log:
AMBARI-2371: Security Wizard: webhcat Server start fails on enabling security
Modified:
incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/add/step3.js
incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/disable.js
Modified: incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/add/step3.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/add/step3.js?rev=1492513&r1=1492512&r2=1492513&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/add/step3.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/add/step3.js Thu Jun 13 00:48:09 2013
@@ -36,8 +36,9 @@ App.MainAdminSecurityAddStep3Controller
}.property('content.services'),
isWebHcatSelected: function () {
- return this.get('content.services').someProperty('serviceName', 'WEBHCAT');
- }.property('content.services'),
+ var installedServices = App.Service.find().mapProperty('serviceName');
+ return installedServices.contains('WEBHCAT');
+ },
serviceUsersBinding: 'App.router.mainAdminSecurityController.serviceUsers',
hasHostPopup: true,
@@ -77,6 +78,7 @@ App.MainAdminSecurityAddStep3Controller
runningStage.set('isStarted', false);
}
this.get('stages').pushObjects(stages);
+ this.updateServices();
}
this.moveToNextStage();
@@ -208,13 +210,13 @@ App.MainAdminSecurityAddStep3Controller
if (this.get('globalProperties').someProperty('name', name)) {
var globalProperty = this.get('globalProperties').findProperty('name', name);
newValue = globalProperty.value;
- var isInstanceName = this.get('globalProperties').findProperty('name', 'instance_name');
+ var isInstanceName = this.get('globalProperties').findProperty('name', 'instance_name').value;
if (isInstanceName === true || isInstanceName === 'true') {
if (/primary_name?$/.test(globalProperty.name) && property !== 'hadoop.security.auth_to_local' && property !== 'oozie.authentication.kerberos.name.rules') {
if (this.get('isOozieSelected') && (property === 'oozie.service.HadoopAccessorService.kerberos.principal' || property === 'oozie.authentication.kerberos.principal')) {
var oozieServerName = App.Service.find('OOZIE').get('hostComponents').findProperty('componentName', 'OOZIE_SERVER').get('host.hostName');
newValue = newValue + '/' + oozieServerName;
- } else if (this.get('isWebHcatSelected') && property === 'templeton.kerberos.principal') {
+ } else if (this.isWebHcatSelected() && (property === 'templeton.kerberos.principal')) {
var webHcatName = App.Service.find('WEBHCAT').get('hostComponents').findProperty('componentName', 'WEBHCAT_SERVER').get('host.hostName');
newValue = newValue + '/' + webHcatName;
} else {
@@ -429,6 +431,7 @@ App.MainAdminSecurityAddStep3Controller
this.get('globalProperties').forEach(function (_globalProperty) {
_serviceConfigTags.configs[_globalProperty.name] = _globalProperty.value;
}, this);
+ _serviceConfigTags.configs.security_enabled = 'true';
}
else {
this.get('configs').filterProperty('id', 'site property').filterProperty('filename', _serviceConfigTags.siteName + '.xml').forEach(function (_config) {
@@ -450,6 +453,7 @@ App.MainAdminSecurityAddStep3Controller
isSuccess: _stage.get('isSuccess'),
isError: _stage.get('isError'),
url: _stage.get('url'),
+ polledData: _stage.get('polledData'),
data: _stage.get('data')
};
stages.pushObject(stage);
Modified: incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/disable.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/disable.js?rev=1492513&r1=1492512&r2=1492513&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/disable.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/main/admin/security/disable.js Thu Jun 13 00:48:09 2013
@@ -60,6 +60,7 @@ App.MainAdminSecurityDisableController =
runningStage.set('isStarted', false);
}
this.get('stages').pushObjects(stages);
+ this.updateServices();
}
this.loadSecureServices();
this.moveToNextStage();
@@ -252,6 +253,7 @@ App.MainAdminSecurityDisableController =
loadSecureServices: function () {
var secureServices = require('data/secure_configs');
var installedServices = App.Service.find().mapProperty('serviceName');
+ this.get('secureServices').push(secureServices.findProperty('serviceName', 'GENERAL'));
//General (only non service tab) tab is always displayed
installedServices.forEach(function (_service) {
var secureService = secureServices.findProperty('serviceName', _service);
@@ -288,7 +290,6 @@ App.MainAdminSecurityDisableController =
applyConfigurationToClusterSuccessCallback: function (data) {
this.set('noOfWaitingAjaxCalls', this.get('noOfWaitingAjaxCalls') - 1);
if (this.get('noOfWaitingAjaxCalls') == 0) {
- App.router.get('mainAdminSecurityController').setDisableSecurityStatus(undefined);
var currentStage = this.get('stages').findProperty('stage', 'stage3');
currentStage.set('isSuccess', true);
}
@@ -309,6 +310,8 @@ App.MainAdminSecurityDisableController =
}
}, this);
_serviceConfigTags.configs.security_enabled = 'false';
+ _serviceConfigTags.configs.dfs_datanode_address = '50010';
+ _serviceConfigTags.configs.dfs_datanode_http_address = '50075';
} else {
this.get('secureMapping').filterProperty('filename', _serviceConfigTags.siteName + '.xml').forEach(function (_config) {
var configName = _config.name;
@@ -357,6 +360,7 @@ App.MainAdminSecurityDisableController =
isSuccess: _stage.get('isSuccess'),
isError: _stage.get('isError'),
url: _stage.get('url'),
+ polledData: _stage.get('polledData'),
data: _stage.get('data')
};
stages.pushObject(stage);