You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by xi...@apache.org on 2014/02/15 01:19:36 UTC
git commit: AMBARI-4686. App Timeline Server start fails in Security
Wizard.(Andrii Babiichuk)
Repository: ambari
Updated Branches:
refs/heads/trunk cfbc3397c -> 03a5ca8eb
AMBARI-4686. App Timeline Server start fails in Security Wizard.(Andrii Babiichuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/03a5ca8e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/03a5ca8e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/03a5ca8e
Branch: refs/heads/trunk
Commit: 03a5ca8ebee70dfce36e1910f98f02c2a2b82af4
Parents: cfbc339
Author: Xi Wang <xi...@apache.org>
Authored: Fri Feb 14 16:12:22 2014 -0800
Committer: Xi Wang <xi...@apache.org>
Committed: Fri Feb 14 16:17:08 2014 -0800
----------------------------------------------------------------------
.../highAvailability/rollback_controller.js | 4 +--
.../admin/highAvailability/step9_controller.js | 2 +-
.../security/security_progress_controller.js | 27 ++++++++++++++++++++
ambari-web/app/routes/add_security.js | 1 +
ambari-web/app/utils/ajax.js | 2 +-
5 files changed, 32 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/03a5ca8e/ambari-web/app/controllers/main/admin/highAvailability/rollback_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/rollback_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/rollback_controller.js
index 0b74b46..0a024a9 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/rollback_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/rollback_controller.js
@@ -383,7 +383,7 @@ App.HighAvailabilityRollbackController = App.HighAvailabilityProgressPageControl
var hostName = this.get("content.hdfsClientHostNames");
for (var i = 0; i < hostName.length; i++) {
App.ajax.send({
- name: 'admin.high_availability.delete_component',
+ name: 'admin.delete_component',
sender: this,
data: {
componentName: 'HDFS_CLIENT',
@@ -475,7 +475,7 @@ App.HighAvailabilityRollbackController = App.HighAvailabilityProgressPageControl
this.set('numOfDelOperations', hostName.length);
for (var i = 0; i < hostName.length; i++) {
App.ajax.send({
- name: 'admin.high_availability.delete_component',
+ name: 'admin.delete_component',
sender: this,
data: {
componentName: componentName,
http://git-wip-us.apache.org/repos/asf/ambari/blob/03a5ca8e/ambari-web/app/controllers/main/admin/highAvailability/step9_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/step9_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/step9_controller.js
index b41b0e9..eee32b1 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/step9_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/step9_controller.js
@@ -97,7 +97,7 @@ App.HighAvailabilityWizardStep9Controller = App.HighAvailabilityProgressPageCont
deleteSNameNode: function () {
var hostName = this.get('content.masterComponentHosts').findProperty('component', 'SECONDARY_NAMENODE').hostName;
App.ajax.send({
- name: 'admin.high_availability.delete_component',
+ name: 'admin.delete_component',
sender: this,
data: {
componentName: 'SECONDARY_NAMENODE',
http://git-wip-us.apache.org/repos/asf/ambari/blob/03a5ca8e/ambari-web/app/controllers/main/admin/security/security_progress_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/security/security_progress_controller.js b/ambari-web/app/controllers/main/admin/security/security_progress_controller.js
index fc21161..23fdd6e 100644
--- a/ambari-web/app/controllers/main/admin/security/security_progress_controller.js
+++ b/ambari-web/app/controllers/main/admin/security/security_progress_controller.js
@@ -95,6 +95,12 @@ App.MainAdminSecurityProgressController = Em.Controller.extend({
currentStage = startedStages.findProperty('isCompleted', false);
}
if (currentStage && currentStage.get('isPolling') === true) {
+ if (currentStage.get('name') === 'START_SERVICES' && !App.router.get('addSecurityController.securityEnabled')) {
+ var timeLineServer = App.Service.find('YARN').get('hostComponents').findProperty('componentName', 'APP_TIMELINE_SERVER');
+ if (timeLineServer) {
+ this.deleteComponents('APP_TIMELINE_SERVER', timeLineServer.get('host.hostName'));
+ }
+ }
currentStage.set('isStarted', true);
currentStage.start();
} else if (currentStage && currentStage.get('stage') === 'stage3') {
@@ -162,6 +168,27 @@ App.MainAdminSecurityProgressController = Em.Controller.extend({
});
},
+ deleteComponents: function(componentName, hostName) {
+ App.ajax.send({
+ name: 'admin.delete_component',
+ sender: this,
+ data: {
+ componentName: componentName,
+ hostName: hostName
+ },
+ success: 'onDeleteComplete',
+ error: 'onDeleteError'
+ });
+ },
+
+ onDeleteComplete: function () {
+ console.warn('APP_TIMELINE_SERVER doesn\'t support security mode. It has been removed from YARN service ');
+ },
+
+ onDeleteError: function () {
+ console.warn('Error: Can\'t delete APP_TIMELINE_SERVER');
+ },
+
loadClusterConfigsSuccessCallback: function (data) {
var self = this;
//prepare tags to fetch all configuration for a service
http://git-wip-us.apache.org/repos/asf/ambari/blob/03a5ca8e/ambari-web/app/routes/add_security.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/add_security.js b/ambari-web/app/routes/add_security.js
index f5a97de..3601e65 100644
--- a/ambari-web/app/routes/add_security.js
+++ b/ambari-web/app/routes/add_security.js
@@ -231,6 +231,7 @@ module.exports = App.WizardRoute.extend({
if (!controller.get('isSubmitDisabled')) {
$(context.currentTarget).parents("#modal").find(".close").trigger('click');
}
+ location.reload();
}
}),
http://git-wip-us.apache.org/repos/asf/ambari/blob/03a5ca8e/ambari-web/app/utils/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax.js b/ambari-web/app/utils/ajax.js
index 9148796..2d9a355 100644
--- a/ambari-web/app/utils/ajax.js
+++ b/ambari-web/app/utils/ajax.js
@@ -1029,7 +1029,7 @@ var urls = {
'mock': '',
'type': 'GET'
},
- 'admin.high_availability.delete_component': {
+ 'admin.delete_component': {
'real': '/clusters/{clusterName}/hosts/{hostName}/host_components/{componentName}',
'mock': '',
'type': 'DELETE'