ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexantone...@apache.org
Subject ambari git commit: AMBARI-12580. Host Check changes: use THP data from custom action response and call custom action for package and other checks during "Rerun check" (alexantonenko)
Date Wed, 29 Jul 2015 17:22:29 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 90176a9a3 -> 955d72e14


AMBARI-12580. Host Check changes: use THP data from custom action response and call custom
action for package and other checks during "Rerun check" (alexantonenko)


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

Branch: refs/heads/branch-2.1
Commit: 955d72e14ef08becb480b955060de493b0660c4e
Parents: 90176a9
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Wed Jul 29 20:22:16 2015 +0300
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Wed Jul 29 20:22:16 2015 +0300

----------------------------------------------------------------------
 .../app/controllers/wizard/step3_controller.js       | 15 ++++++++++++---
 ambari-web/test/controllers/wizard/step3_test.js     |  2 +-
 2 files changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/955d72e1/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 52c52ac..9defc11 100644
--- a/ambari-web/app/controllers/wizard/step3_controller.js
+++ b/ambari-web/app/controllers/wizard/step3_controller.js
@@ -904,7 +904,7 @@ App.WizardStep3Controller = Em.Controller.extend(App.ReloadPopupMixin,
{
     if (App.get('testMode')) {
       this.getHostInfo();
     } else {
-      var data = this.getDataForCheckRequest("last_agent_env_check,installed_packages,existing_repos",
false);
+      var data = this.getDataForCheckRequest("last_agent_env_check,installed_packages,existing_repos,transparentHugePage",
false);
       data ? this.requestToPerformHostCheck(data) : this.stopHostCheck();
     }
   },
@@ -1035,8 +1035,9 @@ App.WizardStep3Controller = Em.Controller.extend(App.ReloadPopupMixin,
{
           var installed_packages = Em.get(task, 'Tasks.structured_out.installed_packages');
           return {
             hostName: Em.get(task, 'Tasks.host_name'),
+            transparentHugePage: Em.get(task, 'Tasks.structured_out.transparentHugePage.message'),
             installedPackages: installed_packages ? installed_packages : []
-          }
+          };
         }));
         this.getHostInfo();
       } else if (data.Requests.inputs.indexOf("host_resolution_check") != -1) {
@@ -1136,7 +1137,13 @@ App.WizardStep3Controller = Em.Controller.extend(App.ReloadPopupMixin,
{
             hostsDiskNames.push(host_name);
           }
           // "Transparent Huge Pages" check
-          context = self.checkTHP(host_name, Em.get(host, 'Hosts.last_agent_env.transparentHugePage'));
+          var _hostPackagesData = self.get('hostsPackagesData').findProperty('hostName',
host.Hosts.host_name);
+          if (_hostPackagesData) {
+            var transparentHugePage = _hostPackagesData.transparentHugePage;
+            context = self.checkTHP(host_name, transparentHugePage);
+          } else {
+            context = self.checkTHP(host_name, Em.get(host, 'Hosts.last_agent_env.transparentHugePage'));
+          }
           if (context) {
             thpContext.push(context);
             thpHostsNames.push(host_name);
@@ -1369,6 +1376,7 @@ App.WizardStep3Controller = Em.Controller.extend(App.ReloadPopupMixin,
{
     var self = this;
     var currentProgress = 0;
     this.getHostNameResolution();
+    this.getGeneralHostCheck();
     this.checkHostJDK();
     var interval = setInterval(function () {
       currentProgress += 100000 / self.get('warningsTimeInterval');
@@ -1485,6 +1493,7 @@ App.WizardStep3Controller = Em.Controller.extend(App.ReloadPopupMixin,
{
 
       //parse all package warnings for host
       var _hostPackagesData = hostsPackagesData.findProperty('hostName', _host.Hosts.host_name);
+
       if (_hostPackagesData) {
         _hostPackagesData.installedPackages.forEach(function (_package) {
           warning = warningCategories.packagesWarnings[_package.name];

http://git-wip-us.apache.org/repos/asf/ambari/blob/955d72e1/ambari-web/test/controllers/wizard/step3_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/wizard/step3_test.js b/ambari-web/test/controllers/wizard/step3_test.js
index 107c3a4..65a672d 100644
--- a/ambari-web/test/controllers/wizard/step3_test.js
+++ b/ambari-web/test/controllers/wizard/step3_test.js
@@ -2495,7 +2495,7 @@ describe('App.WizardStep3Controller', function () {
       c.getHostCheckTasksSuccess(lastAgentEnvCheckComplete);
       expect(c.get('stopChecking')).to.be.true;
       expect(c.getHostInfo.calledOnce).to.be.true;
-      expect(c.get('hostsPackagesData')).eql([
+      expect(JSON.parse(JSON.stringify(c.get('hostsPackagesData')))).eql([
         {
           hostName: 'h1',
           installedPackages: [


Mime
View raw message