You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by am...@apache.org on 2017/11/16 15:36:51 UTC

[28/50] [abbrv] ambari git commit: AMBARI-22439 Host check operation is being performed on all hosts during host add should not get stuck. (atkach)

AMBARI-22439 Host check operation is being performed on all hosts during host add should not get stuck. (atkach)


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

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 77fc95442456f6c1e5e451af541d29d1a8f51f2d
Parents: 2a2fdaa
Author: Andrii Tkach <at...@apache.org>
Authored: Tue Nov 14 18:11:56 2017 +0200
Committer: Attila Magyar <am...@hortonworks.com>
Committed: Thu Nov 16 16:35:29 2017 +0100

----------------------------------------------------------------------
 ambari-web/app/mixins/main/host/details/actions/check_host.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/77fc9544/ambari-web/app/mixins/main/host/details/actions/check_host.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/main/host/details/actions/check_host.js b/ambari-web/app/mixins/main/host/details/actions/check_host.js
index 2e2e021..66baf5a 100644
--- a/ambari-web/app/mixins/main/host/details/actions/check_host.js
+++ b/ambari-web/app/mixins/main/host/details/actions/check_host.js
@@ -111,6 +111,8 @@ App.CheckHostMixin = Em.Mixin.create({
    */
   warningsTimeInterval: 60000,
 
+  finishStates: ["FAILED", "COMPLETED", "TIMEDOUT", "ABORTED"],
+
   /**
    * disables host check on Add host wizard as per the experimental flag
    */
@@ -206,7 +208,7 @@ App.CheckHostMixin = Em.Mixin.create({
       //if resolution host check has corrupted data then skip it
       return this.getGeneralHostCheck();
     }
-    if (["FAILED", "COMPLETED", "TIMEDOUT"].contains(data.Requests.request_status)) {
+    if (this.get('finishStates').contains(data.Requests.request_status)) {
       if (data.Requests.inputs.indexOf("last_agent_env_check") != -1) {
         this.set('stopChecking', true);
         this.set('hostsPackagesData', data.tasks.map(function (task) {
@@ -369,7 +371,7 @@ App.CheckHostMixin = Em.Mixin.create({
     data.tasks.forEach(function (task) {
       var name = Em.I18n.t('installer.step3.hostWarningsPopup.resolution.validation.error');
       var hostInfo = this.get("hostCheckWarnings").findProperty('name', name);
-      if (["FAILED", "COMPLETED", "TIMEDOUT"].contains(task.Tasks.status)) {
+      if (this.get('finishStates').contains(task.Tasks.status)) {
         if (task.Tasks.status === "COMPLETED" && !!Em.get(task, "Tasks.structured_out.host_resolution_check.failed_count")) {
           var targetHostName = Em.get(task, "Tasks.host_name");
           var relatedHostNames = Em.get(task, "Tasks.structured_out.host_resolution_check.hosts_with_failures") || [];