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 2015/01/09 17:07:54 UTC

[1/2] ambari git commit: AMBARI-9062 Kerberos Wizard: prereq check (with mock data). (ababiichuk)

Repository: ambari
Updated Branches:
  refs/heads/trunk 1f53d011e -> c87fa43be


AMBARI-9062 Kerberos Wizard: prereq check (with mock data). (ababiichuk)


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

Branch: refs/heads/trunk
Commit: 7efa121200b4a089507bc697e7287a01d06f6823
Parents: 1f53d01
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Fri Jan 9 16:59:45 2015 +0200
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Fri Jan 9 18:07:49 2015 +0200

----------------------------------------------------------------------
 ambari-web/app/config.js                        |  1 +
 .../app/controllers/main/admin/kerberos.js      | 38 +++++++++++++++++
 .../main/admin/stack_and_upgrade_controller.js  | 13 ++----
 ambari-web/app/messages.js                      | 14 +++---
 .../modal_popups/cluster_check_dialog.hbs       | 29 +++++++++++++
 .../app/templates/main/admin/kerberos.hbs       |  2 +-
 .../stack_upgrade/pre_upgrade_check_dialog.hbs  | 29 -------------
 ambari-web/app/utils/ajax/ajax.js               |  6 +++
 ambari-web/app/views.js                         |  1 +
 .../common/modal_popups/cluster_check_popup.js  | 42 ++++++++++++++++++
 .../controllers/main/admin/kerberos_test.js     | 45 +++++++++++++++++++-
 .../admin/stack_and_upgrade_controller_test.js  | 12 +++---
 12 files changed, 180 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7efa1212/ambari-web/app/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/config.js b/ambari-web/app/config.js
index a793b5c..8e2e562 100644
--- a/ambari-web/app/config.js
+++ b/ambari-web/app/config.js
@@ -55,6 +55,7 @@ App.isManagedMySQLForHiveEnabled = false;
 App.enableExperimental = false;
 
 App.supports = {
+  preKerberizeCheck: false,
   preUpgradeCheck: true,
   stackUpgrade: true,
   autoRollbackHA: false,

http://git-wip-us.apache.org/repos/asf/ambari/blob/7efa1212/ambari-web/app/controllers/main/admin/kerberos.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/kerberos.js b/ambari-web/app/controllers/main/admin/kerberos.js
index 202fc64..be5b23f 100644
--- a/ambari-web/app/controllers/main/admin/kerberos.js
+++ b/ambari-web/app/controllers/main/admin/kerberos.js
@@ -64,6 +64,44 @@ App.MainAdminKerberosController = App.KerberosWizardStep4Controller.extend({
     return this.get('securityEnabled');
   },
 
+  /**
+   * performes clustere check before kerbefos security
+   * wizard starts if <code>preKerberizeCheck<code> supports is true
+   * otherwise runs <code>startKerberosWizard<code>
+   * @method checkAndStartKerberosWizard
+   */
+  checkAndStartKerberosWizard: function() {
+    if (App.get('supports.preKerberizeCheck')) {
+      App.ajax.send({
+        name: "admin.kerberos_security.checks",
+        sender: this,
+        success: "runSecurityCheckSuccess"
+      });
+    } else {
+      this.startKerberosWizard();
+    }
+  },
+
+  /**
+   * success callback of <code>checkAndStartKerberosWizard()</code>
+   * if there are some fails - it shows popup else open security wizard
+   * @param data {object}
+   * @param opt {object}
+   * @param params {object}
+   * @returns {App.ModalPopup|undefined}
+   */
+  runSecurityCheckSuccess: function (data, opt, params) {
+    //TODO correct check
+    if (data.items.someProperty('UpgradeChecks.status', "FAIL")) {
+      var header = Em.I18n.t('popup.clusterCheck.Security.header').format(params.label);
+      var title = Em.I18n.t('popup.clusterCheck.Security.title');
+      var alert = Em.I18n.t('popup.clusterCheck.Security.alert');
+      App.showClusterCheckPopup(data, header, title, alert);
+    } else {
+      this.startKerberosWizard();
+    }
+  },
+
   startKerberosWizard: function () {
     this.setAddSecurityWizardStatus('RUNNING');
     App.router.transitionTo('adminAddKerberos');

http://git-wip-us.apache.org/repos/asf/ambari/blob/7efa1212/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
index 1629555..bbd69fa 100644
--- a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
+++ b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
@@ -316,15 +316,10 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
    */
   runPreUpgradeCheckSuccess: function (data, opt, params) {
     if (data.items.someProperty('UpgradeChecks.status', "FAIL")) {
-      return App.ModalPopup.show({
-        header: Em.I18n.t('admin.stackUpgrade.preupgradeCheck.header').format(params.label),
-        primary: Em.I18n.t('common.dismiss'),
-        secondary: false,
-        bodyClass: Em.View.extend({
-          templateName: require('templates/main/admin/stack_upgrade/pre_upgrade_check_dialog'),
-          checks: data.items.filterProperty('UpgradeChecks.status', "FAIL")
-        })
-      })
+      var header = Em.I18n.t('popup.clusterCheck.Upgrade.header').format(params.label);
+      var title = Em.I18n.t('popup.clusterCheck.Upgrade.title');
+      var alert = Em.I18n.t('popup.clusterCheck.Upgrade.alert');
+      App.showClusterCheckPopup(data, header, title, alert);
     } else {
       this.upgrade(params);
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/7efa1212/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index e8dc05b..2f39823 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -312,6 +312,15 @@ Em.I18n.translations = {
   'popup.confirmationFeedBack.sending':'Sending...',
   'popup.confirmationFeedBack.query.fail':'Request failed',
 
+  'popup.clusterCheck.failedOn': 'Failed on: ',
+  'popup.clusterCheck.reason': 'Reason: ',
+  'popup.clusterCheck.Upgrade.header': 'Upgrade to {0}',
+  'popup.clusterCheck.Upgrade.title': 'Upgrade Requirements Not Met',
+  'popup.clusterCheck.Upgrade.alert': 'You must meet the following requirements before you can proceed with rolling upgrade.',
+  'popup.clusterCheck.Security.header': 'Enable Security',
+  'popup.clusterCheck.Security.title': 'Security Requirements Not Met',
+  'popup.clusterCheck.Security.alert': 'You must meet the following requirements before you can enable security.',
+
   'login.header':'Sign in',
   'login.username':'Username',
   'login.loginButton':'Sign in',
@@ -1347,11 +1356,6 @@ Em.I18n.translations = {
   'admin.stackUpgrade.dialog.closePause': "Upgrade is paused. \n If you dismiss this window, you can resume Upgrade later.",
   'admin.stackUpgrade.dialog.details.open': "show details",
   'admin.stackUpgrade.dialog.details.hide': "hide details",
-  'admin.stackUpgrade.preupgradeCheck.header': "Upgrade to {0}",
-  'admin.stackUpgrade.preupgradeCheck.title': "Upgrade Requirements Not Met",
-  'admin.stackUpgrade.preupgradeCheck.alert': "You must meet the following requirements before you can proceed with rolling upgrade.",
-  'admin.stackUpgrade.preupgradeCheck.failedOn': "Failed on: ",
-  'admin.stackUpgrade.preupgradeCheck.reason': "Reason: ",
   'services.service.start':'Start',
   'services.service.stop':'Stop',
   'services.service.metrics':'Metrics',

http://git-wip-us.apache.org/repos/asf/ambari/blob/7efa1212/ambari-web/app/templates/common/modal_popups/cluster_check_dialog.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/modal_popups/cluster_check_dialog.hbs b/ambari-web/app/templates/common/modal_popups/cluster_check_dialog.hbs
new file mode 100644
index 0000000..7390aaa
--- /dev/null
+++ b/ambari-web/app/templates/common/modal_popups/cluster_check_dialog.hbs
@@ -0,0 +1,29 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+<div id="pre-upgrade-check">
+  <h4>{{view.title}}</h4>
+  <div class="alert alert-warning">
+    {{view.alert}}
+  </div>
+  <div class="limited-height-2">
+    {{#each item in view.checks}}
+        <i class="icon-remove"></i>&nbsp;<span>{{item.UpgradeChecks.check}}</span>
+        <pre>{{t popup.clusterCheck.reason}}{{item.UpgradeChecks.reason}}<br/>{{t popup.clusterCheck.failedOn}}{{item.UpgradeChecks.failed_on}}</pre>
+    {{/each}}
+  </div>
+</div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/7efa1212/ambari-web/app/templates/main/admin/kerberos.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/kerberos.hbs b/ambari-web/app/templates/main/admin/kerberos.hbs
index 2bb714a..dd40a5c 100644
--- a/ambari-web/app/templates/main/admin/kerberos.hbs
+++ b/ambari-web/app/templates/main/admin/kerberos.hbs
@@ -29,7 +29,7 @@
   {{else}}
     <div>
       <p class="muted">{{t admin.security.disabled}}
-        <a class="btn btn-padding btn-success admin-enable-security-btn" {{action startKerberosWizard target="controller"}}>{{t admin.kerberos.button.enable}} </a>
+        <a class="btn btn-padding btn-success admin-enable-security-btn" {{action checkAndStartKerberosWizard target="controller"}}>{{t admin.kerberos.button.enable}} </a>
         <br/>
       </p>
     </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/7efa1212/ambari-web/app/templates/main/admin/stack_upgrade/pre_upgrade_check_dialog.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/stack_upgrade/pre_upgrade_check_dialog.hbs b/ambari-web/app/templates/main/admin/stack_upgrade/pre_upgrade_check_dialog.hbs
deleted file mode 100644
index f6613ee..0000000
--- a/ambari-web/app/templates/main/admin/stack_upgrade/pre_upgrade_check_dialog.hbs
+++ /dev/null
@@ -1,29 +0,0 @@
-{{!
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-}}
-<div id="pre-upgrade-check">
-  <h4>{{t admin.stackUpgrade.preupgradeCheck.title}}</h4>
-  <div class="alert alert-warning">
-    {{t admin.stackUpgrade.preupgradeCheck.alert}}
-  </div>
-  <div class="limited-height-2">
-    {{#each item in view.checks}}
-        <i class="icon-remove"></i>&nbsp;<span>{{item.UpgradeChecks.check}}</span>
-        <pre>{{t admin.stackUpgrade.preupgradeCheck.reason}}{{item.UpgradeChecks.reason}}<br/>{{t admin.stackUpgrade.preupgradeCheck.failedOn}}{{item.UpgradeChecks.failed_on}}</pre>
-    {{/each}}
-  </div>
-</div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/7efa1212/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 82e73b1..a7ee18d 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -1383,6 +1383,12 @@ var urls = {
     'mock': '/data/stack_versions/pre_upgrade_check.json'
   },
 
+  'admin.kerberos_security.checks': {
+    //TODO when api will be known
+    'real': '',
+    'mock': '/data/stack_versions/pre_upgrade_check.json'
+  },
+
   'wizard.advanced_repositories.valid_url': {
     'real': '/stacks/{stackName}/versions/{stackVersion}/operating_systems/{osType}/repositories/{repoId}',
     'mock': '',

http://git-wip-us.apache.org/repos/asf/ambari/blob/7efa1212/ambari-web/app/views.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views.js b/ambari-web/app/views.js
index a86bf39..1873b22 100644
--- a/ambari-web/app/views.js
+++ b/ambari-web/app/views.js
@@ -30,6 +30,7 @@ require('views/common/modal_popups/confirmation_feedback_popup');
 require('views/common/modal_popups/confirmation_popup');
 require('views/common/modal_popups/prompt_popup');
 require('views/common/modal_popups/reload_popup');
+require('views/common/modal_popups/cluster_check_popup');
 require('views/common/editable_list');
 require('views/common/rolling_restart_view');
 require('views/common/select_custom_date_view');

http://git-wip-us.apache.org/repos/asf/ambari/blob/7efa1212/ambari-web/app/views/common/modal_popups/cluster_check_popup.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/modal_popups/cluster_check_popup.js b/ambari-web/app/views/common/modal_popups/cluster_check_popup.js
new file mode 100644
index 0000000..73dd274
--- /dev/null
+++ b/ambari-web/app/views/common/modal_popups/cluster_check_popup.js
@@ -0,0 +1,42 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var App = require('app');
+
+/**
+ * popup to display requirements that are not met
+ * for current action
+ * @param data
+ * @param header
+ * @param title
+ * @param alert
+ * @returns {*|void}
+ */
+App.showClusterCheckPopup = function (data, header, title, alert) {
+  return App.ModalPopup.show({
+    primary: Em.I18n.t('common.dismiss'),
+    secondary: false,
+    header: header,
+    bodyClass: Em.View.extend({
+      title: title,
+      alert: alert,
+      templateName: require('templates/common/modal_popups/cluster_check_dialog'),
+      checks: data.items.filterProperty('UpgradeChecks.status', "FAIL")
+    })
+  });
+};

http://git-wip-us.apache.org/repos/asf/ambari/blob/7efa1212/ambari-web/test/controllers/main/admin/kerberos_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/admin/kerberos_test.js b/ambari-web/test/controllers/main/admin/kerberos_test.js
index b203fc9..2198b14 100644
--- a/ambari-web/test/controllers/main/admin/kerberos_test.js
+++ b/ambari-web/test/controllers/main/admin/kerberos_test.js
@@ -19,14 +19,16 @@
 var App = require('app');
 
 describe('App.MainAdminKerberosController', function() {
+
+  var controller = App.MainAdminKerberosController.create({});
+
   describe('#prepareConfigProperties', function() {
     beforeEach(function() {
-      this.controller = App.MainAdminKerberosController.create({});
       sinon.stub(App.Service, 'find').returns([
         Em.Object.create({ serviceName: 'KERBEROS'}),
         Em.Object.create({ serviceName: 'HDFS' })
       ]);
-      this.result = this.controller.prepareConfigProperties([
+      this.result = controller.prepareConfigProperties([
         Em.Object.create({ name: 'prop1', isEditable: true, serviceName: 'SERVICE1'}),
         Em.Object.create({ name: 'prop2', isEditable: true, serviceName: 'KERBEROS'}),
         Em.Object.create({ name: 'prop3', isEditable: true, serviceName: 'HDFS'}),
@@ -53,4 +55,43 @@ describe('App.MainAdminKerberosController', function() {
       });
     });
   });
+
+  describe("#runSecurityCheckSuccess()", function () {
+    beforeEach(function () {
+      sinon.stub(App, 'showClusterCheckPopup', Em.K);
+      sinon.stub(controller, 'startKerberosWizard', Em.K);
+    });
+    afterEach(function () {
+      App.showClusterCheckPopup.restore();
+      controller.startKerberosWizard.restore();
+    });
+    it("shows popup", function () {
+      var check =  { items: [{
+        UpgradeChecks: {
+          "check": "Work-preserving RM/NM restart is enabled in YARN configs",
+          "status": "FAIL",
+          "reason": "FAIL",
+          "failed_on": [],
+          "check_type": "SERVICE"
+        }
+      }]};
+      controller.runSecurityCheckSuccess(check,null,{label: "name"});
+      expect(controller.startKerberosWizard.called).to.be.false;
+      expect(App.showClusterCheckPopup.called).to.be.true;
+    });
+    it("runs startKerberosWizard", function () {
+      var check = { items: [{
+        UpgradeChecks: {
+          "check": "Work-preserving RM/NM restart is enabled in YARN configs",
+          "status": "PASS",
+          "reason": "OK",
+          "failed_on": [],
+          "check_type": "SERVICE"
+        }
+      }]};
+      controller.runSecurityCheckSuccess(check,null,{label: "name"});
+      expect(controller.startKerberosWizard.called).to.be.true;
+      expect(App.showClusterCheckPopup.called).to.be.false;
+    });
+  });
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/7efa1212/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
index 3f770f3..6388692 100644
--- a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
@@ -256,11 +256,11 @@ describe('App.MainAdminStackAndUpgradeController', function() {
 
   describe("#runPreUpgradeCheckSuccess()", function () {
     beforeEach(function () {
-      sinon.stub(App.ModalPopup, 'show', Em.K);
+      sinon.stub(App, 'showClusterCheckPopup', Em.K);
       sinon.stub(controller, 'upgrade', Em.K);
     });
     afterEach(function () {
-      App.ModalPopup.show.restore();
+      App.showClusterCheckPopup.restore();
       controller.upgrade.restore();
     });
     it("shows popup", function () {
@@ -274,8 +274,8 @@ describe('App.MainAdminStackAndUpgradeController', function() {
         }
       }]};
       controller.runPreUpgradeCheckSuccess(check,null,{label: "name"});
-      expect(controller.upgrade.calledOnce).to.be.false;
-      expect(App.ModalPopup.show.calledOnce).to.be.true;
+      expect(controller.upgrade.called).to.be.false;
+      expect(App.showClusterCheckPopup.called).to.be.true;
     });
     it("runs upgrade popup", function () {
       var check = { items: [{
@@ -288,8 +288,8 @@ describe('App.MainAdminStackAndUpgradeController', function() {
         }
       }]};
       controller.runPreUpgradeCheckSuccess(check,null,{label: "name"});
-      expect(controller.upgrade.calledOnce).to.be.true;
-      expect(App.ModalPopup.show.calledOnce).to.be.false;
+      expect(controller.upgrade.called).to.be.true;
+      expect(App.showClusterCheckPopup.called).to.be.false;
     });
   });
 


[2/2] ambari git commit: AMBARI-9065 Remove the code to disallow the user from proceeding with HA Wizard if Kerberos is already enabled. (ababiichuk)

Posted by ab...@apache.org.
AMBARI-9065 Remove the code to disallow the user from proceeding with HA Wizard if Kerberos is already enabled. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: c87fa43bec2d92089598a3acd6a4cc3ead78a8dc
Parents: 7efa121
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Fri Jan 9 17:38:48 2015 +0200
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Fri Jan 9 18:07:50 2015 +0200

----------------------------------------------------------------------
 .../main/admin/highAvailability_controller.js   | 35 ++++++++------------
 ambari-web/app/messages.js                      |  1 -
 .../admin/highAvailability_controller_test.js   | 24 --------------
 3 files changed, 13 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c87fa43b/ambari-web/app/controllers/main/admin/highAvailability_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability_controller.js b/ambari-web/app/controllers/main/admin/highAvailability_controller.js
index 8d79f96..bac7b67 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability_controller.js
@@ -21,10 +21,6 @@ var App = require('app');
 App.MainAdminHighAvailabilityController = Em.Controller.extend({
   name: 'mainAdminHighAvailabilityController',
 
-  securityEnabled: function () {
-    return App.router.get('mainAdminSecurityController.securityEnabled');
-  }.property('App.router.mainAdminSecurityController.securityEnabled'),
-
   tag: null,
 
   dataIsLoaded: false,
@@ -36,25 +32,20 @@ App.MainAdminHighAvailabilityController = Em.Controller.extend({
   enableHighAvailability: function () {
     var message = [];
     var hostComponents = App.HostComponent.find();
-    //Prerequisite Checks
-    if (this.get('securityEnabled')) {
-      this.showErrorPopup(Em.I18n.t('admin.highAvailability.error.security'));
-      return false;
-    } else {
-      if (hostComponents.findProperty('componentName', 'NAMENODE').get('workStatus') !== 'STARTED') {
-        message.push(Em.I18n.t('admin.highAvailability.error.namenodeStarted'));
-      }
-      if (hostComponents.filterProperty('componentName', 'ZOOKEEPER_SERVER').length < 3) {
-        message.push(Em.I18n.t('admin.highAvailability.error.zooKeeperNum'));
-      }
 
-      if (App.router.get('mainHostController.hostsCountMap.TOTAL') < 3) {
-        message.push(Em.I18n.t('admin.highAvailability.error.hostsNum'));
-      }
-      if (message.length > 0) {
-        this.showErrorPopup(message);
-        return false;
-      }
+    if (hostComponents.findProperty('componentName', 'NAMENODE').get('workStatus') !== 'STARTED') {
+      message.push(Em.I18n.t('admin.highAvailability.error.namenodeStarted'));
+    }
+    if (hostComponents.filterProperty('componentName', 'ZOOKEEPER_SERVER').length < 3) {
+      message.push(Em.I18n.t('admin.highAvailability.error.zooKeeperNum'));
+    }
+
+    if (App.router.get('mainHostController.hostsCountMap.TOTAL') < 3) {
+      message.push(Em.I18n.t('admin.highAvailability.error.hostsNum'));
+    }
+    if (message.length > 0) {
+      this.showErrorPopup(message);
+      return false;
     }
     App.router.transitionTo('main.services.enableHighAvailability');
     return true;

http://git-wip-us.apache.org/repos/asf/ambari/blob/c87fa43b/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 2f39823..d84cf5e 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1017,7 +1017,6 @@ Em.I18n.translations = {
   'admin.highAvailability.error.hostsNum':'You must have at least 3 hosts in your cluster to enable NameNode HA.',
   'admin.highAvailability.error.namenodeStarted':'NameNode must be running before you enable NameNode HA.',
   'admin.highAvailability.error.zooKeeperNum':'You must have at least 3 ZooKeeper Servers in your cluster to enable NameNode HA.',
-  'admin.highAvailability.error.security':'You cannot enable NameNode HA via this wizard as your cluster is already secured.  First, disable security by going to Admin > Security, and then run this Enable NameNode HA wizard again.  After NameNode HA is enabled, you can go back to Admin > Security to secure the cluster.',
   'admin.rm_highAvailability.error.hostsNum':'You must have at least 3 hosts in your cluster to enable ResourceManager HA.',
   'admin.rm_highAvailability.error.zooKeeperNum':'You must have at least 3 ZooKeeper Servers in your cluster to enable ResourceManager HA.',
   'admin.rm_highAvailability.closePopup':'Enable ResourceManager HA Wizard is in progress. You must allow the wizard to complete for Ambari to be in usable state. If you choose to quit, you must follow manual instructions to complete or revert enabling ResourceManager HA as documented in the Ambari User Guide. Are you sure you want to exit the wizard?',

http://git-wip-us.apache.org/repos/asf/ambari/blob/c87fa43b/ambari-web/test/controllers/main/admin/highAvailability_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/admin/highAvailability_controller_test.js b/ambari-web/test/controllers/main/admin/highAvailability_controller_test.js
index 1cdb75d..0a75d9f 100644
--- a/ambari-web/test/controllers/main/admin/highAvailability_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/highAvailability_controller_test.js
@@ -44,20 +44,7 @@ describe('App.MainAdminHighAvailabilityController', function () {
       App.HostComponent.find.restore();
     });
 
-    it('Security enabled', function () {
-      sinon.stub(controller, 'get', function (k) {
-        if (k === 'securityEnabled') return true;
-        return Em.get(controller, k);
-      });
-      expect(controller.enableHighAvailability()).to.be.false;
-      expect(controller.showErrorPopup.calledOnce).to.be.true;
-      controller.get.restore();
-    });
     it('NAMENODE in INSTALLED state', function () {
-      sinon.stub(controller, 'get', function (k) {
-        if (k === 'securityEnabled') return false;
-        return Em.get(controller, k);
-      });
       hostComponents = [
         Em.Object.create({
           componentName: 'NAMENODE',
@@ -83,7 +70,6 @@ describe('App.MainAdminHighAvailabilityController', function () {
       expect(controller.enableHighAvailability()).to.be.false;
       expect(controller.showErrorPopup.calledOnce).to.be.true;
       App.router.get.restore();
-      controller.get.restore();
     });
     it('Cluster has less than 3 ZOOKEPER_SERVER components', function () {
       hostComponents = [
@@ -101,10 +87,6 @@ describe('App.MainAdminHighAvailabilityController', function () {
       App.router.get.restore();
     });
     it('total hosts number less than 3', function () {
-      sinon.stub(controller, 'get', function (k) {
-        if (k === 'securityEnabled') return false;
-        return Em.get(controller, k);
-      });
       hostComponents = [
         Em.Object.create({
           componentName: 'NAMENODE',
@@ -129,13 +111,8 @@ describe('App.MainAdminHighAvailabilityController', function () {
       expect(controller.enableHighAvailability()).to.be.false;
       expect(controller.showErrorPopup.calledOnce).to.be.true;
       App.router.get.restore();
-      controller.get.restore();
     });
     it('All checks passed', function () {
-      sinon.stub(controller, 'get', function (k) {
-        if (k === 'securityEnabled') return false;
-        return Em.get(controller, k);
-      });
       hostComponents = [
         Em.Object.create({
           componentName: 'NAMENODE',
@@ -161,7 +138,6 @@ describe('App.MainAdminHighAvailabilityController', function () {
       expect(App.router.transitionTo.calledWith('main.services.enableHighAvailability')).to.be.true;
       expect(controller.showErrorPopup.calledOnce).to.be.false;
       App.router.get.restore();
-      controller.get.restore();
     });
   });