You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2016/02/29 16:41:54 UTC

ambari git commit: AMBARI-15204 Host checks should not be performed if 0 hosts register. (ababiichuk)

Repository: ambari
Updated Branches:
  refs/heads/trunk ae6dbcea6 -> 5e0ad173d


AMBARI-15204 Host checks should not be performed if 0 hosts register. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: 5e0ad173d34e16f3c4cb231e0e8b496e659ae3e9
Parents: ae6dbce
Author: ababiichuk <ab...@hortonworks.com>
Authored: Fri Feb 26 15:32:48 2016 +0200
Committer: ababiichuk <ab...@hortonworks.com>
Committed: Mon Feb 29 17:39:39 2016 +0200

----------------------------------------------------------------------
 .../app/controllers/wizard/step3_controller.js    | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/5e0ad173/ambari-web/app/controllers/wizard/step3_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step3_controller.js b/ambari-web/app/controllers/wizard/step3_controller.js
index 8ae9068..19ddd20 100644
--- a/ambari-web/app/controllers/wizard/step3_controller.js
+++ b/ambari-web/app/controllers/wizard/step3_controller.js
@@ -230,7 +230,7 @@ App.WizardStep3Controller = Em.Controller.extend(App.ReloadPopupMixin, {
       } else {
         this.set('bootHosts', this.get('hosts'));
         if (App.get('testMode')) {
-          this.startHostcheck();
+          this.startHostcheck(this.get('hosts'));
           this.get('bootHosts').setEach('cpu', '2');
           this.get('bootHosts').setEach('memory', '2000000');
           this.set('isSubmitDisabled', false);
@@ -702,7 +702,7 @@ App.WizardStep3Controller = Em.Controller.extend(App.ReloadPopupMixin, {
     }, this);
 
     if (stopPolling) {
-      this.startHostcheck();
+      this.startHostcheck(hosts);
     }
     else {
       if (hosts.someProperty('bootStatus', 'RUNNING') || App.dateTime() - this.get('registrationStartedAt') < this.get('registrationTimeoutSecs') * 1000) {
@@ -718,7 +718,7 @@ App.WizardStep3Controller = Em.Controller.extend(App.ReloadPopupMixin, {
           _host.set('bootStatus', 'FAILED');
           _host.set('bootLog', (_host.get('bootLog') != null ? _host.get('bootLog') : '') + Em.I18n.t('installer.step3.hosts.bootLog.failed'));
         });
-        this.startHostcheck();
+        this.startHostcheck(hosts);
       }
     }
   },
@@ -910,10 +910,14 @@ App.WizardStep3Controller = Em.Controller.extend(App.ReloadPopupMixin, {
   },
 
 
-  startHostcheck: function() {
-    this.set('isWarningsLoaded', false);
-    this.getHostNameResolution();
-    this.checkHostJDK();
+  startHostcheck: function(hosts) {
+    if (!hosts.everyProperty('bootStatus', 'FAILED')) {
+      this.set('isWarningsLoaded', false);
+      this.getHostNameResolution();
+      this.checkHostJDK();
+    } else {
+      this.stopHostCheck();
+    }
   },
 
   getHostNameResolution: function () {