You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2015/05/27 01:21:42 UTC
ambari git commit: AMBARI-11360. Kerberos FE: during disable,
need option skip if unable to access KDC to remove principals.
(rlevas via yusaku)
Repository: ambari
Updated Branches:
refs/heads/trunk a077ad3f6 -> a285987dd
AMBARI-11360. Kerberos FE: during disable, need option skip if unable to access KDC to remove principals. (rlevas via yusaku)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a285987d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a285987d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a285987d
Branch: refs/heads/trunk
Commit: a285987dde69c28e9fee7a14298150393dd185c9
Parents: a077ad3
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Tue May 26 16:21:10 2015 -0700
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Tue May 26 16:21:10 2015 -0700
----------------------------------------------------------------------
.../main/admin/kerberos/disable_controller.js | 9 ++++++++
.../wizard/wizardProgressPageController.js | 22 ++++++++++++++++----
ambari-web/app/utils/ajax/ajax.js | 16 ++++++++++++++
3 files changed, 43 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/a285987d/ambari-web/app/controllers/main/admin/kerberos/disable_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/kerberos/disable_controller.js b/ambari-web/app/controllers/main/admin/kerberos/disable_controller.js
index 358f922..84e7007 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/disable_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/disable_controller.js
@@ -41,6 +41,15 @@ App.KerberosDisableController = App.KerberosProgressPageController.extend(App.Wi
name: 'admin.unkerberize.cluster',
sender: this,
success: 'startPolling',
+ error: 'onTaskErrorWithSkip'
+ });
+ },
+
+ skipTask: function () {
+ return App.ajax.send({
+ name: 'admin.unkerberize.cluster.skip',
+ sender: this,
+ success: 'startPolling',
error: 'onTaskError'
});
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/a285987d/ambari-web/app/mixins/wizard/wizardProgressPageController.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/wizard/wizardProgressPageController.js b/ambari-web/app/mixins/wizard/wizardProgressPageController.js
index 28e8f41..9132182 100644
--- a/ambari-web/app/mixins/wizard/wizardProgressPageController.js
+++ b/ambari-web/app/mixins/wizard/wizardProgressPageController.js
@@ -277,6 +277,10 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create({
this.get('tasks').findProperty('id', taskId).set('status', status);
},
+ setTaskCanSkip: function (taskId, canSkip) {
+ this.get('tasks').findProperty('id', taskId).set('canSkip', true);
+ },
+
setRequestIds: function (taskId, requestIds) {
this.get('tasks').findProperty('id', taskId).set('requestIds', requestIds);
},
@@ -336,12 +340,19 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create({
} else {
this.set('showRetry', true);
}
+
+ if (this.get('tasks').someProperty('canSkip', true)) {
+ this.get('tasks').findProperty('canSkip', true).set('showSkip', true);
+ }
+
if (App.supports.autoRollbackHA) {
this.get('tasks').findProperty('status', 'FAILED').set('showRollback', true);
}
}
this.get('tasks').filterProperty('status', 'COMPLETED').setEach('showRetry', false);
this.get('tasks').filterProperty('status', 'COMPLETED').setEach('showRollback', false);
+ this.get('tasks').filterProperty('status', 'COMPLETED').setEach('showSkip', false);
+ this.get('tasks').filterProperty('status', 'IN_PROGRESS').setEach('showSkip', false);
if (data && data.deferred) {
data.deferred.resolve();
@@ -359,6 +370,11 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create({
this.setTaskStatus(this.get('currentTaskId'), 'FAILED');
},
+ onTaskErrorWithSkip: function () {
+ this.onTaskError();
+ this.setTaskCanSkip(this.get('currentTaskId'), true);
+ },
+
onSingleRequestError: function (jqXHR, ajaxOptions, error, opt) {
App.ajax.defaultErrorHandler(jqXHR, opt.url, opt.method, jqXHR.status);
this.set('status', 'FAILED');
@@ -512,7 +528,7 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create({
},
success: 'onCreateComponent',
error: 'onCreateComponent'
- });
+ });
} else {
self.onCreateComponent(null, null, {
hostName: result.mapProperty('hostName'),
@@ -542,7 +558,7 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create({
/**
* Update component status on selected hosts.
- *
+ *
* @param {string} componentName
* @param {(string|string[])} hostName
* @param {string} serviceName
@@ -660,5 +676,3 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create({
}
});
-
-
http://git-wip-us.apache.org/repos/asf/ambari/blob/a285987d/ambari-web/app/utils/ajax/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js
index f942054..bb65e8a 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -1422,6 +1422,22 @@ var urls = {
}
}
},
+
+ 'admin.unkerberize.cluster.skip': {
+ 'type': 'PUT',
+ 'real': '/clusters/{clusterName}?manage_kerberos_identities=false',
+ 'mock': '',
+ 'format': function (data) {
+ return {
+ data: JSON.stringify({
+ Clusters: {
+ security_type: "NONE"
+ }
+ })
+ }
+ }
+ },
+
'get.cluster.artifact': {
'real': '/clusters/{clusterName}/artifacts/{artifactName}?fields=artifact_data',
'mock': '/data/wizard/kerberos/stack_descriptors.json'