ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject ambari git commit: AMBARI-10952 Implement a ambari-server property to suppress service checks during deploy cluster. (atkach)
Date Wed, 06 May 2015 14:18:56 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk dcc3c7ed1 -> ef9b2f4a8


AMBARI-10952 Implement a ambari-server property to suppress service checks during deploy cluster.
(atkach)


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

Branch: refs/heads/trunk
Commit: ef9b2f4a807e93aa9a17be783ecbb211bc6fb7e4
Parents: dcc3c7e
Author: Andrii Tkach <atkach@hortonworks.com>
Authored: Wed May 6 15:42:32 2015 +0300
Committer: Andrii Tkach <atkach@hortonworks.com>
Committed: Wed May 6 17:18:33 2015 +0300

----------------------------------------------------------------------
 .../app/controllers/main/admin/kerberos/step8_controller.js    | 3 ++-
 ambari-web/app/mixins/wizard/wizardProgressPageController.js   | 4 +++-
 .../controllers/main/service/reassign/step4_controller_test.js | 6 ++++++
 .../controllers/main/service/reassign/step6_controller_test.js | 6 ++++++
 4 files changed, 17 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ef9b2f4a/ambari-web/app/controllers/main/admin/kerberos/step8_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/kerberos/step8_controller.js b/ambari-web/app/controllers/main/admin/kerberos/step8_controller.js
index bffd62c..fee4835 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/step8_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/step8_controller.js
@@ -22,6 +22,7 @@ App.KerberosWizardStep8Controller = App.KerberosProgressPageController.extend({
   commands: ['startServices'],
 
   startServices: function () {
+    var skipServiceCheck = App.router.get('clusterController.ambariProperties')['skip.service.checks']
=== "true";
     App.ajax.send({
       name: 'common.services.update',
       sender: this,
@@ -30,7 +31,7 @@ App.KerberosWizardStep8Controller = App.KerberosProgressPageController.extend({
         "ServiceInfo": {
           "state": "STARTED"
         },
-        urlParams: "params/run_smoke_test=true"
+        urlParams: "params/run_smoke_test=" + !skipServiceCheck
       },
       success: 'startPolling',
       error: 'onTaskError'

http://git-wip-us.apache.org/repos/asf/ambari/blob/ef9b2f4a/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 d8168a3..28e8f41 100644
--- a/ambari-web/app/mixins/wizard/wizardProgressPageController.js
+++ b/ambari-web/app/mixins/wizard/wizardProgressPageController.js
@@ -426,6 +426,7 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create({
    * @returns {$.ajax}
    */
   startServices: function (runSmokeTest, excludedServices) {
+    var skipServiceCheck = App.router.get('clusterController.ambariProperties')['skip.service.checks']
=== "true";
     var data = {
       'ServiceInfo': {
         'state': 'STARTED'
@@ -443,7 +444,8 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create({
     }
 
     if (runSmokeTest) {
-      data.urlParams = data.urlParams ? data.urlParams + '&params/run_smoke_test=true'
: 'params/run_smoke_test=true';
+      data.urlParams = data.urlParams ? data.urlParams + '&' : '';
+      data.urlParams += 'params/run_smoke_test=' + !skipServiceCheck;
     }
 
     return App.ajax.send({

http://git-wip-us.apache.org/repos/asf/ambari/blob/ef9b2f4a/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js b/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js
index 4b26a87..b23e5d6 100644
--- a/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js
+++ b/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js
@@ -969,6 +969,12 @@ describe('App.ReassignMasterWizardStep4Controller', function () {
   });
 
   describe('#startServices()', function () {
+    before(function () {
+      sinon.stub(App.router, 'get').returns({"skip.service.checks": "false"});
+    });
+    after(function () {
+      App.router.get.restore();
+    });
     it('', function () {
       controller.startServices();
       expect(App.ajax.send.calledOnce).to.be.true;

http://git-wip-us.apache.org/repos/asf/ambari/blob/ef9b2f4a/ambari-web/test/controllers/main/service/reassign/step6_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/service/reassign/step6_controller_test.js b/ambari-web/test/controllers/main/service/reassign/step6_controller_test.js
index 506a411..25b52da 100644
--- a/ambari-web/test/controllers/main/service/reassign/step6_controller_test.js
+++ b/ambari-web/test/controllers/main/service/reassign/step6_controller_test.js
@@ -149,6 +149,12 @@ describe('App.ReassignMasterWizardStep6Controller', function () {
   });
 
   describe('#startServices()', function () {
+    before(function () {
+      sinon.stub(App.router, 'get').returns({"skip.service.checks": "false"});
+    });
+    after(function () {
+      App.router.get.restore();
+    });
     it('', function () {
       controller.startServices();
       expect(App.ajax.send.calledOnce).to.be.true;


Mime
View raw message