ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject git commit: AMBARI-5716. Disable security fails occasionally. (jaimin)
Date Fri, 09 May 2014 18:40:49 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk adaf32e64 -> 074f5ae9d


AMBARI-5716. Disable security fails occasionally. (jaimin)


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

Branch: refs/heads/trunk
Commit: 074f5ae9d31adae361f5c5aca992e58847422534
Parents: adaf32e
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Fri May 9 11:40:10 2014 -0700
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Fri May 9 11:40:10 2014 -0700

----------------------------------------------------------------------
 .../controllers/main/admin/security/disable.js  |  6 ++
 .../security/security_progress_controller.js    |  1 +
 ambari-web/app/routes/main.js                   | 85 ++++++++++----------
 3 files changed, 50 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/074f5ae9/ambari-web/app/controllers/main/admin/security/disable.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/security/disable.js b/ambari-web/app/controllers/main/admin/security/disable.js
index 436b416..958ace8 100644
--- a/ambari-web/app/controllers/main/admin/security/disable.js
+++ b/ambari-web/app/controllers/main/admin/security/disable.js
@@ -26,6 +26,8 @@ App.MainAdminSecurityDisableController = App.MainAdminSecurityProgressController
    * values of site configs when security disabled
    */
   secureConfigValuesMap: {
+    'hadoop.security.authentication': 'simple',
+    'hadoop.security.authorization': 'false',
     'dfs.datanode.address': '0.0.0.0:50010',
     'dfs.datanode.http.address': '0.0.0.0:50075',
     'mapred.task.tracker.task-controller': 'org.apache.hadoop.mapred.DefaultTaskController',
@@ -35,6 +37,10 @@ App.MainAdminSecurityDisableController = App.MainAdminSecurityProgressController
     'hbase.security.authorization': 'false',
     'zookeeper.znode.parent': '/hbase-unsecure',
     'hive.security.authorization.enabled': 'false',
+    'hive.metastore.sasl.enabled': 'false',
+    'hive.server2.authentication': 'NONE',
+    'oozie.authentication.type': 'simple',
+    'oozie.service.HadoopAccessorService.kerberos.enabled': 'false',
     '*.falcon.authentication.type': 'simple',
     '*.falcon.http.authentication.type': 'simple'
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/074f5ae9/ambari-web/app/controllers/main/admin/security/security_progress_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/security/security_progress_controller.js
b/ambari-web/app/controllers/main/admin/security/security_progress_controller.js
index 2c80943..cf8a763 100644
--- a/ambari-web/app/controllers/main/admin/security/security_progress_controller.js
+++ b/ambari-web/app/controllers/main/admin/security/security_progress_controller.js
@@ -48,6 +48,7 @@ App.MainAdminSecurityProgressController = Em.Controller.extend({
   secureMapping: function () {
     return (App.get('isHadoop2Stack')) ? require('data/HDP2/secure_mapping') : require('data/secure_mapping');
   }.property('App.isHadoop2Stack'),
+
   secureProperties: function () {
     if (App.get('isHadoop2Stack')) {
       return require('data/HDP2/secure_properties').configProperties;

http://git-wip-us.apache.org/repos/asf/ambari/blob/074f5ae9/ambari-web/app/routes/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index 9e00962..8f64ecf 100644
--- a/ambari-web/app/routes/main.js
+++ b/ambari-web/app/routes/main.js
@@ -23,26 +23,26 @@ module.exports = Em.Route.extend({
   route: '/main',
   enter: function (router) {
     App.db.updateStorage();
-      console.log('in /main:enter');
-      if (router.getAuthenticated()) {
-        App.router.get('mainAdminAccessController').loadShowJobsForUsers().done(function()
{
-          App.router.get('clusterController').loadClusterName(false);
-          if(App.testMode) {
-            router.get('mainController').initialize();
-          }else {
-            App.router.get('mainController').checkServerClientVersion().done(function() {
-              App.router.get('clusterController').loadClientServerClockDistance().done(function()
{
-                router.get('mainController').initialize();
-              });
+    console.log('in /main:enter');
+    if (router.getAuthenticated()) {
+      App.router.get('mainAdminAccessController').loadShowJobsForUsers().done(function ()
{
+        App.router.get('clusterController').loadClusterName(false);
+        if (App.testMode) {
+          router.get('mainController').initialize();
+        } else {
+          App.router.get('mainController').checkServerClientVersion().done(function () {
+            App.router.get('clusterController').loadClientServerClockDistance().done(function
() {
+              router.get('mainController').initialize();
             });
-          }
-        });
-        // TODO: redirect to last known state
-      } else {
-        Em.run.next(function () {
-          router.transitionTo('login');
-        });
-      }
+          });
+        }
+      });
+      // TODO: redirect to last known state
+    } else {
+      Em.run.next(function () {
+        router.transitionTo('login');
+      });
+    }
   },
   /*
    routePath: function(router,event) {
@@ -87,8 +87,8 @@ module.exports = Em.Route.extend({
     },
     index: Em.Route.extend({
       route: '/',
-      enter: function(router) {
-        Em.run.next(function(){
+      enter: function (router) {
+        Em.run.next(function () {
           router.transitionTo('widgets');
         });
       }
@@ -112,10 +112,10 @@ module.exports = Em.Route.extend({
       },
       index: Ember.Route.extend({
         route: '/',
-        enter: function(router) {
-         Em.run.next(function(){
-           router.transitionTo('heatmap');
-         });
+        enter: function (router) {
+          Em.run.next(function () {
+            router.transitionTo('heatmap');
+          });
         }
       }),
       heatmap: Em.Route.extend({
@@ -153,23 +153,23 @@ module.exports = Em.Route.extend({
     }
   }),
 
-  jobs : Em.Route.extend({
-    route : '/jobs',
+  jobs: Em.Route.extend({
+    route: '/jobs',
     enter: function (router) {
-      if(!App.router.get('mainAdminAccessController.showJobs') && !App.get('isAdmin')){
+      if (!App.router.get('mainAdminAccessController.showJobs') && !App.get('isAdmin'))
{
         Em.run.next(function () {
           router.transitionTo('main.dashboard.index');
         });
       }
     },
-    exit: function(router) {
+    exit: function (router) {
       clearInterval(router.get('mainJobsController').jobsUpdate);
     },
     index: Ember.Route.extend({
       route: '/',
-      connectOutlets : function(router) {
+      connectOutlets: function (router) {
         if (!App.get('isHadoop2Stack')) {
-          Em.run.next(function() {
+          Em.run.next(function () {
             router.transitionTo('main.dashboard.index');
           });
         } else {
@@ -178,9 +178,9 @@ module.exports = Em.Route.extend({
         }
       }
     }),
-    jobDetails : Em.Route.extend({
-      route : '/:job_id',
-      connectOutlets : function(router, job) {
+    jobDetails: Em.Route.extend({
+      route: '/:job_id',
+      connectOutlets: function (router, job) {
         if (job) {
           router.get('mainHiveJobDetailsController').set('loaded', false);
           router.get('mainController').connectOutlet('mainHiveJobDetails', job);
@@ -188,7 +188,7 @@ module.exports = Em.Route.extend({
           router.get('mainJobsController').updateJobs('mainHiveJobDetailsController', 'loadJobDetails');
         }
       },
-      exit: function(router) {
+      exit: function (router) {
         router.get('mainHiveJobDetailsController').set('loaded', false);
       }
     })
@@ -448,7 +448,6 @@ module.exports = Em.Route.extend({
     rollbackHighAvailability: require('routes/rollbackHA_routes'),
 
 
-
     adminSecurity: Em.Route.extend({
       route: '/security',
       enter: function (router) {
@@ -483,12 +482,14 @@ module.exports = Em.Route.extend({
         router.transitionTo('adminAddSecurity');
       },
 
-      disableSecurity: Ember.Route.extend({
+      disableSecurity: Em.Route.extend({
         route: '/disableSecurity',
         enter: function (router) {
           //after refresh check if the wizard is open then restore it
           if (router.get('mainAdminSecurityController').getDisableSecurityStatus() === 'RUNNING')
{
-            Ember.run.next(function () {
+            var controller = router.get('addSecurityController');
+            // App.MainAdminSecurityDisableController uses App.Service DS model whose data
needs to be loaded first
+            controller.dataLoading().done(Em.run.next(function () {
               App.router.get('updateController').set('isWorking', false);
               App.ModalPopup.show({
                 classNames: ['full-width-modal'],
@@ -536,7 +537,7 @@ module.exports = Em.Route.extend({
                   this.fitHeight();
                 }
               });
-            });
+            }));
           } else {
             router.transitionTo('adminSecurity.index');
           }
@@ -579,8 +580,8 @@ module.exports = Em.Route.extend({
       }
     }),
     adminAccess: Em.Route.extend({
-      enter: function(router) {
-        router.get('mainController').dataLoading().done(function() {
+      enter: function (router) {
+        router.get('mainController').dataLoading().done(function () {
           if (!router.get('mainAdminController.isAccessAvailable')) router.transitionTo('adminUser.allUsers');
         });
       },
@@ -732,7 +733,7 @@ module.exports = Em.Route.extend({
     router.transitionTo('hosts.hostDetails.index', event.context);
   },
   filterHosts: function (router, component) {
-    if(!component.context)
+    if (!component.context)
       return;
     router.get('mainHostController').filterByComponent(component.context);
     router.transitionTo('hosts.index');


Mime
View raw message