[1/3] ambari git commit: AMBARI-12354. Check that all wizards correctly save their statuses on close (onechiporenko)

2015-07-09 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk e9d79 - bef904722


AMBARI-12354. Check that all wizards correctly save their statuses on close 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: c952878e286ad3838757f8428b370958a8e9ebde
Parents: e9d
Author: Oleg Nechiporenko onechipore...@apache.org
Authored: Thu Jul 9 17:17:06 2015 +0300
Committer: Oleg Nechiporenko onechipore...@apache.org
Committed: Thu Jul 9 18:24:32 2015 +0300

--
 ambari-web/app/controllers/application.js  | 13 +
 .../add_alert_definition_controller.js |  1 -
 .../controllers/main/service/reassign_controller.js|  1 -
 ambari-web/app/templates/application.hbs   |  2 +-
 4 files changed, 14 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c952878e/ambari-web/app/controllers/application.js
--
diff --git a/ambari-web/app/controllers/application.js 
b/ambari-web/app/controllers/application.js
index 439e995..23ff4dc 100644
--- a/ambari-web/app/controllers/application.js
+++ b/ambari-web/app/controllers/application.js
@@ -49,6 +49,19 @@ App.ApplicationController = 
Em.Controller.extend(App.UserPref, {
 return App.router.get('clusterInstallCompleted')  
this.get('isClusterDataLoaded');
   }.property('App.router.clusterInstallCompleted', 'isClusterDataLoaded'),
 
+  /**
+   * Determines if Exit menu-item should be shown
+   * It should if cluster isn't installed
+   * If cluster is installer, codeisClusterDataLoaded/code is checked
+   * @type {boolean}
+   */
+  showExitLink: function () {
+if (App.router.get('clusterInstallCompleted')) {
+  return this.get('isClusterDataLoaded');
+}
+return true;
+  }.property('App.router.clusterInstallCompleted', 'isClusterDataLoaded'),
+
   init: function(){
 this._super();
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/c952878e/ambari-web/app/controllers/main/alerts/add_alert_definition/add_alert_definition_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/alerts/add_alert_definition/add_alert_definition_controller.js
 
b/ambari-web/app/controllers/main/alerts/add_alert_definition/add_alert_definition_controller.js
index 194b4a3..c59df4a 100644
--- 
a/ambari-web/app/controllers/main/alerts/add_alert_definition/add_alert_definition_controller.js
+++ 
b/ambari-web/app/controllers/main/alerts/add_alert_definition/add_alert_definition_controller.js
@@ -45,7 +45,6 @@ App.AddAlertDefinitionController = 
App.WizardController.extend({
 
   finish: function() {
 this.clear();
-this.setCurrentStep('1');
   }
 
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/c952878e/ambari-web/app/controllers/main/service/reassign_controller.js
--
diff --git a/ambari-web/app/controllers/main/service/reassign_controller.js 
b/ambari-web/app/controllers/main/service/reassign_controller.js
index b234143..1827bf5 100644
--- a/ambari-web/app/controllers/main/service/reassign_controller.js
+++ b/ambari-web/app/controllers/main/service/reassign_controller.js
@@ -352,7 +352,6 @@ App.ReassignMasterController = App.WizardController.extend({
* Clear all temporary data
*/
   finish: function () {
-this.setCurrentStep('1');
 this.clearAllSteps();
 this.clearStorageData();
 this.resetDbNamespace();

http://git-wip-us.apache.org/repos/asf/ambari/blob/c952878e/ambari-web/app/templates/application.hbs
--
diff --git a/ambari-web/app/templates/application.hbs 
b/ambari-web/app/templates/application.hbs
index d59bd82..3afd13c 100644
--- a/ambari-web/app/templates/application.hbs
+++ b/ambari-web/app/templates/application.hbs
@@ -81,7 +81,7 @@
 lia href= {{action showSettingsPopup 
target=controller}}{{t app.settings}}/a/li
   {{/isAccessible}}
 {{/if}}
-{{#if isClusterDataLoaded}}
+{{#if showExitLink}}
   li class=break/li
   lia href= id=sign-out {{action logoff}}{{t 
app.signout}}/a/li
 {{/if}}



[3/3] ambari git commit: AMBARI-12357. Properties with slider widget is formatting not properly (onechiporenko)

2015-07-09 Thread onechiporenko
AMBARI-12357. Properties with slider widget is formatting not properly 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: bef904722a685ca3eb2c87863016399da7098a18
Parents: a51accc
Author: Oleg Nechiporenko onechipore...@apache.org
Authored: Thu Jul 9 18:26:48 2015 +0300
Committer: Oleg Nechiporenko onechipore...@apache.org
Committed: Thu Jul 9 18:26:48 2015 +0300

--
 .../configs/widgets/slider_config_widget_view.js | 18 +++---
 .../widgets/slider_config_widget_view_test.js| 19 +++
 2 files changed, 34 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/bef90472/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js 
b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
index b9cbc46..77161e3 100644
--- a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
+++ b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
@@ -333,7 +333,7 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
 for (var i = 1; i = 3; i++) {
   var val = minMirrorValue + this.valueForTickProportionalToStep(range * 
(i / (isSmallInt ? 3 : 4)));
   // if value's type is float, ticks may be float too
-  ticks.push(val);
+  ticks.push(this._extraRound(val));
 }
 
 ticks.push(this.valueForTick(maxMirrorValue));
@@ -465,7 +465,7 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
* @returns {Number}
*/
   valueForTick: function(val) {
-return this.get('unitType') === 'int' ? Math.round(val) : 
parseFloat(val.toFixed(3));
+return this.get('unitType') === 'int' ? Math.round(val) : 
this._extraRound(val);
   },
 
   /**
@@ -482,7 +482,19 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
 }
 var mirrorStep = this.get('mirrorStep');
 var r = Math.round(val / mirrorStep);
-return parseFloat((r * mirrorStep).toFixed(3));
+return this._extraRound(r * mirrorStep);
+  },
+
+  /**
+   * Round number to 3 digits after .
+   * Used for all slider's ticks
+   * @param {Number} v
+   * @returns {Number} number with 3 digits after .
+   * @private
+   * @method _extraRound
+   */
+  _extraRound: function(v) {
+return parseFloat(v.toFixed(3));
   },
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/bef90472/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
--
diff --git 
a/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
 
b/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
index 38c382c..ec408f6 100644
--- 
a/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
+++ 
b/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
@@ -398,6 +398,25 @@ describe('App.SliderConfigWidgetView', function () {
   ticks: [1, 26, 51, 75, 100],
   ticksLabels: [1 GB, , 51 GB, , 100 GB]
 }
+  },
+  {
+viewSetup: {
+  minMirrorValue: 0.166,
+  maxMirrorValue: 0.5,
+  isCompareMode: false,
+  widgetRecommendedValue: 0.166,
+  config: Em.Object.create({
+isOriginalSCP: true,
+stackConfigProperty: Em.Object.create({
+  valueAttributes: {unit: MB, type: int, minimum: 170, 
maximum: 512, increment_step: 256},
+  widget: {units:[{unit-name:GB}]}
+})
+  })
+},
+e: {
+  ticks: [0.166, 0.416, 0.5],
+  ticksLabels: [0.166 GB, 0.416 GB, 0.5 GB]
+}
   }
 ];
 



[2/3] ambari git commit: AMBARI-12185. User is able to go back from deploy step of installer (onechiporenko)

2015-07-09 Thread onechiporenko
AMBARI-12185. User is able to go back from deploy step of installer 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: a51accc1c5735cbade1870430af4216f0b5944da
Parents: c952878
Author: Oleg Nechiporenko onechipore...@apache.org
Authored: Thu Jul 9 17:19:27 2015 +0300
Committer: Oleg Nechiporenko onechipore...@apache.org
Committed: Thu Jul 9 18:24:34 2015 +0300

--
 ambari-web/app/controllers/wizard.js| 28 +---
 ambari-web/app/mixins/routers/redirections.js   |  2 ++
 .../test/mixins/routers/redirections_test.js| 11 ++--
 3 files changed, 29 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a51accc1/ambari-web/app/controllers/wizard.js
--
diff --git a/ambari-web/app/controllers/wizard.js 
b/ambari-web/app/controllers/wizard.js
index 205c56a..eaf60a2 100644
--- a/ambari-web/app/controllers/wizard.js
+++ b/ambari-web/app/controllers/wizard.js
@@ -47,18 +47,26 @@ App.WizardController = 
Em.Controller.extend(App.LocalStorage, App.ThemesMappingM
   ],
 
   init: function () {
-this.set('isStepDisabled', []);
 this.clusters = App.Cluster.find();
-this.get('isStepDisabled').pushObject(Ember.Object.create({
-  step: 1,
-  value: false
-}));
-for (var i = 2; i = this.get('totalSteps'); i++) {
-  this.get('isStepDisabled').pushObject(Ember.Object.create({
-step: i,
-value: true
+this.setIsStepDisabled();
+  },
+
+  /**
+   * Set codeisStepDisabled/code with list of available steps (basing on 
codetotalSteps/code)
+   * @method setIsStepDisabled
+   */
+  setIsStepDisabled: function () {
+  this.set('isStepDisabled', []);
+  this.get('isStepDisabled').pushObject(Em.Object.create({
+step: 1,
+value: false
   }));
-}
+  for (var i = 2; i = this.get('totalSteps'); i++) {
+this.get('isStepDisabled').pushObject(Em.Object.create({
+  step: i,
+  value: true
+}));
+  }
   },
 
   slaveComponents: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/a51accc1/ambari-web/app/mixins/routers/redirections.js
--
diff --git a/ambari-web/app/mixins/routers/redirections.js 
b/ambari-web/app/mixins/routers/redirections.js
index 2e605be..5ef9bae 100644
--- a/ambari-web/app/mixins/routers/redirections.js
+++ b/ambari-web/app/mixins/routers/redirections.js
@@ -62,12 +62,14 @@ App.RouterRedirections = Em.Mixin.create({
   case 'SERVICE_STARTING_3' :
 if (!installerController.get('isStep9')) {
   installerController.setCurrentStep('9');
+  installerController.setLowerStepsDisable(9);
 }
 router.transitionTo(path + 'step' + 
installerController.get('currentStep'));
 break;
   case 'CLUSTER_INSTALLED_4' :
 if (!installerController.get('isStep10')) {
   installerController.setCurrentStep('10');
+  installerController.setLowerStepsDisable(10);
 }
 App.db.data = currentClusterStatus.localdb;
 App.get('router').setAuthenticated(true);

http://git-wip-us.apache.org/repos/asf/ambari/blob/a51accc1/ambari-web/test/mixins/routers/redirections_test.js
--
diff --git a/ambari-web/test/mixins/routers/redirections_test.js 
b/ambari-web/test/mixins/routers/redirections_test.js
index 7b3eed7..d25ee81 100644
--- a/ambari-web/test/mixins/routers/redirections_test.js
+++ b/ambari-web/test/mixins/routers/redirections_test.js
@@ -18,18 +18,25 @@
 
 var App = require('app');
 
-var route, installerController, currentClusterStatus;
+var router, installerController, currentClusterStatus;
 
-describe('App.Redirections', function () {
+describe('App.RouterRedirections', function () {
 
   beforeEach(function () {
 
 installerController = Em.Object.create({
   currentStep: '',
+  totalSteps: 11,
   setCurrentStep: function (k) {
 this.set('currentStep', k);
   }
 });
+
App.router.get('installerController').setIsStepDisabled.call(installerController);
+installerController.setLowerStepsDisable = 
App.router.get('installerController').setLowerStepsDisable.bind(installerController);
+installerController.get('isStepDisabled').pushObject(Ember.Object.create({
+  step: 0,
+  value: true
+}));
 
 router = Em.Object.create(App.RouterRedirections, {
   transitionTo: Em.K,



ambari git commit: AMBARI-12343. Ambari storm deployment fails in secure mode due to storm principal name (rlevas)

2015-07-09 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 ca12ce6f5 - fe6afcac9


AMBARI-12343. Ambari storm deployment fails in secure mode due to storm 
principal name (rlevas)


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

Branch: refs/heads/branch-2.1
Commit: fe6afcac990745dcb22433ed0b2d41a64b5f1733
Parents: ca12ce6
Author: Robert Levas rle...@hortonworks.com
Authored: Thu Jul 9 11:22:36 2015 -0400
Committer: Robert Levas rle...@hortonworks.com
Committed: Thu Jul 9 11:22:36 2015 -0400

--
 .../main/resources/common-services/STORM/0.9.1.2.1/kerberos.json   | 2 +-
 ambari-web/app/assets/data/stacks/HDP-2.1/service_components.json  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/fe6afcac/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/kerberos.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/kerberos.json
 
b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/kerberos.json
index 0f38600..c96d7e7 100644
--- 
a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/kerberos.json
+++ 
b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/kerberos.json
@@ -12,7 +12,7 @@
 {
   name: storm_components,
   principal: {
-value: storm-${cluster_name}@${realm},
+value: ${storm-env/storm_user}@${realm},
 type: user,
 configuration: storm-env/storm_principal_name
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/fe6afcac/ambari-web/app/assets/data/stacks/HDP-2.1/service_components.json
--
diff --git a/ambari-web/app/assets/data/stacks/HDP-2.1/service_components.json 
b/ambari-web/app/assets/data/stacks/HDP-2.1/service_components.json
index ed8d624..ca9ac3c 100644
--- a/ambari-web/app/assets/data/stacks/HDP-2.1/service_components.json
+++ b/ambari-web/app/assets/data/stacks/HDP-2.1/service_components.json
@@ -2492,7 +2492,7 @@
 configuration : storm-env/storm_principal_name,
 type : user,
 local_username : null,
-value : storm-${cluster_name}@${realm}
+value : ${storm-env/storm_user}@${realm}
   },
   name : storm_components,
   keytab : {



Git Push Summary

2015-07-09 Thread rnettleton
Repository: ambari
Updated Tags:  refs/tags/release-2.1.0-rc1 [created] ca12231fb


ambari git commit: AMBARI-12357. Properties with slider widget is formatting not properly (onechiporenko)

2015-07-09 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 fe6afcac9 - 37a92d74d


AMBARI-12357. Properties with slider widget is formatting not properly 
(onechiporenko)


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

Branch: refs/heads/branch-2.1
Commit: 37a92d74d01d09db94c5198b576b7d684c9e1279
Parents: fe6afca
Author: Oleg Nechiporenko onechipore...@apache.org
Authored: Thu Jul 9 18:26:48 2015 +0300
Committer: Oleg Nechiporenko onechipore...@apache.org
Committed: Thu Jul 9 18:30:01 2015 +0300

--
 .../configs/widgets/slider_config_widget_view.js | 18 +++---
 .../widgets/slider_config_widget_view_test.js| 19 +++
 2 files changed, 34 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/37a92d74/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js 
b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
index b9cbc46..77161e3 100644
--- a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
+++ b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
@@ -333,7 +333,7 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
 for (var i = 1; i = 3; i++) {
   var val = minMirrorValue + this.valueForTickProportionalToStep(range * 
(i / (isSmallInt ? 3 : 4)));
   // if value's type is float, ticks may be float too
-  ticks.push(val);
+  ticks.push(this._extraRound(val));
 }
 
 ticks.push(this.valueForTick(maxMirrorValue));
@@ -465,7 +465,7 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
* @returns {Number}
*/
   valueForTick: function(val) {
-return this.get('unitType') === 'int' ? Math.round(val) : 
parseFloat(val.toFixed(3));
+return this.get('unitType') === 'int' ? Math.round(val) : 
this._extraRound(val);
   },
 
   /**
@@ -482,7 +482,19 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
 }
 var mirrorStep = this.get('mirrorStep');
 var r = Math.round(val / mirrorStep);
-return parseFloat((r * mirrorStep).toFixed(3));
+return this._extraRound(r * mirrorStep);
+  },
+
+  /**
+   * Round number to 3 digits after .
+   * Used for all slider's ticks
+   * @param {Number} v
+   * @returns {Number} number with 3 digits after .
+   * @private
+   * @method _extraRound
+   */
+  _extraRound: function(v) {
+return parseFloat(v.toFixed(3));
   },
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/37a92d74/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
--
diff --git 
a/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
 
b/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
index 38c382c..ec408f6 100644
--- 
a/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
+++ 
b/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
@@ -398,6 +398,25 @@ describe('App.SliderConfigWidgetView', function () {
   ticks: [1, 26, 51, 75, 100],
   ticksLabels: [1 GB, , 51 GB, , 100 GB]
 }
+  },
+  {
+viewSetup: {
+  minMirrorValue: 0.166,
+  maxMirrorValue: 0.5,
+  isCompareMode: false,
+  widgetRecommendedValue: 0.166,
+  config: Em.Object.create({
+isOriginalSCP: true,
+stackConfigProperty: Em.Object.create({
+  valueAttributes: {unit: MB, type: int, minimum: 170, 
maximum: 512, increment_step: 256},
+  widget: {units:[{unit-name:GB}]}
+})
+  })
+},
+e: {
+  ticks: [0.166, 0.416, 0.5],
+  ticksLabels: [0.166 GB, 0.416 GB, 0.5 GB]
+}
   }
 ];
 



ambari git commit: AMBARI-12355. DATANODE START failed on secure cluster.(vbrodetskyi)

2015-07-09 Thread vbrodetskyi
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 ad1025efa - ca12ce6f5


AMBARI-12355. DATANODE START failed on secure cluster.(vbrodetskyi)


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

Branch: refs/heads/branch-2.1
Commit: ca12ce6f5a13e7732fbfc09349be160a0e76236b
Parents: ad1025e
Author: Vitaly Brodetskyi vbrodets...@hortonworks.com
Authored: Thu Jul 9 17:57:10 2015 +0300
Committer: Vitaly Brodetskyi vbrodets...@hortonworks.com
Committed: Thu Jul 9 17:57:10 2015 +0300

--
 .../HDFS/2.1.0.2.0/package/scripts/utils.py |  4 +--
 .../python/stacks/2.0.6/HDFS/test_datanode.py   | 24 +++
 .../stacks/2.0.6/HDFS/test_journalnode.py   | 12 
 .../python/stacks/2.0.6/HDFS/test_namenode.py   | 32 ++--
 .../python/stacks/2.0.6/HDFS/test_nfsgateway.py | 12 
 .../python/stacks/2.0.6/HDFS/test_snamenode.py  | 12 
 .../test/python/stacks/2.0.6/HDFS/test_zkfc.py  | 20 ++--
 7 files changed, 57 insertions(+), 59 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ca12ce6f/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
index d9180d8..245c239 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
@@ -178,9 +178,7 @@ def service(action=None, name=None, user=None, options=, 
create_pid_dir=False,
 }
 hadoop_env_exports.update(custom_export)
 
-  check_process = as_user(format(
-ls {pid_file} /dev/null 21 
- ps -p `cat {pid_file}` /dev/null 21), user=params.hdfs_user)
+  check_process = as_sudo([test, -f, pid_file]) ++ 
as_sudo([pgrep, --pidfile, pid_file])
 
   # on STOP directories shouldn't be created
   # since during stop still old dirs are used (which were created during 
previous start)

http://git-wip-us.apache.org/repos/asf/ambari/blob/ca12ce6f/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py
--
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py 
b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py
index b99f53a..8c2a2cc 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py
@@ -63,11 +63,11 @@ class TestDatanode(RMFTestCase):
   )
 self.assertResourceCalled('File', 
'/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid',
 action = ['delete'],
-not_if = ambari-sudo.sh su hdfs -l -s /bin/bash -c 
'[RMF_EXPORT_PLACEHOLDER]ls /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid 
/dev/null 21  ps -p `cat /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid` 
/dev/null 21',
+not_if = ambari-sudo.sh [RMF_ENV_PLACEHOLDER] -H -E test -f 
/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid  ambari-sudo.sh 
[RMF_ENV_PLACEHOLDER] -H -E pgrep --pidfile 
/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid,
 )
 self.assertResourceCalled('Execute', ambari-sudo.sh su hdfs -l -s 
/bin/bash -c '[RMF_EXPORT_PLACEHOLDER]ulimit -c unlimited ;  
/usr/lib/hadoop/sbin/hadoop-daemon.sh --config /etc/hadoop/conf start 
datanode',
 environment = {'HADOOP_LIBEXEC_DIR': '/usr/lib/hadoop/libexec'},
-not_if = ambari-sudo.sh su hdfs -l -s /bin/bash -c 
'[RMF_EXPORT_PLACEHOLDER]ls /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid 
/dev/null 21  ps -p `cat /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid` 
/dev/null 21',
+not_if = ambari-sudo.sh [RMF_ENV_PLACEHOLDER] -H -E test -f 
/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid  ambari-sudo.sh 
[RMF_ENV_PLACEHOLDER] -H -E pgrep --pidfile 
/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid,
 )
 self.assertNoMoreResources()
 
@@ -82,7 +82,7 @@ class TestDatanode(RMFTestCase):
 )
 self.assertResourceCalled('File', 
'/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid',
 action = ['delete'],
-not_if = ambari-sudo.sh su hdfs -l -s /bin/bash -c 
'[RMF_EXPORT_PLACEHOLDER]ls /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid 
/dev/null 21  ps -p `cat /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid` 
/dev/null 21',
+not_if = ambari-sudo.sh [RMF_ENV_PLACEHOLDER] -H -E test -f 
/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid 

ambari git commit: AMBARI-12276. Ozzie running with pig fail to renew JHS delegation token when RU because JHS recovery is not enabled (dlysnichenko)

2015-07-09 Thread dmitriusan
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 1e6f278fd - f999eca07


AMBARI-12276. Ozzie running with pig fail to renew JHS delegation token when RU 
because JHS recovery is not enabled (dlysnichenko)


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

Branch: refs/heads/branch-2.1
Commit: f999eca07e3f218cb93f36c28c5fbcb8d170396b
Parents: 1e6f278
Author: Lisnichenko Dmitro dlysniche...@hortonworks.com
Authored: Thu Jul 9 16:56:28 2015 +0300
Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com
Committed: Thu Jul 9 16:56:28 2015 +0300

--
 .../ambari/server/checks/CheckDescription.java  |  13 ++
 ...apReduce2JobHistoryStatePreservingCheck.java | 156 +++
 .../2.1.0.2.0/package/scripts/params_linux.py   |   1 +
 .../YARN/2.1.0.2.0/package/scripts/yarn.py  |   6 +
 .../YARN/configuration-mapred/mapred-site.xml   |  50 ++
 ...duce2JobHistoryStatePreservingCheckTest.java | 152 ++
 .../stacks/2.0.6/YARN/test_historyserver.py |  12 ++
 7 files changed, 390 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f999eca0/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
index 0cd5352..1e028c1 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
@@ -152,6 +152,19 @@ public enum CheckDescription {
   YARN should have state preserving restart enabled for the Timeline 
server. The yarn-site.xml property yarn.timeline-service.recovery.enabled 
should be set to true.);
   }}),
 
+  SERVICES_MR2_JOBHISTORY_ST(PrereqCheckType.SERVICE,
+  MapReduce2 JobHistory recovery should be enabled,
+  new HashMapString, String() {{
+
put(MapReduce2JobHistoryStatePreservingCheck.MAPREDUCE2_JOBHISTORY_RECOVERY_ENABLE_KEY,
+  MapReduce2 should have recovery enabled for the JobHistory server. 
The mapred-site.xml property mapreduce.jobhistory.recovery.enable should be set 
to true.);
+
put(MapReduce2JobHistoryStatePreservingCheck.MAPREDUCE2_JOBHISTORY_RECOVERY_STORE_KEY,
+  MapReduce2 should have recovery enabled for the JobHistory server. 
The mapred-site.xml property mapreduce.jobhistory.recovery.store.class should 
be set to 
org.apache.hadoop.mapreduce.v2.hs.HistoryServerLeveldbStateStoreService.);
+
put(MapReduce2JobHistoryStatePreservingCheck.MAPREDUCE2_JOBHISTORY_RECOVERY_STORE_LEVELDB_PATH_KEY,
+  MapReduce2 should have recovery enabled for the JobHistory server. 
The mapred-site.xml property mapreduce.jobhistory.recovery.store.leveldb.path 
should be set. Please note that 
\mapreduce.jobhistory.recovery.store.leveldb.path\ should be set equal to 
\yarn.timeline-service.leveldb-state-store.path\ for consistency.);
+
put(MapReduce2JobHistoryStatePreservingCheck.YARN_TIMELINE_SERVICE_LEVELDB_STATE_STORE_PATH_KEY,
+  The mapred-site.xml property 
mapreduce.jobhistory.recovery.store.leveldb.path should be set. Please note 
that \mapreduce.jobhistory.recovery.store.leveldb.path\ should be set equal 
to \yarn.timeline-service.leveldb-state-store.path\ for consistency.);
+  }}),
+
   SERVICES_HIVE_DYNAMIC_SERVICE_DISCOVERY(PrereqCheckType.SERVICE,
   Hive Dynamic Service Discovery,
   new HashMapString, String() {{

http://git-wip-us.apache.org/repos/asf/ambari/blob/f999eca0/ambari-server/src/main/java/org/apache/ambari/server/checks/MapReduce2JobHistoryStatePreservingCheck.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/MapReduce2JobHistoryStatePreservingCheck.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/MapReduce2JobHistoryStatePreservingCheck.java
new file mode 100644
index 000..0bb08b4
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/MapReduce2JobHistoryStatePreservingCheck.java
@@ -0,0 +1,156 @@
+/*
+ * 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 

ambari git commit: AMBARI-12276. Ozzie running with pig fail to renew JHS delegation token when RU because JHS recovery is not enabled (dlysnichenko)

2015-07-09 Thread dmitriusan
Repository: ambari
Updated Branches:
  refs/heads/trunk 5330972d6 - e09b5c800


AMBARI-12276. Ozzie running with pig fail to renew JHS delegation token when RU 
because JHS recovery is not enabled (dlysnichenko)


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

Branch: refs/heads/trunk
Commit: e09b5c8006e5df32e64bfc5976cd0dd25c9e9267
Parents: 5330972
Author: Lisnichenko Dmitro dlysniche...@hortonworks.com
Authored: Thu Jul 9 16:56:28 2015 +0300
Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com
Committed: Thu Jul 9 17:06:41 2015 +0300

--
 .../ambari/server/checks/CheckDescription.java  |  13 ++
 ...apReduce2JobHistoryStatePreservingCheck.java | 156 +++
 .../2.1.0.2.0/package/scripts/params_linux.py   |   1 +
 .../YARN/2.1.0.2.0/package/scripts/yarn.py  |   6 +
 .../YARN/configuration-mapred/mapred-site.xml   |  50 ++
 ...duce2JobHistoryStatePreservingCheckTest.java | 152 ++
 .../stacks/2.0.6/YARN/test_historyserver.py |  12 ++
 7 files changed, 390 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e09b5c80/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
index 0cd5352..1e028c1 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
@@ -152,6 +152,19 @@ public enum CheckDescription {
   YARN should have state preserving restart enabled for the Timeline 
server. The yarn-site.xml property yarn.timeline-service.recovery.enabled 
should be set to true.);
   }}),
 
+  SERVICES_MR2_JOBHISTORY_ST(PrereqCheckType.SERVICE,
+  MapReduce2 JobHistory recovery should be enabled,
+  new HashMapString, String() {{
+
put(MapReduce2JobHistoryStatePreservingCheck.MAPREDUCE2_JOBHISTORY_RECOVERY_ENABLE_KEY,
+  MapReduce2 should have recovery enabled for the JobHistory server. 
The mapred-site.xml property mapreduce.jobhistory.recovery.enable should be set 
to true.);
+
put(MapReduce2JobHistoryStatePreservingCheck.MAPREDUCE2_JOBHISTORY_RECOVERY_STORE_KEY,
+  MapReduce2 should have recovery enabled for the JobHistory server. 
The mapred-site.xml property mapreduce.jobhistory.recovery.store.class should 
be set to 
org.apache.hadoop.mapreduce.v2.hs.HistoryServerLeveldbStateStoreService.);
+
put(MapReduce2JobHistoryStatePreservingCheck.MAPREDUCE2_JOBHISTORY_RECOVERY_STORE_LEVELDB_PATH_KEY,
+  MapReduce2 should have recovery enabled for the JobHistory server. 
The mapred-site.xml property mapreduce.jobhistory.recovery.store.leveldb.path 
should be set. Please note that 
\mapreduce.jobhistory.recovery.store.leveldb.path\ should be set equal to 
\yarn.timeline-service.leveldb-state-store.path\ for consistency.);
+
put(MapReduce2JobHistoryStatePreservingCheck.YARN_TIMELINE_SERVICE_LEVELDB_STATE_STORE_PATH_KEY,
+  The mapred-site.xml property 
mapreduce.jobhistory.recovery.store.leveldb.path should be set. Please note 
that \mapreduce.jobhistory.recovery.store.leveldb.path\ should be set equal 
to \yarn.timeline-service.leveldb-state-store.path\ for consistency.);
+  }}),
+
   SERVICES_HIVE_DYNAMIC_SERVICE_DISCOVERY(PrereqCheckType.SERVICE,
   Hive Dynamic Service Discovery,
   new HashMapString, String() {{

http://git-wip-us.apache.org/repos/asf/ambari/blob/e09b5c80/ambari-server/src/main/java/org/apache/ambari/server/checks/MapReduce2JobHistoryStatePreservingCheck.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/MapReduce2JobHistoryStatePreservingCheck.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/MapReduce2JobHistoryStatePreservingCheck.java
new file mode 100644
index 000..0bb08b4
--- /dev/null
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/MapReduce2JobHistoryStatePreservingCheck.java
@@ -0,0 +1,156 @@
+/*
+ * 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
+ * 

[2/2] ambari git commit: AMBARI-12185. User is able to go back from deploy step of installer (onechiporenko)

2015-07-09 Thread onechiporenko
AMBARI-12185. User is able to go back from deploy step of installer 
(onechiporenko)


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

Branch: refs/heads/branch-2.1
Commit: ad1025efa683f56145fc851dddef226615a95121
Parents: 3310837
Author: Oleg Nechiporenko onechipore...@apache.org
Authored: Thu Jul 9 17:19:27 2015 +0300
Committer: Oleg Nechiporenko onechipore...@apache.org
Committed: Thu Jul 9 17:19:27 2015 +0300

--
 ambari-web/app/controllers/wizard.js| 28 +---
 ambari-web/app/mixins/routers/redirections.js   |  2 ++
 .../test/mixins/routers/redirections_test.js| 11 ++--
 3 files changed, 29 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ad1025ef/ambari-web/app/controllers/wizard.js
--
diff --git a/ambari-web/app/controllers/wizard.js 
b/ambari-web/app/controllers/wizard.js
index bf579ba..cfe6e49 100644
--- a/ambari-web/app/controllers/wizard.js
+++ b/ambari-web/app/controllers/wizard.js
@@ -46,18 +46,26 @@ App.WizardController = 
Em.Controller.extend(App.LocalStorage, App.ThemesMappingM
   ],
 
   init: function () {
-this.set('isStepDisabled', []);
 this.clusters = App.Cluster.find();
-this.get('isStepDisabled').pushObject(Ember.Object.create({
-  step: 1,
-  value: false
-}));
-for (var i = 2; i = this.get('totalSteps'); i++) {
-  this.get('isStepDisabled').pushObject(Ember.Object.create({
-step: i,
-value: true
+this.setIsStepDisabled();
+  },
+
+  /**
+   * Set codeisStepDisabled/code with list of available steps (basing on 
codetotalSteps/code)
+   * @method setIsStepDisabled
+   */
+  setIsStepDisabled: function () {
+  this.set('isStepDisabled', []);
+  this.get('isStepDisabled').pushObject(Em.Object.create({
+step: 1,
+value: false
   }));
-}
+  for (var i = 2; i = this.get('totalSteps'); i++) {
+this.get('isStepDisabled').pushObject(Em.Object.create({
+  step: i,
+  value: true
+}));
+  }
   },
 
   slaveComponents: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/ad1025ef/ambari-web/app/mixins/routers/redirections.js
--
diff --git a/ambari-web/app/mixins/routers/redirections.js 
b/ambari-web/app/mixins/routers/redirections.js
index 2e605be..5ef9bae 100644
--- a/ambari-web/app/mixins/routers/redirections.js
+++ b/ambari-web/app/mixins/routers/redirections.js
@@ -62,12 +62,14 @@ App.RouterRedirections = Em.Mixin.create({
   case 'SERVICE_STARTING_3' :
 if (!installerController.get('isStep9')) {
   installerController.setCurrentStep('9');
+  installerController.setLowerStepsDisable(9);
 }
 router.transitionTo(path + 'step' + 
installerController.get('currentStep'));
 break;
   case 'CLUSTER_INSTALLED_4' :
 if (!installerController.get('isStep10')) {
   installerController.setCurrentStep('10');
+  installerController.setLowerStepsDisable(10);
 }
 App.db.data = currentClusterStatus.localdb;
 App.get('router').setAuthenticated(true);

http://git-wip-us.apache.org/repos/asf/ambari/blob/ad1025ef/ambari-web/test/mixins/routers/redirections_test.js
--
diff --git a/ambari-web/test/mixins/routers/redirections_test.js 
b/ambari-web/test/mixins/routers/redirections_test.js
index 7b3eed7..d25ee81 100644
--- a/ambari-web/test/mixins/routers/redirections_test.js
+++ b/ambari-web/test/mixins/routers/redirections_test.js
@@ -18,18 +18,25 @@
 
 var App = require('app');
 
-var route, installerController, currentClusterStatus;
+var router, installerController, currentClusterStatus;
 
-describe('App.Redirections', function () {
+describe('App.RouterRedirections', function () {
 
   beforeEach(function () {
 
 installerController = Em.Object.create({
   currentStep: '',
+  totalSteps: 11,
   setCurrentStep: function (k) {
 this.set('currentStep', k);
   }
 });
+
App.router.get('installerController').setIsStepDisabled.call(installerController);
+installerController.setLowerStepsDisable = 
App.router.get('installerController').setLowerStepsDisable.bind(installerController);
+installerController.get('isStepDisabled').pushObject(Ember.Object.create({
+  step: 0,
+  value: true
+}));
 
 router = Em.Object.create(App.RouterRedirections, {
   transitionTo: Em.K,



[1/2] ambari git commit: AMBARI-12354. Check that all wizards correctly save their statuses on close (onechiporenko)

2015-07-09 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 f999eca07 - ad1025efa


AMBARI-12354. Check that all wizards correctly save their statuses on close 
(onechiporenko)


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

Branch: refs/heads/branch-2.1
Commit: 33108373bc80299e9f325d84a2ed9c0a4e20147f
Parents: f999eca
Author: Oleg Nechiporenko onechipore...@apache.org
Authored: Thu Jul 9 17:17:06 2015 +0300
Committer: Oleg Nechiporenko onechipore...@apache.org
Committed: Thu Jul 9 17:17:06 2015 +0300

--
 ambari-web/app/controllers/application.js  | 13 +
 .../add_alert_definition_controller.js |  1 -
 .../controllers/main/service/reassign_controller.js|  1 -
 ambari-web/app/templates/application.hbs   |  2 +-
 4 files changed, 14 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/33108373/ambari-web/app/controllers/application.js
--
diff --git a/ambari-web/app/controllers/application.js 
b/ambari-web/app/controllers/application.js
index 439e995..23ff4dc 100644
--- a/ambari-web/app/controllers/application.js
+++ b/ambari-web/app/controllers/application.js
@@ -49,6 +49,19 @@ App.ApplicationController = 
Em.Controller.extend(App.UserPref, {
 return App.router.get('clusterInstallCompleted')  
this.get('isClusterDataLoaded');
   }.property('App.router.clusterInstallCompleted', 'isClusterDataLoaded'),
 
+  /**
+   * Determines if Exit menu-item should be shown
+   * It should if cluster isn't installed
+   * If cluster is installer, codeisClusterDataLoaded/code is checked
+   * @type {boolean}
+   */
+  showExitLink: function () {
+if (App.router.get('clusterInstallCompleted')) {
+  return this.get('isClusterDataLoaded');
+}
+return true;
+  }.property('App.router.clusterInstallCompleted', 'isClusterDataLoaded'),
+
   init: function(){
 this._super();
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/33108373/ambari-web/app/controllers/main/alerts/add_alert_definition/add_alert_definition_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/alerts/add_alert_definition/add_alert_definition_controller.js
 
b/ambari-web/app/controllers/main/alerts/add_alert_definition/add_alert_definition_controller.js
index 194b4a3..c59df4a 100644
--- 
a/ambari-web/app/controllers/main/alerts/add_alert_definition/add_alert_definition_controller.js
+++ 
b/ambari-web/app/controllers/main/alerts/add_alert_definition/add_alert_definition_controller.js
@@ -45,7 +45,6 @@ App.AddAlertDefinitionController = 
App.WizardController.extend({
 
   finish: function() {
 this.clear();
-this.setCurrentStep('1');
   }
 
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/33108373/ambari-web/app/controllers/main/service/reassign_controller.js
--
diff --git a/ambari-web/app/controllers/main/service/reassign_controller.js 
b/ambari-web/app/controllers/main/service/reassign_controller.js
index b234143..1827bf5 100644
--- a/ambari-web/app/controllers/main/service/reassign_controller.js
+++ b/ambari-web/app/controllers/main/service/reassign_controller.js
@@ -352,7 +352,6 @@ App.ReassignMasterController = App.WizardController.extend({
* Clear all temporary data
*/
   finish: function () {
-this.setCurrentStep('1');
 this.clearAllSteps();
 this.clearStorageData();
 this.resetDbNamespace();

http://git-wip-us.apache.org/repos/asf/ambari/blob/33108373/ambari-web/app/templates/application.hbs
--
diff --git a/ambari-web/app/templates/application.hbs 
b/ambari-web/app/templates/application.hbs
index f9f70f4..f767e54 100644
--- a/ambari-web/app/templates/application.hbs
+++ b/ambari-web/app/templates/application.hbs
@@ -81,7 +81,7 @@
 lia href= {{action showSettingsPopup 
target=controller}}{{t app.settings}}/a/li
   {{/isAccessible}}
 {{/if}}
-{{#if isClusterDataLoaded}}
+{{#if showExitLink}}
   li class=break/li
   lia href= id=sign-out {{action logoff}}{{t 
app.signout}}/a/li
 {{/if}}



ambari git commit: AMBARI-12355. DATANODE START failed on secure cluster.(vbrodetskyi)

2015-07-09 Thread vbrodetskyi
Repository: ambari
Updated Branches:
  refs/heads/trunk e09b5c800 - 94a4adc99


AMBARI-12355. DATANODE START failed on secure cluster.(vbrodetskyi)


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

Branch: refs/heads/trunk
Commit: 94a4adc994f9ee2f058bbb8b908d5600adb92ae9
Parents: e09b5c8
Author: Vitaly Brodetskyi vbrodets...@hortonworks.com
Authored: Thu Jul 9 17:56:12 2015 +0300
Committer: Vitaly Brodetskyi vbrodets...@hortonworks.com
Committed: Thu Jul 9 17:56:12 2015 +0300

--
 .../HDFS/2.1.0.2.0/package/scripts/utils.py |  4 +--
 .../python/stacks/2.0.6/HDFS/test_datanode.py   | 24 +++
 .../stacks/2.0.6/HDFS/test_journalnode.py   | 12 
 .../python/stacks/2.0.6/HDFS/test_namenode.py   | 32 ++--
 .../python/stacks/2.0.6/HDFS/test_nfsgateway.py | 12 
 .../python/stacks/2.0.6/HDFS/test_snamenode.py  | 12 
 .../test/python/stacks/2.0.6/HDFS/test_zkfc.py  | 20 ++--
 7 files changed, 57 insertions(+), 59 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/94a4adc9/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
index d9180d8..245c239 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
@@ -178,9 +178,7 @@ def service(action=None, name=None, user=None, options=, 
create_pid_dir=False,
 }
 hadoop_env_exports.update(custom_export)
 
-  check_process = as_user(format(
-ls {pid_file} /dev/null 21 
- ps -p `cat {pid_file}` /dev/null 21), user=params.hdfs_user)
+  check_process = as_sudo([test, -f, pid_file]) ++ 
as_sudo([pgrep, --pidfile, pid_file])
 
   # on STOP directories shouldn't be created
   # since during stop still old dirs are used (which were created during 
previous start)

http://git-wip-us.apache.org/repos/asf/ambari/blob/94a4adc9/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py
--
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py 
b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py
index b99f53a..8c2a2cc 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py
@@ -63,11 +63,11 @@ class TestDatanode(RMFTestCase):
   )
 self.assertResourceCalled('File', 
'/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid',
 action = ['delete'],
-not_if = ambari-sudo.sh su hdfs -l -s /bin/bash -c 
'[RMF_EXPORT_PLACEHOLDER]ls /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid 
/dev/null 21  ps -p `cat /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid` 
/dev/null 21',
+not_if = ambari-sudo.sh [RMF_ENV_PLACEHOLDER] -H -E test -f 
/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid  ambari-sudo.sh 
[RMF_ENV_PLACEHOLDER] -H -E pgrep --pidfile 
/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid,
 )
 self.assertResourceCalled('Execute', ambari-sudo.sh su hdfs -l -s 
/bin/bash -c '[RMF_EXPORT_PLACEHOLDER]ulimit -c unlimited ;  
/usr/lib/hadoop/sbin/hadoop-daemon.sh --config /etc/hadoop/conf start 
datanode',
 environment = {'HADOOP_LIBEXEC_DIR': '/usr/lib/hadoop/libexec'},
-not_if = ambari-sudo.sh su hdfs -l -s /bin/bash -c 
'[RMF_EXPORT_PLACEHOLDER]ls /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid 
/dev/null 21  ps -p `cat /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid` 
/dev/null 21',
+not_if = ambari-sudo.sh [RMF_ENV_PLACEHOLDER] -H -E test -f 
/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid  ambari-sudo.sh 
[RMF_ENV_PLACEHOLDER] -H -E pgrep --pidfile 
/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid,
 )
 self.assertNoMoreResources()
 
@@ -82,7 +82,7 @@ class TestDatanode(RMFTestCase):
 )
 self.assertResourceCalled('File', 
'/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid',
 action = ['delete'],
-not_if = ambari-sudo.sh su hdfs -l -s /bin/bash -c 
'[RMF_EXPORT_PLACEHOLDER]ls /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid 
/dev/null 21  ps -p `cat /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid` 
/dev/null 21',
+not_if = ambari-sudo.sh [RMF_ENV_PLACEHOLDER] -H -E test -f 
/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid  

[1/2] ambari git commit: AMBARI-12359. on non-root agent RU Falcon restart fails (aonishuk)

2015-07-09 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 5f3d2a613 - 5b3d80fbd
  refs/heads/trunk d9097096d - cd3f63c49


AMBARI-12359. on non-root agent RU Falcon restart fails (aonishuk)


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

Branch: refs/heads/trunk
Commit: cd3f63c49ee4f6fd26e34d65b201bfa435eb21cc
Parents: d909709
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Thu Jul 9 20:27:46 2015 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Thu Jul 9 20:27:46 2015 +0300

--
 .../package/scripts/falcon_server_upgrade.py| 16 ++
 .../stacks/2.1/FALCON/test_falcon_server.py | 59 
 2 files changed, 43 insertions(+), 32 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/cd3f63c4/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon_server_upgrade.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon_server_upgrade.py
 
b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon_server_upgrade.py
index 07cfbf6..6277086 100644
--- 
a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon_server_upgrade.py
+++ 
b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon_server_upgrade.py
@@ -24,6 +24,8 @@ import tempfile
 from resource_management.core.logger import Logger
 from resource_management.core.exceptions import Fail
 from resource_management.libraries.functions import tar_archive
+from resource_management.core.resources.system import Execute
+from resource_management.core.resources.system import Directory
 
 BACKUP_TEMP_DIR = falcon-upgrade-backup
 BACKUP_DATA_ARCHIVE = falcon-local-backup.tar
@@ -72,18 +74,12 @@ def pre_start_restore():
 if not os.path.isfile(archive):
   raise Fail(Unable to restore missing backup archive 
{0}.format(archive))
 
-Logger.info('Extracting {0} to {1}'.format(archive, directory))
-
-tarball = None
-try:
-  tarball = tarfile.open(archive, r)
-  tarball.extractall(directory)
-finally:
-  if tarball:
-tarball.close()
+tar_archive.untar_archive(archive, directory)
 
   # cleanup
-  shutil.rmtree(os.path.join(tempfile.gettempdir(), BACKUP_TEMP_DIR))
+  Directory(os.path.join(tempfile.gettempdir(), BACKUP_TEMP_DIR),
+action = delete,
+  )
 
 
 def _get_directory_mappings():

http://git-wip-us.apache.org/repos/asf/ambari/blob/cd3f63c4/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py 
b/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
index ba2c026..11570ed 100644
--- a/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
+++ b/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
@@ -182,14 +182,10 @@ class TestFalconServer(RMFTestCase):
   recursive = True
   )
 
-
-  @patch(shutil.rmtree, new = MagicMock())
-  @patch(tarfile.open)
   @patch(os.path.isdir)
   @patch(os.path.exists)
   @patch(os.path.isfile)
-  def test_upgrade(self, isfile_mock, exists_mock, isdir_mock,
-  tarfile_open_mock):
+  def test_upgrade(self, isfile_mock, exists_mock, isdir_mock):
 
 isdir_mock.return_value = True
 exists_mock.side_effect = [False,False,True, True]
@@ -223,6 +219,23 @@ class TestFalconServer(RMFTestCase):
 self.assertResourceCalled('Execute', ('hdp-select', 'set', 
'falcon-server', u'2.2.1.0-2135'),
 sudo = True,
 )
+self.assertResourceCalled('Execute', ('tar',
+ '-xvf',
+ '/tmp/falcon-upgrade-backup/falcon-conf-backup.tar',
+ '-C',
+ '/usr/hdp/current/falcon-server/conf/'),
+sudo = True,
+)
+self.assertResourceCalled('Execute', ('tar',
+ '-xvf',
+ '/tmp/falcon-upgrade-backup/falcon-local-backup.tar',
+ '-C',
+ u'/hadoop/falcon/'),
+sudo = True,
+)
+self.assertResourceCalled('Directory', '/tmp/falcon-upgrade-backup',
+action = ['delete'],
+)
 self.assertResourceCalled('Directory', '/var/run/falcon',
 owner = 'falcon',
 recursive = True,
@@ -357,17 +370,6 @@ class TestFalconServer(RMFTestCase):
 user = 'falcon',
 )
 self.assertNoMoreResources()
-
-# 4 calls to tarfile.open (2 directories * read + write)
-

[1/2] ambari git commit: AMBARI-12325. RU: Installation of new stack failed on SLES (dlysnichenko)

2015-07-09 Thread dmitriusan
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 fa4db6905 - 15b120fc2
  refs/heads/trunk 6eedd6247 - f3e06dc21


AMBARI-12325. RU: Installation of new stack failed on SLES (dlysnichenko)


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

Branch: refs/heads/branch-2.1
Commit: 15b120fc2602e765e2d69bc4f6c765e378bc
Parents: fa4db69
Author: Lisnichenko Dmitro dlysniche...@hortonworks.com
Authored: Thu Jul 9 21:07:51 2015 +0300
Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com
Committed: Thu Jul 9 21:07:51 2015 +0300

--
 .../core/providers/package/zypper.py|  1 +
 .../custom_actions/scripts/install_packages.py  |  8 ++
 .../custom_actions/TestInstallPackages.py   | 28 ++--
 3 files changed, 23 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/15b120fc/ambari-common/src/main/python/resource_management/core/providers/package/zypper.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/core/providers/package/zypper.py
 
b/ambari-common/src/main/python/resource_management/core/providers/package/zypper.py
index aec8f88..3ff3dfd 100644
--- 
a/ambari-common/src/main/python/resource_management/core/providers/package/zypper.py
+++ 
b/ambari-common/src/main/python/resource_management/core/providers/package/zypper.py
@@ -57,6 +57,7 @@ class ZypperProvider(PackageProvider):
   if use_repos:
 active_base_repos = get_active_base_repos()
 if 'base' in use_repos:
+  # Remove 'base' from use_repos list
   use_repos = filter(lambda x: x != 'base', use_repos)
   use_repos.extend(active_base_repos)
 use_repos_options = []

http://git-wip-us.apache.org/repos/asf/ambari/blob/15b120fc/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
--
diff --git 
a/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py 
b/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
index b1e78ac..bfcef1a 100644
--- 
a/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
+++ 
b/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
@@ -96,6 +96,14 @@ class InstallPackages(Script):
 self.current_repositories = []
 self.current_repo_files = set()
 
+# Enable base system repositories
+# We don't need that for RHEL family, because we leave all repos enabled
+# except disabled HDP* ones
+if OSCheck.is_suse_family():
+  self.current_repositories.append('base')
+elif OSCheck.is_ubuntu_family():
+  self.current_repo_files.add('base')
+
 Logger.info(Will install packages for repository version 
{0}.format(self.repository_version))
 try:
   append_to_file = False

http://git-wip-us.apache.org/repos/asf/ambari/blob/15b120fc/ambari-server/src/test/python/custom_actions/TestInstallPackages.py
--
diff --git 
a/ambari-server/src/test/python/custom_actions/TestInstallPackages.py 
b/ambari-server/src/test/python/custom_actions/TestInstallPackages.py
index a6c8a7e..e85ee39 100644
--- a/ambari-server/src/test/python/custom_actions/TestInstallPackages.py
+++ b/ambari-server/src/test/python/custom_actions/TestInstallPackages.py
@@ -156,13 +156,13 @@ class TestInstallPackages(RMFTestCase):
   mirror_list=None,
   append_to_file=True,
   )
-self.assertResourceCalled('Package', 'hadoop_2_2_0_1_885*', 
use_repos=['HDP-UTILS-2.2.0.1-885', 'HDP-2.2.0.1-885'], skip_repos=[])
-self.assertResourceCalled('Package', 'snappy', 
use_repos=['HDP-UTILS-2.2.0.1-885', 'HDP-2.2.0.1-885'], skip_repos=[])
-self.assertResourceCalled('Package', 'snappy-devel', 
use_repos=['HDP-UTILS-2.2.0.1-885', 'HDP-2.2.0.1-885'], skip_repos=[])
-self.assertResourceCalled('Package', 'lzo', 
use_repos=['HDP-UTILS-2.2.0.1-885', 'HDP-2.2.0.1-885'], skip_repos=[])
-self.assertResourceCalled('Package', 'hadooplzo_2_2_0_1_885*', 
use_repos=['HDP-UTILS-2.2.0.1-885', 'HDP-2.2.0.1-885'], skip_repos=[])
-self.assertResourceCalled('Package', 'hadoop_2_2_0_1_885*-libhdfs', 
use_repos=['HDP-UTILS-2.2.0.1-885', 'HDP-2.2.0.1-885'], skip_repos=[])
-self.assertResourceCalled('Package', 'ambari-log4j', 
use_repos=['HDP-UTILS-2.2.0.1-885', 'HDP-2.2.0.1-885'], skip_repos=[])
+self.assertResourceCalled('Package', 'hadoop_2_2_0_1_885*', 

ambari git commit: AMBARI-12243. Ambari suggesting restart required on various services after RU from HDP 2.2 to HDP 2.3

2015-07-09 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 a2afed306 - fa4db6905


AMBARI-12243. Ambari suggesting restart required on various services after RU 
from HDP 2.2 to HDP 2.3


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

Branch: refs/heads/branch-2.1
Commit: fa4db6905f8f45ce1ce3d583b8f2b68da5e88171
Parents: a2afed3
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Wed Jul 8 20:08:17 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Thu Jul 9 10:45:51 2015 -0700

--
 .../internal/UpgradeResourceProvider.java   | 63 +++-
 .../stacks/HDP/2.2/upgrades/upgrade-2.3.xml |  7 +++
 .../internal/UpgradeResourceProviderTest.java   | 13 +++-
 3 files changed, 80 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/fa4db690/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
index cd0a709..97f224a 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
@@ -28,6 +28,7 @@ import java.util.Collections;
 import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -89,6 +90,7 @@ import 
org.apache.ambari.server.state.UpgradeHelper.UpgradeGroupHolder;
 import org.apache.ambari.server.state.stack.UpgradePack;
 import org.apache.ambari.server.state.stack.upgrade.ConfigureTask;
 import org.apache.ambari.server.state.stack.upgrade.Direction;
+import org.apache.ambari.server.state.stack.upgrade.Grouping;
 import org.apache.ambari.server.state.stack.upgrade.ManualTask;
 import org.apache.ambari.server.state.stack.upgrade.ServerSideActionTask;
 import org.apache.ambari.server.state.stack.upgrade.StageWrapper;
@@ -590,7 +592,7 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
 
 // desired configs must be set before creating stages because the config 
tag
 // names are read and set on the command for filling in later
-processConfigurations(cluster, version, direction);
+processConfigurations(cluster, version, direction, pack);
 
 for (UpgradeGroupHolder group : groups) {
   UpgradeGroupEntity groupEntity = new UpgradeGroupEntity();
@@ -682,9 +684,14 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
*  the cluster
* @param version
*  the version
+   * @param direction
+   *  upgrade or downgrade
+   * @param upgradePack
+   *  upgrade pack used for upgrade or downgrade. This is needed to 
determine 
+   *  which services are effected.
* @throws AmbariException
*/
-  void processConfigurations(Cluster cluster, String version, Direction 
direction)
+  void processConfigurations(Cluster cluster, String version, Direction 
direction, UpgradePack upgradePack)
   throws AmbariException {
 RepositoryVersionEntity targetRve = 
s_repoVersionDAO.findMaxByVersion(version);
 if (null == targetRve) {
@@ -726,11 +733,63 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
   // populate a map with default configurations from the new stack
   newConfigurationsByType = 
configHelper.getDefaultProperties(targetStackId, cluster);
 
+  // We want to skip updating config-types of services that are not in the 
upgrade pack.
+  // Care should be taken as some config-types could be in services that 
are in and out
+  // of the upgrade pack. We should never ignore config-types of services 
in upgrade pack.
+  SetString skipConfigTypes = new HashSetString();
+  SetString upgradePackServices = new HashSetString();
+  SetString upgradePackConfigTypes = new HashSetString();
+  AmbariMetaInfo ambariMetaInfo = s_metaProvider.get();
+  MapString, ServiceInfo stackServicesMap = 
ambariMetaInfo.getServices(targetStack.getStackName(), 
targetStack.getStackVersion());
+  for (Grouping group : upgradePack.getGroups(direction)) {
+for (UpgradePack.OrderService service : group.services) {
+  if (service.serviceName == null || 

ambari git commit: AMBARI-12243. Ambari suggesting restart required on various services after RU from HDP 2.2 to HDP 2.3

2015-07-09 Thread srimanth
Repository: ambari
Updated Branches:
  refs/heads/trunk 757523e1f - 6eedd6247


AMBARI-12243. Ambari suggesting restart required on various services after RU 
from HDP 2.2 to HDP 2.3


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

Branch: refs/heads/trunk
Commit: 6eedd624780965de606c64f89e0add07f131fb24
Parents: 757523e
Author: Srimanth Gunturi sgunt...@hortonworks.com
Authored: Wed Jul 8 20:08:17 2015 -0700
Committer: Srimanth Gunturi sgunt...@hortonworks.com
Committed: Thu Jul 9 10:46:26 2015 -0700

--
 .../internal/UpgradeResourceProvider.java   | 63 +++-
 .../stacks/HDP/2.2/upgrades/upgrade-2.3.xml |  7 +++
 .../internal/UpgradeResourceProviderTest.java   | 13 +++-
 3 files changed, 80 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6eedd624/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
index cd0a709..97f224a 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
@@ -28,6 +28,7 @@ import java.util.Collections;
 import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -89,6 +90,7 @@ import 
org.apache.ambari.server.state.UpgradeHelper.UpgradeGroupHolder;
 import org.apache.ambari.server.state.stack.UpgradePack;
 import org.apache.ambari.server.state.stack.upgrade.ConfigureTask;
 import org.apache.ambari.server.state.stack.upgrade.Direction;
+import org.apache.ambari.server.state.stack.upgrade.Grouping;
 import org.apache.ambari.server.state.stack.upgrade.ManualTask;
 import org.apache.ambari.server.state.stack.upgrade.ServerSideActionTask;
 import org.apache.ambari.server.state.stack.upgrade.StageWrapper;
@@ -590,7 +592,7 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
 
 // desired configs must be set before creating stages because the config 
tag
 // names are read and set on the command for filling in later
-processConfigurations(cluster, version, direction);
+processConfigurations(cluster, version, direction, pack);
 
 for (UpgradeGroupHolder group : groups) {
   UpgradeGroupEntity groupEntity = new UpgradeGroupEntity();
@@ -682,9 +684,14 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
*  the cluster
* @param version
*  the version
+   * @param direction
+   *  upgrade or downgrade
+   * @param upgradePack
+   *  upgrade pack used for upgrade or downgrade. This is needed to 
determine 
+   *  which services are effected.
* @throws AmbariException
*/
-  void processConfigurations(Cluster cluster, String version, Direction 
direction)
+  void processConfigurations(Cluster cluster, String version, Direction 
direction, UpgradePack upgradePack)
   throws AmbariException {
 RepositoryVersionEntity targetRve = 
s_repoVersionDAO.findMaxByVersion(version);
 if (null == targetRve) {
@@ -726,11 +733,63 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
   // populate a map with default configurations from the new stack
   newConfigurationsByType = 
configHelper.getDefaultProperties(targetStackId, cluster);
 
+  // We want to skip updating config-types of services that are not in the 
upgrade pack.
+  // Care should be taken as some config-types could be in services that 
are in and out
+  // of the upgrade pack. We should never ignore config-types of services 
in upgrade pack.
+  SetString skipConfigTypes = new HashSetString();
+  SetString upgradePackServices = new HashSetString();
+  SetString upgradePackConfigTypes = new HashSetString();
+  AmbariMetaInfo ambariMetaInfo = s_metaProvider.get();
+  MapString, ServiceInfo stackServicesMap = 
ambariMetaInfo.getServices(targetStack.getStackName(), 
targetStack.getStackVersion());
+  for (Grouping group : upgradePack.getGroups(direction)) {
+for (UpgradePack.OrderService service : group.services) {
+  if (service.serviceName == null || 

ambari git commit: AMBARI-12167. Progress bar remains blue on deploy finish (akovalenko)

2015-07-09 Thread akovalenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 5b3d80fbd - a2afed306


AMBARI-12167. Progress bar remains blue on deploy finish (akovalenko)


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

Branch: refs/heads/branch-2.1
Commit: a2afed3065d9e16f502d1b19c4df390c1b574126
Parents: 5b3d80f
Author: Aleksandr Kovalenko akovale...@hortonworks.com
Authored: Thu Jul 9 20:38:13 2015 +0300
Committer: Aleksandr Kovalenko akovale...@hortonworks.com
Committed: Thu Jul 9 20:38:13 2015 +0300

--
 .../app/controllers/wizard/step9_controller.js  |  2 +-
 .../test/controllers/wizard/step9_test.js   | 98 +++-
 2 files changed, 74 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a2afed30/ambari-web/app/controllers/wizard/step9_controller.js
--
diff --git a/ambari-web/app/controllers/wizard/step9_controller.js 
b/ambari-web/app/controllers/wizard/step9_controller.js
index e5b6c15..1dae93b 100644
--- a/ambari-web/app/controllers/wizard/step9_controller.js
+++ b/ambari-web/app/controllers/wizard/step9_controller.js
@@ -705,7 +705,7 @@ App.WizardStep9Controller = 
Em.Controller.extend(App.ReloadPopupMixin, {
 progress = actionsPerHost ? (Math.ceil(((queuedActions * 0.09) + 
(inProgressActions * 0.35) + completedActions ) / actionsPerHost * 33)) : 33;
 break;
   case 'INSTALLED':
-progress = actionsPerHost ? (34 + Math.ceil(((queuedActions * 0.09) + 
(inProgressActions * 0.35) + completedActions ) / actionsPerHost * 66)) : 100;
+progress = actionsPerHost ? (33 + Math.floor(((queuedActions * 0.09) + 
(inProgressActions * 0.35) + completedActions ) / actionsPerHost * 67)) : 100;
 break;
   default:
 progress = 100;

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2afed30/ambari-web/test/controllers/wizard/step9_test.js
--
diff --git a/ambari-web/test/controllers/wizard/step9_test.js 
b/ambari-web/test/controllers/wizard/step9_test.js
index 71f35a6..80982cb 100644
--- a/ambari-web/test/controllers/wizard/step9_test.js
+++ b/ambari-web/test/controllers/wizard/step9_test.js
@@ -905,57 +905,105 @@ describe('App.InstallerStep9Controller', function () {
   {
 cluster: {status: 'PENDING'},
 host: Em.Object.create({progress: 0}),
-actions: [
-  {Tasks: {status: 'COMPLETED'}},
-  {Tasks: {status: 'COMPLETED'}},
-  {Tasks: {status: 'QUEUED'}},
-  {Tasks: {status: 'QUEUED'}},
-  {Tasks: {status: 'IN_PROGRESS'}}
-],
-e: {ret: 17, host: '17'},
+actions: {
+  'COMPLETED': 2,
+  'QUEUED': 2,
+  'IN_PROGRESS': 1
+},
+e: {progress: 17},
 m: 'All types of status available. cluster status PENDING'
   },
   {
 cluster: {status: 'PENDING'},
 host: Em.Object.create({progress: 0}),
-actions: [],
-e: {ret: 33, host: '33'},
+actions: {},
+e: {progress: 33},
 m: 'No tasks available. cluster status PENDING'
   },
   {
 cluster: {status: 'INSTALLED'},
 host: Em.Object.create({progress: 0}),
-actions: [],
-e: {ret: 100, host: '100'},
+actions: {},
+e: {progress: 100},
 m: 'No tasks available. cluster status INSTALLED'
   },
   {
 cluster: {status: 'INSTALLED'},
 host: Em.Object.create({progress: 0}),
-actions: [
-  {Tasks: {status: 'COMPLETED'}},
-  {Tasks: {status: 'COMPLETED'}},
-  {Tasks: {status: 'QUEUED'}},
-  {Tasks: {status: 'QUEUED'}},
-  {Tasks: {status: 'IN_PROGRESS'}}
-],
-e: {ret: 68, host: '68'},
+actions: {
+  'COMPLETED': 2,
+  'QUEUED': 2,
+  'IN_PROGRESS': 1
+},
+e: {progress: 66},
 m: 'All types of status available. cluster status INSTALLED'
   },
   {
 cluster: {status: 'FAILED'},
 host: Em.Object.create({progress: 0}),
-actions: [],
-e: {ret: 100, host: '100'},
+actions: {},
+e: {progress: 100},
 m: 'Cluster status is not PENDING or INSTALLED'
+  },
+  {
+cluster: {status: 'INSTALLED'},
+host: Em.Object.create({progress: 0}),
+actions: {
+  'COMPLETED': 150,
+  'QUEUED': 0,
+  'IN_PROGRESS': 1
+},
+e: {progress: 99},
+m: '150 tasks on host'
+  },
+  {
+cluster: {status: 

ambari git commit: AMBARI-12350. Storm manual upgrade from HDP 2.2 to HDP 2.3 leaves nimbus.seeds as a string value.(vbrodetskyi)

2015-07-09 Thread vbrodetskyi
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 49c88a723 - fa206f755


AMBARI-12350. Storm manual upgrade from HDP 2.2 to HDP 2.3 leaves nimbus.seeds 
as a string value.(vbrodetskyi)


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

Branch: refs/heads/branch-2.1
Commit: fa206f755f4bee0389ae65065c280ac5548b0a6b
Parents: 49c88a7
Author: Vitaly Brodetskyi vbrodets...@hortonworks.com
Authored: Thu Jul 9 11:43:43 2015 +0300
Committer: Vitaly Brodetskyi vbrodets...@hortonworks.com
Committed: Thu Jul 9 11:43:43 2015 +0300

--
 ambari-server/src/main/python/upgradeHelper.py  |  94 +++---
 .../catalog/UpgradeCatalog_2.1_to_2.3.json  |   5 +-
 .../catalog/UpgradeCatalog_2.2_to_2.3.json  |   5 +-
 .../src/test/python/TestUpgradeHelper.py| 124 +++
 4 files changed, 211 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/fa206f75/ambari-server/src/main/python/upgradeHelper.py
--
diff --git a/ambari-server/src/main/python/upgradeHelper.py 
b/ambari-server/src/main/python/upgradeHelper.py
index dd72bdc..b2e0fa4 100644
--- a/ambari-server/src/main/python/upgradeHelper.py
+++ b/ambari-server/src/main/python/upgradeHelper.py
@@ -79,6 +79,11 @@ Example:
   to-catalog: test,  (optional, require from-catalog. 
Target of new_property1_name)
   default: default value,(optional, if set and old property 
not exists, new one would be created with default value)
   template: yes, (optional, template parsing for 
default option)
+  coerce-to: pre-defined type, (optional, convert value from one 
type to another. Types supported:
+  yaml-array - converts string 
item1,item2 to  ['item1', 'item2']
+)
+  replace-from: something, (optional, should be present both from 
and to. Replace 'from' value to 'to')
+  replace-to: something,
   required-services: [YARN]  (optional, process entry if services 
in the list existed on the cluster
   }
  }
@@ -275,6 +280,10 @@ class CatConst(Const):
   PROPERTY_DEFAULT = default
   MERGED_COPY_TAG = merged-copy
   REQUIRED_SERVICES = required-services
+  COERCE_TO_PROPERTY_TAG = coerce-to
+  COERCE_YAML_OPTION_TAG = yaml-array
+  REPLACE_FROM_TAG = replace-from
+  REPLACE_TO_TAG = replace-to
   ITEMS_TAG = items
   TYPE_TAG = type
   TRUE_TAG = yes
@@ -385,6 +394,20 @@ class UpgradeCatalog(object):
 
 for config_item in properties:
   cfg_item = properties[config_item]
+
+  
+case when properties: {
+yarn-site: {
+.
+ }
+ }
+is set like properties: {
+   yarn-site: 
+}
+  
+  if not isinstance(cfg_item, dict):
+raise MalformedPropertyDefinitionException(The property catalog '%s' 
definition error % config_item)
+
   properties[config_item] = dict(zip(
 cfg_item.keys(),
 map(lambda x: x if isinstance(x, dict) or isinstance(x, list) else 
{CatConst.PROPERTY_VALUE_TAG: x}, cfg_item.values())
@@ -580,10 +603,9 @@ class PropertyMapping(object):
 
 
 class ServerConfigFactory(object):
-  _server_catalogs = {}
-
   def __init__(self):
 self.__observers = []
+self._server_catalogs = {}
 self._load_configs()
 
   def subscribe(self, name, config_item):
@@ -653,6 +675,28 @@ class ServerConfigFactory(object):
   )
   item[CatConst.PROPERTY_DEFAULT] = parsed_value
 
+  def _process_property_value_transformation(self, catalog, 
property_map_definition, old_value):
+
+:type catalog: UpgradeCatalog
+:type property_map_definition: dict
+:type old_value: str
+:return: str
+
+
+tmp = old_value
+
+if CatConst.REPLACE_FROM_TAG in property_map_definition and 
CatConst.REPLACE_TO_TAG in property_map_definition and\
+  property_map_definition[CatConst.REPLACE_TO_TAG] is not None and 
property_map_definition[CatConst.REPLACE_FROM_TAG] is not None:
+  tmp = tmp.replace(property_map_definition[CatConst.REPLACE_FROM_TAG], 
property_map_definition[CatConst.REPLACE_TO_TAG])
+
+if CatConst.COERCE_TO_PROPERTY_TAG in property_map_definition:
+  if property_map_definition[CatConst.COERCE_TO_PROPERTY_TAG] == 
CatConst.COERCE_YAML_OPTION_TAG:
+# for example c6401,c6402 into ['c6401','c6402']
+data = list(map(lambda x: '%s' % x.strip(), tmp.split(',')))
+tmp = [%s] % ','.join(data)
+
+return 

[1/2] ambari git commit: AMBARI-12351. SecondaryNameNode alert not working with SPNEGO enabled cluster (aonishuk)

2015-07-09 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 fa206f755 - dc223c338
  refs/heads/trunk f46ec8df8 - f8008fcb9


AMBARI-12351. SecondaryNameNode alert not working with SPNEGO enabled cluster 
(aonishuk)


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

Branch: refs/heads/trunk
Commit: f8008fcb970649aebb581ebfc3de8e36f8ff76bb
Parents: f46ec8d
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Thu Jul 9 13:42:04 2015 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Thu Jul 9 13:42:04 2015 +0300

--
 .../src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json  | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f8008fcb/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json
index f5a10f6..477fd95 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json
@@ -476,6 +476,8 @@
   uri: {
 http: {{hdfs-site/dfs.namenode.secondary.http-address}},
 https: {{hdfs-site/dfs.namenode.secondary.https-address}},
+kerberos_keytab: 
{{hdfs-site/dfs.web.authentication.kerberos.keytab}},
+kerberos_principal: 
{{hdfs-site/dfs.web.authentication.kerberos.principal}},
 https_property: {{hdfs-site/dfs.http.policy}},
 https_property_value: HTTPS_ONLY
   },



[2/2] ambari git commit: AMBARI-12351. SecondaryNameNode alert not working with SPNEGO enabled cluster (aonishuk)

2015-07-09 Thread aonishuk
AMBARI-12351. SecondaryNameNode alert not working with SPNEGO enabled cluster 
(aonishuk)


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

Branch: refs/heads/branch-2.1
Commit: dc223c33879f789993cf5c18c1f854ff4c603d00
Parents: fa206f7
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Thu Jul 9 13:42:06 2015 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Thu Jul 9 13:42:06 2015 +0300

--
 .../src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json  | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/dc223c33/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json
index f5a10f6..477fd95 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json
@@ -476,6 +476,8 @@
   uri: {
 http: {{hdfs-site/dfs.namenode.secondary.http-address}},
 https: {{hdfs-site/dfs.namenode.secondary.https-address}},
+kerberos_keytab: 
{{hdfs-site/dfs.web.authentication.kerberos.keytab}},
+kerberos_principal: 
{{hdfs-site/dfs.web.authentication.kerberos.principal}},
 https_property: {{hdfs-site/dfs.http.policy}},
 https_property_value: HTTPS_ONLY
   },



ambari git commit: AMBARI-12350. Storm manual upgrade from HDP 2.2 to HDP 2.3 leaves nimbus.seeds as a string value.(vbrodetskyi)

2015-07-09 Thread vbrodetskyi
Repository: ambari
Updated Branches:
  refs/heads/trunk 4e2ef1e0d - f46ec8df8


AMBARI-12350. Storm manual upgrade from HDP 2.2 to HDP 2.3 leaves nimbus.seeds 
as a string value.(vbrodetskyi)


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

Branch: refs/heads/trunk
Commit: f46ec8df8fec7b31bee86f545655ccf85cc56de2
Parents: 4e2ef1e
Author: Vitaly Brodetskyi vbrodets...@hortonworks.com
Authored: Thu Jul 9 11:45:18 2015 +0300
Committer: Vitaly Brodetskyi vbrodets...@hortonworks.com
Committed: Thu Jul 9 11:45:18 2015 +0300

--
 ambari-server/src/main/python/upgradeHelper.py  |  94 +++---
 .../catalog/UpgradeCatalog_2.1_to_2.3.json  |   5 +-
 .../catalog/UpgradeCatalog_2.2_to_2.3.json  |   5 +-
 .../src/test/python/TestUpgradeHelper.py| 124 +++
 4 files changed, 211 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f46ec8df/ambari-server/src/main/python/upgradeHelper.py
--
diff --git a/ambari-server/src/main/python/upgradeHelper.py 
b/ambari-server/src/main/python/upgradeHelper.py
index dd72bdc..b2e0fa4 100644
--- a/ambari-server/src/main/python/upgradeHelper.py
+++ b/ambari-server/src/main/python/upgradeHelper.py
@@ -79,6 +79,11 @@ Example:
   to-catalog: test,  (optional, require from-catalog. 
Target of new_property1_name)
   default: default value,(optional, if set and old property 
not exists, new one would be created with default value)
   template: yes, (optional, template parsing for 
default option)
+  coerce-to: pre-defined type, (optional, convert value from one 
type to another. Types supported:
+  yaml-array - converts string 
item1,item2 to  ['item1', 'item2']
+)
+  replace-from: something, (optional, should be present both from 
and to. Replace 'from' value to 'to')
+  replace-to: something,
   required-services: [YARN]  (optional, process entry if services 
in the list existed on the cluster
   }
  }
@@ -275,6 +280,10 @@ class CatConst(Const):
   PROPERTY_DEFAULT = default
   MERGED_COPY_TAG = merged-copy
   REQUIRED_SERVICES = required-services
+  COERCE_TO_PROPERTY_TAG = coerce-to
+  COERCE_YAML_OPTION_TAG = yaml-array
+  REPLACE_FROM_TAG = replace-from
+  REPLACE_TO_TAG = replace-to
   ITEMS_TAG = items
   TYPE_TAG = type
   TRUE_TAG = yes
@@ -385,6 +394,20 @@ class UpgradeCatalog(object):
 
 for config_item in properties:
   cfg_item = properties[config_item]
+
+  
+case when properties: {
+yarn-site: {
+.
+ }
+ }
+is set like properties: {
+   yarn-site: 
+}
+  
+  if not isinstance(cfg_item, dict):
+raise MalformedPropertyDefinitionException(The property catalog '%s' 
definition error % config_item)
+
   properties[config_item] = dict(zip(
 cfg_item.keys(),
 map(lambda x: x if isinstance(x, dict) or isinstance(x, list) else 
{CatConst.PROPERTY_VALUE_TAG: x}, cfg_item.values())
@@ -580,10 +603,9 @@ class PropertyMapping(object):
 
 
 class ServerConfigFactory(object):
-  _server_catalogs = {}
-
   def __init__(self):
 self.__observers = []
+self._server_catalogs = {}
 self._load_configs()
 
   def subscribe(self, name, config_item):
@@ -653,6 +675,28 @@ class ServerConfigFactory(object):
   )
   item[CatConst.PROPERTY_DEFAULT] = parsed_value
 
+  def _process_property_value_transformation(self, catalog, 
property_map_definition, old_value):
+
+:type catalog: UpgradeCatalog
+:type property_map_definition: dict
+:type old_value: str
+:return: str
+
+
+tmp = old_value
+
+if CatConst.REPLACE_FROM_TAG in property_map_definition and 
CatConst.REPLACE_TO_TAG in property_map_definition and\
+  property_map_definition[CatConst.REPLACE_TO_TAG] is not None and 
property_map_definition[CatConst.REPLACE_FROM_TAG] is not None:
+  tmp = tmp.replace(property_map_definition[CatConst.REPLACE_FROM_TAG], 
property_map_definition[CatConst.REPLACE_TO_TAG])
+
+if CatConst.COERCE_TO_PROPERTY_TAG in property_map_definition:
+  if property_map_definition[CatConst.COERCE_TO_PROPERTY_TAG] == 
CatConst.COERCE_YAML_OPTION_TAG:
+# for example c6401,c6402 into ['c6401','c6402']
+data = list(map(lambda x: '%s' % x.strip(), tmp.split(',')))
+tmp = [%s] % ','.join(data)
+
+return tmp
+
   

[2/2] ambari git commit: AMBARI-12352. Ambari dashboard reports hive metastore as green but alerts says metastore down. (aonishuk)

2015-07-09 Thread aonishuk
AMBARI-12352. Ambari dashboard reports hive metastore as green but alerts says 
metastore down.  (aonishuk)


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

Branch: refs/heads/branch-2.1
Commit: 1e6f278fd7285f97fd43289b6789932691e29164
Parents: dc223c3
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Thu Jul 9 15:41:51 2015 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Thu Jul 9 15:41:51 2015 +0300

--
 .../HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py   | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1e6f278f/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py
index f7a84f2..7f23d31 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py
@@ -160,10 +160,10 @@ def execute(configurations={}, parameters={}, 
host_name=None):
 
 cmd = format(export HIVE_CONF_DIR='{conf_dir}' ; 
  hive --hiveconf hive.metastore.uris={metastore_uri}\
- --hiveconf hive.metastore.client.connect.retry.delay=1s\
+ --hiveconf hive.metastore.client.connect.retry.delay=1\
  --hiveconf hive.metastore.failure.retries=1\
  --hiveconf hive.metastore.connect.retries=1\
- --hiveconf hive.metastore.client.socket.timeout=14s\
+ --hiveconf hive.metastore.client.socket.timeout=14\
  --hiveconf hive.execution.engine=mr -e 'show databases;')
 
 start_time = time.time()
@@ -225,10 +225,10 @@ def execute(configurations={}, parameters={}, 
host_name=None):
 
 hive_cmd = os.path.join(hive_home, bin, hive.cmd)
 cmd = format(cmd /c {hive_cmd} --hiveconf 
hive.metastore.uris={metastore_uri}\
- --hiveconf hive.metastore.client.connect.retry.delay=1s\
+ --hiveconf hive.metastore.client.connect.retry.delay=1\
  --hiveconf hive.metastore.failure.retries=1\
  --hiveconf hive.metastore.connect.retries=1\
- --hiveconf hive.metastore.client.socket.timeout=14s\
+ --hiveconf hive.metastore.client.socket.timeout=14\
  --hiveconf hive.execution.engine=mr -e 'show databases;')
 start_time = time.time()
 try:



[1/2] ambari git commit: AMBARI-12352. Ambari dashboard reports hive metastore as green but alerts says metastore down. (aonishuk)

2015-07-09 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 dc223c338 - 1e6f278fd
  refs/heads/trunk f8008fcb9 - 5330972d6


AMBARI-12352. Ambari dashboard reports hive metastore as green but alerts says 
metastore down.  (aonishuk)


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

Branch: refs/heads/trunk
Commit: 5330972d692856c93871fabeebd47abb7cb5647f
Parents: f8008fc
Author: Andrew Onishuk aonis...@hortonworks.com
Authored: Thu Jul 9 15:41:49 2015 +0300
Committer: Andrew Onishuk aonis...@hortonworks.com
Committed: Thu Jul 9 15:41:49 2015 +0300

--
 .../HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py   | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5330972d/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py
index f7a84f2..7f23d31 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py
@@ -160,10 +160,10 @@ def execute(configurations={}, parameters={}, 
host_name=None):
 
 cmd = format(export HIVE_CONF_DIR='{conf_dir}' ; 
  hive --hiveconf hive.metastore.uris={metastore_uri}\
- --hiveconf hive.metastore.client.connect.retry.delay=1s\
+ --hiveconf hive.metastore.client.connect.retry.delay=1\
  --hiveconf hive.metastore.failure.retries=1\
  --hiveconf hive.metastore.connect.retries=1\
- --hiveconf hive.metastore.client.socket.timeout=14s\
+ --hiveconf hive.metastore.client.socket.timeout=14\
  --hiveconf hive.execution.engine=mr -e 'show databases;')
 
 start_time = time.time()
@@ -225,10 +225,10 @@ def execute(configurations={}, parameters={}, 
host_name=None):
 
 hive_cmd = os.path.join(hive_home, bin, hive.cmd)
 cmd = format(cmd /c {hive_cmd} --hiveconf 
hive.metastore.uris={metastore_uri}\
- --hiveconf hive.metastore.client.connect.retry.delay=1s\
+ --hiveconf hive.metastore.client.connect.retry.delay=1\
  --hiveconf hive.metastore.failure.retries=1\
  --hiveconf hive.metastore.connect.retries=1\
- --hiveconf hive.metastore.client.socket.timeout=14s\
+ --hiveconf hive.metastore.client.socket.timeout=14\
  --hiveconf hive.execution.engine=mr -e 'show databases;')
 start_time = time.time()
 try:



ambari git commit: AMBARI-12360. Overrides in Custom Properties for non-default config groups are shown in the default config group as editable without link to non-default config groups.(xiwang)

2015-07-09 Thread xiwang
Repository: ambari
Updated Branches:
  refs/heads/trunk 3f9802f43 - ace93eadf


AMBARI-12360. Overrides in Custom Properties for non-default config groups are 
shown in the default config group as editable without link to non-default 
config groups.(xiwang)


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

Branch: refs/heads/trunk
Commit: ace93eadfe6564bdda2b6d4a4a04d5c8cebb26b2
Parents: 3f9802f
Author: Xi Wang xiw...@apache.org
Authored: Thu Jul 9 11:50:40 2015 -0700
Committer: Xi Wang xiw...@apache.org
Committed: Thu Jul 9 12:48:26 2015 -0700

--
 ambari-web/app/controllers/main/service/info/configs.js | 3 ++-
 ambari-web/app/utils/config.js  | 6 +-
 2 files changed, 7 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ace93ead/ambari-web/app/controllers/main/service/info/configs.js
--
diff --git a/ambari-web/app/controllers/main/service/info/configs.js 
b/ambari-web/app/controllers/main/service/info/configs.js
index 37f8da9..74544d2 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -465,7 +465,8 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ConfigsLoader, A
 App.config.createOverride(serviceConfig, overridePlainObject, 
configGroup);
   }
 } else {
-  allConfigs.push(App.config.createCustomGroupConfig(prop, config, 
configGroup));
+  var isEditable = self.get('canEdit')  configGroup.get('name') 
== self.get('selectedConfigGroup.name');
+  allConfigs.push(App.config.createCustomGroupConfig(prop, config, 
configGroup, isEditable));
 }
   }
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/ace93ead/ambari-web/app/utils/config.js
--
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index c520b47..7bb9670 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -1389,9 +1389,10 @@ App.config = Em.Object.create({
* @param {String} propertyName - name of the property
* @param {Object} config - config info
* @param {Em.Object} group - config group to set
+   * @param {Boolean} isEditable
* @return {Object}
**/
-  createCustomGroupConfig: function (propertyName, config, group) {
+  createCustomGroupConfig: function (propertyName, config, group, isEditable) {
 var propertyValue = config.properties[propertyName];
 var propertyObject = {
   name: propertyName,
@@ -1409,6 +1410,9 @@ App.config = Em.Object.create({
   isOverridable: false
 };
 propertyObject.category = this.identifyCategory(propertyObject).name;
+if(isEditable == false) {
+  propertyObject.isEditable = isEditable;
+}
 group.set('switchGroupTextShort', 
Em.I18n.t('services.service.config_groups.switchGroupTextShort').format(group.get('name')));
 group.set('switchGroupTextFull', 
Em.I18n.t('services.service.config_groups.switchGroupTextFull').format(group.get('name')));
 return App.ServiceConfigProperty.create(propertyObject);



ambari git commit: AMBARI-12348. Spnego principal can't be customized. (jaimin)

2015-07-09 Thread jaimin
Repository: ambari
Updated Branches:
  refs/heads/trunk f3e06dc21 - 3f9802f43


AMBARI-12348. Spnego principal can't be customized. (jaimin)


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

Branch: refs/heads/trunk
Commit: 3f9802f43552af42b5e4d0ed3f785ea5bf426afb
Parents: f3e06dc
Author: Jaimin Jetly jai...@hortonworks.com
Authored: Thu Jul 9 12:36:21 2015 -0700
Committer: Jaimin Jetly jai...@hortonworks.com
Committed: Thu Jul 9 12:36:21 2015 -0700

--
 ambari-web/app/mixins/wizard/addSecurityConfigs.js | 16 
 1 file changed, 12 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3f9802f4/ambari-web/app/mixins/wizard/addSecurityConfigs.js
--
diff --git a/ambari-web/app/mixins/wizard/addSecurityConfigs.js 
b/ambari-web/app/mixins/wizard/addSecurityConfigs.js
index c0caea4..ecc2942 100644
--- a/ambari-web/app/mixins/wizard/addSecurityConfigs.js
+++ b/ambari-web/app/mixins/wizard/addSecurityConfigs.js
@@ -285,7 +285,8 @@ App.AddSecurityConfigs = Em.Mixin.create({
   },
 
   /**
-   *
+   * This function updates stack/service/component level configurations of the 
kerberos descriptor
+   * with the values entered by the user on the rendered ui
* @param configurations
* @param config
* @return boolean
@@ -312,7 +313,8 @@ App.AddSecurityConfigs = Em.Mixin.create({
 
 
   /**
-   *
+   * This function updates stack/service/component level kerberos descriptor 
identities (principal and keytab)
+   * with the values entered by the user on the rendered ui
* @param identities
* @param config
* @return boolean
@@ -323,8 +325,14 @@ App.AddSecurityConfigs = Em.Mixin.create({
   var keys = Em.keys(identity).without('name');
   keys.forEach(function (item) {
 var prop = identity[item];
-if (prop.configuration  prop.configuration.split('/')[0] === 
config.filename 
-  prop.configuration.split('/')[1] === config.name) {
+
+// compare ui rendered config against identity with `configuration 
attribute` (Most of the identities have `configuration attribute`)
+var isIdentityWithConfig =  (prop.configuration  
prop.configuration.split('/')[0] === config.filename  
prop.configuration.split('/')[1] === config.name);
+
+// compare ui rendered config against identity without `configuration 
attribute` (For example spnego principal and keytab)
+var isIdentityWithoutConfig = (!prop.configuration  identity.name 
=== config.name.split('_')[0]  item === config.name.split('_')[1]);
+
+if (isIdentityWithConfig || isIdentityWithoutConfig) {
   prop[{keytab: 'file', principal: 'value'}[item]] = config.value;
   isConfigUpdated = true;
 }



ambari git commit: AMBARI-12363. Update upgrade version to 2.0.2 for the 2.0-maint branch. (swagle)

2015-07-09 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.maint 716ac9858 - 8b32db8dc


AMBARI-12363. Update upgrade version to 2.0.2 for the 2.0-maint branch. (swagle)


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

Branch: refs/heads/branch-2.0.maint
Commit: 8b32db8dcb4b4127bd4fe1dda611c10caf174b4c
Parents: 716ac98
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Thu Jul 9 13:40:54 2015 -0700
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Thu Jul 9 13:40:54 2015 -0700

--
 .../java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java   | 2 +-
 .../org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8b32db8d/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java
index ffd4bba..f322633 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java
@@ -93,7 +93,7 @@ public class UpgradeCatalog200 extends AbstractUpgradeCatalog 
{
*/
   @Override
   public String getTargetVersion() {
-return 2.0.1;
+return 2.0.2;
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/8b32db8d/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java
index beb9516..2d48256 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java
@@ -728,7 +728,7 @@ public class UpgradeCatalog200Test {
 final DBAccessor dbAccessor = createNiceMock(DBAccessor.class);
 UpgradeCatalog upgradeCatalog = getUpgradeCatalog(dbAccessor);
 
-Assert.assertEquals(2.0.1, upgradeCatalog.getTargetVersion());
+Assert.assertEquals(2.0.2, upgradeCatalog.getTargetVersion());
   }
 
   private void setViewInstancePropertyExpectations(DBAccessor dbAccessor,



ambari git commit: AMBARI-12362. Manual upgrade fails - YARN RM restart failed due to yarn node labels error.

2015-07-09 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 6f6ffd051 - d25236824


AMBARI-12362. Manual upgrade fails - YARN RM restart failed due to yarn node 
labels error.


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

Branch: refs/heads/branch-2.1
Commit: d25236824497fa7668e5083de0c7a81d12967cc3
Parents: 6f6ffd0
Author: Siddharth Wagle swa...@hortonworks.com
Authored: Thu Jul 9 13:23:28 2015 -0700
Committer: Siddharth Wagle swa...@hortonworks.com
Committed: Thu Jul 9 13:25:17 2015 -0700

--
 ambari-server/src/main/python/upgradeHelper.py  | 15 -
 .../catalog/UpgradeCatalog_2.1_to_2.3.json  | 17 -
 .../catalog/UpgradeCatalog_2.2_to_2.3.json  | 17 -
 .../src/test/python/TestUpgradeHelper.py| 65 +++-
 4 files changed, 108 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d2523682/ambari-server/src/main/python/upgradeHelper.py
--
diff --git a/ambari-server/src/main/python/upgradeHelper.py 
b/ambari-server/src/main/python/upgradeHelper.py
index b2e0fa4..b5f123e 100644
--- a/ambari-server/src/main/python/upgradeHelper.py
+++ b/ambari-server/src/main/python/upgradeHelper.py
@@ -66,6 +66,10 @@ Example:
value: {TEMPLATE_TAG},
template: yes,
required-services: [HDFS, YARN]
+  },
+  test_property: {
+   value: new value,
+   value-required: old value  (optional, property would be set if 
the required value is present)
   }
 }
   },
@@ -287,6 +291,7 @@ class CatConst(Const):
   ITEMS_TAG = items
   TYPE_TAG = type
   TRUE_TAG = yes
+  VALUE_REQUIRED_TAG = value-required
   STACK_PROPERTIES_MAPPING_LIST_TAG = property-mapping
   VALUE_TEMPLATE_TAG = template
   SEARCH_PATTERN = (\{[^\{\}]+\})  # {X}
@@ -520,10 +525,12 @@ class UpgradeCatalog(object):
   properties[catalog_item_name] = 
catalog_property_item[CatConst.PROPERTY_VALUE_TAG]
 return properties
 
-  def __can_handler_execute(self, catalog_options, property_item):
+  def __can_handler_execute(self, catalog_options, catalog_property_item, 
property_item, properties):
 
 :type catalog_options dict
+:type catalog_property_item str
 :type property_item dict
+:type properties dict
 
 can_process = True
 
@@ -541,6 +548,10 @@ class UpgradeCatalog(object):
 if required_list is not None:
   can_process = can_process and is_services_exists(required_list)
 
+if CatConst.VALUE_REQUIRED_TAG in property_item and 
property_item[CatConst.VALUE_REQUIRED_TAG] is not None and\
+  CatConst.PROPERTY_VALUE_TAG in property_item and catalog_property_item 
in properties:
+  can_process = properties[catalog_property_item] == 
property_item[CatConst.VALUE_REQUIRED_TAG]
+
 return can_process
 
   def process_simple_transformations(self, name, properties):
@@ -560,7 +571,7 @@ class UpgradeCatalog(object):
 catalog_item = self._properties_catalog[name]
 for catalog_property_item in catalog_item.keys():
   catalog_options = self.options[name] if name in self.options else {}
-  if self.__can_handler_execute(catalog_options, 
catalog_item[catalog_property_item]):
+  if self.__can_handler_execute(catalog_options, catalog_property_item, 
catalog_item[catalog_property_item], properties):
 for handler in tag_handlers:
   handler(catalog_property_item, catalog_item[catalog_property_item], 
properties)
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/d2523682/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.1_to_2.3.json
--
diff --git 
a/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.1_to_2.3.json
 
b/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.1_to_2.3.json
index c1c7970..1304c5a 100644
--- 
a/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.1_to_2.3.json
+++ 
b/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.1_to_2.3.json
@@ -16,6 +16,10 @@
   yarn-site: {
 merged-copy: yes
   },
+  capacity-scheduler: {
+merged-copy: yes,
+required-services: [YARN]
+  },
   mapred-site: {
 merged-copy: yes
   },
@@ -328,6 +332,17 @@
   yarn.timeline-service.recovery.enabled: true,
   yarn.timeline-service.state-store-class: 
org.apache.hadoop.yarn.server.timeline.recovery.LeveldbTimelineStateStore,
   

ambari git commit: AMBARI-12361 - RU: Secure Upgrade Fails On Restarting NameNode Because kinit Is Not Called Before HDFS Command (jonathanhurley)

2015-07-09 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 d25236824 - 48ab4ad2e


AMBARI-12361 - RU: Secure Upgrade Fails On Restarting NameNode Because kinit Is 
Not Called Before HDFS Command (jonathanhurley)


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

Branch: refs/heads/branch-2.1
Commit: 48ab4ad2e74abfebd001affc57b168b73b5b329c
Parents: d252368
Author: Jonathan Hurley jhur...@hortonworks.com
Authored: Thu Jul 9 16:01:51 2015 -0400
Committer: Jonathan Hurley jhur...@hortonworks.com
Committed: Thu Jul 9 16:37:18 2015 -0400

--
 .../HDFS/2.1.0.2.0/package/scripts/utils.py  | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/48ab4ad2/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
index 245c239..71cdec7 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
@@ -63,10 +63,17 @@ def safe_zkfc_op(action, env):
 
 def stop_zkfc_during_ru():
   
-  Restart ZKFC on either the standby or active Namenode. If done on the 
currently active namenode, wait for it to
-  become the standby.
+  Restart ZKFC on either the standby or active Namenode. If done on the 
currently active namenode,
+  wait for it to become the standby.
+  This will run a kinit before executing the 'hdfs haadmin' command.
   
   import params
+
+  # must kinit before running the HDFS command
+  if params.security_enabled:
+  Execute(format({kinit_path_local} -kt {hdfs_user_keytab} 
{hdfs_principal_name}),
+user = params.hdfs_user)
+
   check_service_cmd = format(hdfs haadmin -getServiceState {namenode_id})
   code, out = shell.call(check_service_cmd, logoutput=True, 
user=params.hdfs_user)
 



ambari git commit: AMBARI-12360. Overrides in Custom Properties for non-default config groups are shown in the default config group as editable without link to non-default config groups.(xiwang)

2015-07-09 Thread xiwang
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 15b120fc2 - 6f6ffd051


AMBARI-12360. Overrides in Custom Properties for non-default config groups are 
shown in the default config group as editable without link to non-default 
config groups.(xiwang)


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

Branch: refs/heads/branch-2.1
Commit: 6f6ffd051f52398b18a25c2e90d2390f83c1dfdd
Parents: 15b120f
Author: Xi Wang xiw...@apache.org
Authored: Thu Jul 9 11:50:40 2015 -0700
Committer: Xi Wang xiw...@apache.org
Committed: Thu Jul 9 12:52:32 2015 -0700

--
 ambari-web/app/controllers/main/service/info/configs.js | 3 ++-
 ambari-web/app/utils/config.js  | 6 +-
 2 files changed, 7 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6f6ffd05/ambari-web/app/controllers/main/service/info/configs.js
--
diff --git a/ambari-web/app/controllers/main/service/info/configs.js 
b/ambari-web/app/controllers/main/service/info/configs.js
index dc3c9bd..f219f04 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -466,7 +466,8 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ConfigsLoader, A
 serviceConfig.set('overrideIsFinalValues', 
serviceConfig.get('overrides').mapProperty('isFinal'));
   }
 } else {
-  allConfigs.push(App.config.createCustomGroupConfig(prop, config, 
configGroup));
+  var isEditable = self.get('canEdit')  configGroup.get('name') 
== self.get('selectedConfigGroup.name');
+  allConfigs.push(App.config.createCustomGroupConfig(prop, config, 
configGroup, isEditable));
 }
   }
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/6f6ffd05/ambari-web/app/utils/config.js
--
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index 5efcbd0..7800dd0 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -1278,9 +1278,10 @@ App.config = Em.Object.create({
* @param {String} propertyName - name of the property
* @param {Object} config - config info
* @param {Em.Object} group - config group to set
+   * @param {Boolean} isEditable
* @return {Object}
**/
-  createCustomGroupConfig: function (propertyName, config, group) {
+  createCustomGroupConfig: function (propertyName, config, group, isEditable) {
 var propertyValue = config.properties[propertyName];
 var propertyObject = {
   name: propertyName,
@@ -1298,6 +1299,9 @@ App.config = Em.Object.create({
   isOverridable: false
 };
 propertyObject.category = this.identifyCategory(propertyObject).name;
+if(isEditable == false) {
+  propertyObject.isEditable = isEditable;
+}
 group.set('switchGroupTextShort', 
Em.I18n.t('services.service.config_groups.switchGroupTextShort').format(group.get('name')));
 group.set('switchGroupTextFull', 
Em.I18n.t('services.service.config_groups.switchGroupTextFull').format(group.get('name')));
 return App.ServiceConfigProperty.create(propertyObject);



ambari git commit: AMBARI-12366. Fix issue where the BP configuration is modified on a getter invocation due to an incomplete deep copy

2015-07-09 Thread jspeidel
Repository: ambari
Updated Branches:
  refs/heads/trunk 630299fb3 - ba21f8988


AMBARI-12366.  Fix issue where the BP configuration is modified on a getter 
invocation
   due to an incomplete deep copy


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

Branch: refs/heads/trunk
Commit: ba21f89881d80de8be1256336fa6f655db02fd54
Parents: 630299f
Author: John Speidel jspei...@hortonworks.com
Authored: Thu Jul 9 17:45:13 2015 -0400
Committer: John Speidel jspei...@hortonworks.com
Committed: Thu Jul 9 19:06:45 2015 -0400

--
 .../ambari/server/topology/Configuration.java   | 12 +--
 .../server/topology/ConfigurationTest.java  | 37 +++-
 2 files changed, 21 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ba21f898/ambari-server/src/main/java/org/apache/ambari/server/topology/Configuration.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/topology/Configuration.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/topology/Configuration.java
index 91b7736..108ff74 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/topology/Configuration.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/topology/Configuration.java
@@ -115,7 +115,11 @@ public class Configuration {
*/
   public MapString, MapString, String getFullProperties(int depthLimit) {
 if (depthLimit == 0) {
-  return new HashMapString, MapString, String(properties);
+  HashMapString, MapString, String propertiesCopy = new 
HashMapString, MapString, String();
+  for (Map.EntryString, MapString, String typeProperties : 
properties.entrySet()) {
+propertiesCopy.put(typeProperties.getKey(), new HashMapString, 
String(typeProperties.getValue()));
+  }
+  return propertiesCopy;
 }
 
 MapString, MapString, String mergedProperties = parentConfiguration == 
null ?
@@ -159,8 +163,10 @@ public class Configuration {
 
 for (Map.EntryString, MapString, MapString, String typeEntry : 
attributes.entrySet()) {
   String type = typeEntry.getKey();
-  MapString, MapString, String typeAttributes =
-  new HashMapString, MapString, String(typeEntry.getValue());
+  MapString, MapString, String typeAttributes = new HashMapString, 
MapString, String();
+  for (Map.EntryString, MapString, String attributeEntry : 
typeEntry.getValue().entrySet()) {
+typeAttributes.put(attributeEntry.getKey(), new HashMapString, 
String(attributeEntry.getValue()));
+  }
 
   if (! mergedAttributeMap.containsKey(type)) {
 mergedAttributeMap.put(type, typeAttributes);

http://git-wip-us.apache.org/repos/asf/ambari/blob/ba21f898/ambari-server/src/test/java/org/apache/ambari/server/topology/ConfigurationTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/topology/ConfigurationTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/topology/ConfigurationTest.java
index 9bab88f..e971e03 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/topology/ConfigurationTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/topology/ConfigurationTest.java
@@ -106,12 +106,6 @@ public class ConfigurationTest {
   @Test
   public void testGetFullProperties_withParent() {
 Configuration configuration = createConfigurationWithParents_PropsOnly();
-// get prop maps prior to calling getFullProperties
-MapString, MapString, String leafProperties = 
configuration.getProperties();
-MapString, MapString, String parentProperties = 
configuration.getParentConfiguration().getProperties();
-MapString, MapString, String parentParentProperties = 
configuration.getParentConfiguration().getParentConfiguration().getProperties();
-
-// test
 // all parents should be reflected in getFullProperties() result
 MapString, MapString, String fullProperties = 
configuration.getFullProperties();
 
@@ -145,9 +139,10 @@ public class ConfigurationTest {
 assertEquals(val11.3, type4Props.get(prop11));
 
 // ensure that underlying property map is not modified in getFullProperties
-assertEquals(leafProperties, configuration.getProperties());
-assertEquals(parentProperties, 
configuration.getParentConfiguration().getProperties());
-assertEquals(parentParentProperties, 
configuration.getParentConfiguration().getParentConfiguration().getProperties());
+Configuration expectedConfiguration = 

ambari git commit: AMBARI-12366. Fix issue where the BP configuration is modified on a getter invocation due to an incomplete deep copy

2015-07-09 Thread jspeidel
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 a27ad20b1 - 719d16cd5


AMBARI-12366.  Fix issue where the BP configuration is modified on a getter 
invocation
   due to an incomplete deep copy


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

Branch: refs/heads/branch-2.1
Commit: 719d16cd5d3db25c22d86389e73a82958a5a
Parents: a27ad20
Author: John Speidel jspei...@hortonworks.com
Authored: Thu Jul 9 17:45:13 2015 -0400
Committer: John Speidel jspei...@hortonworks.com
Committed: Thu Jul 9 19:11:36 2015 -0400

--
 .../ambari/server/topology/Configuration.java   | 12 +--
 .../server/topology/ConfigurationTest.java  | 37 +++-
 2 files changed, 21 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/719d16cd/ambari-server/src/main/java/org/apache/ambari/server/topology/Configuration.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/topology/Configuration.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/topology/Configuration.java
index 91b7736..108ff74 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/topology/Configuration.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/topology/Configuration.java
@@ -115,7 +115,11 @@ public class Configuration {
*/
   public MapString, MapString, String getFullProperties(int depthLimit) {
 if (depthLimit == 0) {
-  return new HashMapString, MapString, String(properties);
+  HashMapString, MapString, String propertiesCopy = new 
HashMapString, MapString, String();
+  for (Map.EntryString, MapString, String typeProperties : 
properties.entrySet()) {
+propertiesCopy.put(typeProperties.getKey(), new HashMapString, 
String(typeProperties.getValue()));
+  }
+  return propertiesCopy;
 }
 
 MapString, MapString, String mergedProperties = parentConfiguration == 
null ?
@@ -159,8 +163,10 @@ public class Configuration {
 
 for (Map.EntryString, MapString, MapString, String typeEntry : 
attributes.entrySet()) {
   String type = typeEntry.getKey();
-  MapString, MapString, String typeAttributes =
-  new HashMapString, MapString, String(typeEntry.getValue());
+  MapString, MapString, String typeAttributes = new HashMapString, 
MapString, String();
+  for (Map.EntryString, MapString, String attributeEntry : 
typeEntry.getValue().entrySet()) {
+typeAttributes.put(attributeEntry.getKey(), new HashMapString, 
String(attributeEntry.getValue()));
+  }
 
   if (! mergedAttributeMap.containsKey(type)) {
 mergedAttributeMap.put(type, typeAttributes);

http://git-wip-us.apache.org/repos/asf/ambari/blob/719d16cd/ambari-server/src/test/java/org/apache/ambari/server/topology/ConfigurationTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/topology/ConfigurationTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/topology/ConfigurationTest.java
index 9bab88f..e971e03 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/topology/ConfigurationTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/topology/ConfigurationTest.java
@@ -106,12 +106,6 @@ public class ConfigurationTest {
   @Test
   public void testGetFullProperties_withParent() {
 Configuration configuration = createConfigurationWithParents_PropsOnly();
-// get prop maps prior to calling getFullProperties
-MapString, MapString, String leafProperties = 
configuration.getProperties();
-MapString, MapString, String parentProperties = 
configuration.getParentConfiguration().getProperties();
-MapString, MapString, String parentParentProperties = 
configuration.getParentConfiguration().getParentConfiguration().getProperties();
-
-// test
 // all parents should be reflected in getFullProperties() result
 MapString, MapString, String fullProperties = 
configuration.getFullProperties();
 
@@ -145,9 +139,10 @@ public class ConfigurationTest {
 assertEquals(val11.3, type4Props.get(prop11));
 
 // ensure that underlying property map is not modified in getFullProperties
-assertEquals(leafProperties, configuration.getProperties());
-assertEquals(parentProperties, 
configuration.getParentConfiguration().getProperties());
-assertEquals(parentParentProperties, 
configuration.getParentConfiguration().getParentConfiguration().getProperties());
+Configuration expectedConfiguration = 

ambari git commit: AMBARI-12343. Ambari storm deployment fails in secure mode due to storm principal name (rlevas)

2015-07-09 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/trunk 94a4adc99 - e9d79


AMBARI-12343. Ambari storm deployment fails in secure mode due to storm 
principal name (rlevas)


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

Branch: refs/heads/trunk
Commit: e9d79758dd01cff3fbca693f3db2405cd5e6
Parents: 94a4adc
Author: Robert Levas rle...@hortonworks.com
Authored: Thu Jul 9 11:00:41 2015 -0400
Committer: Robert Levas rle...@hortonworks.com
Committed: Thu Jul 9 11:00:52 2015 -0400

--
 .../main/resources/common-services/STORM/0.9.1.2.1/kerberos.json   | 2 +-
 ambari-web/app/assets/data/stacks/HDP-2.1/service_components.json  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e9d7/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/kerberos.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/kerberos.json
 
b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/kerberos.json
index 0f38600..c96d7e7 100644
--- 
a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/kerberos.json
+++ 
b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/kerberos.json
@@ -12,7 +12,7 @@
 {
   name: storm_components,
   principal: {
-value: storm-${cluster_name}@${realm},
+value: ${storm-env/storm_user}@${realm},
 type: user,
 configuration: storm-env/storm_principal_name
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/e9d7/ambari-web/app/assets/data/stacks/HDP-2.1/service_components.json
--
diff --git a/ambari-web/app/assets/data/stacks/HDP-2.1/service_components.json 
b/ambari-web/app/assets/data/stacks/HDP-2.1/service_components.json
index ed8d624..ca9ac3c 100644
--- a/ambari-web/app/assets/data/stacks/HDP-2.1/service_components.json
+++ b/ambari-web/app/assets/data/stacks/HDP-2.1/service_components.json
@@ -2492,7 +2492,7 @@
 configuration : storm-env/storm_principal_name,
 type : user,
 local_username : null,
-value : storm-${cluster_name}@${realm}
+value : ${storm-env/storm_user}@${realm}
   },
   name : storm_components,
   keytab : {



ambari git commit: AMBARI-12364. WebHCat fails to start during upgrade from HDP-2.2 to HDP-2.3 (ncole)

2015-07-09 Thread ncole
Repository: ambari
Updated Branches:
  refs/heads/trunk ad3289480 - 630299fb3


AMBARI-12364. WebHCat fails to start during upgrade from HDP-2.2 to HDP-2.3 
(ncole)


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

Branch: refs/heads/trunk
Commit: 630299fb3c03a41daea6237e9ed679216e6b00a8
Parents: ad32894
Author: Nate Cole nc...@hortonworks.com
Authored: Thu Jul 9 16:58:40 2015 -0400
Committer: Nate Cole nc...@hortonworks.com
Committed: Thu Jul 9 17:07:00 2015 -0400

--
 .../0.12.0.2.0/package/scripts/params_linux.py  |  5 +
 .../0.12.0.2.0/package/scripts/status_params.py |  4 
 .../package/scripts/webhcat_server.py   |  1 +
 .../stacks/2.0.6/HIVE/test_webhcat_server.py| 22 +++-
 4 files changed, 27 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/630299fb/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
index 3f6532c..8b93cd5 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
@@ -108,6 +108,11 @@ purge_tables = false
 if Script.is_hdp_stack_greater_or_equal(2.3):
   purge_tables = 'true'
 
+  # this is NOT a typo.  HDP-2.3 configs for hcatalog/webhcat point to a
+  # specific directory which is NOT called 'conf'
+  hcat_conf_dir = '/usr/hdp/current/hive-webhcat/etc/hcatalog'
+  config_dir = '/usr/hdp/current/hive-webhcat/etc/webhcat'
+
 if Script.is_hdp_stack_greater_or_equal(2.2):
   hive_specific_configs_supported = True
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/630299fb/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/status_params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/status_params.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/status_params.py
index 99e029d..a9b6628 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/status_params.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/status_params.py
@@ -92,6 +92,10 @@ else:
 # ranger is only compatible with this location on HDP 2.3+, not HDP 2.2
 hive_server_conf_dir = 
format(/usr/hdp/current/{component_directory}/conf/conf.server)
 
+# this is NOT a typo.  HDP-2.3 configs for hcatalog/webhcat point to a
+# specific directory which is NOT called 'conf'
+webhcat_conf_dir = '/usr/hdp/current/hive-webhcat/etc/webhcat'
+
   hive_config_dir = hive_client_conf_dir
   if 'role' in config and config['role'] in [HIVE_SERVER, HIVE_METASTORE]:
 hive_config_dir = hive_server_conf_dir

http://git-wip-us.apache.org/repos/asf/ambari/blob/630299fb/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py
index 012d1e2..412edc7 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py
@@ -77,6 +77,7 @@ class WebHCatServerDefault(WebHCatServer):
 
 if params.version and 
compare_versions(format_hdp_stack_version(params.version), '2.2.0.0') = 0:
   # webhcat has no conf, but uses hadoop home, so verify that regular 
hadoop conf is set
+  conf_select.select(params.stack_name, hive-hcatalog, params.version)
   conf_select.select(params.stack_name, hadoop, params.version)
   hdp_select.select(hive-webhcat, params.version)
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/630299fb/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py 

ambari git commit: AMBARI-12367. Automate creating multiple ambari-agents using Docker on GCE (Pengcheng Xu via alejandro)

2015-07-09 Thread alejandro
Repository: ambari
Updated Branches:
  refs/heads/trunk ba21f8988 - 6eb0e6b16


AMBARI-12367. Automate creating multiple ambari-agents using Docker on GCE 
(Pengcheng Xu via alejandro)


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

Branch: refs/heads/trunk
Commit: 6eb0e6b16632b4ddf7f5397e4adce00852306c4b
Parents: ba21f89
Author: Alejandro Fernandez afernan...@hortonworks.com
Authored: Thu Jul 9 16:29:45 2015 -0700
Committer: Alejandro Fernandez afernan...@hortonworks.com
Committed: Thu Jul 9 16:30:09 2015 -0700

--
 contrib/agent-simulator/Docker/Dockerfile   |  39 +
 contrib/agent-simulator/Docker/__init__.py  |  17 ++
 .../Docker/ambari_agent_start.sh|  18 ++
 .../agent-simulator/Docker/launcher_agent.py|  70 
 .../Linux/CentOS7/docker_install.sh |  20 +++
 .../Linux/CentOS7/weave_install.sh  |  18 ++
 .../Linux/Ubuntu12/docker_install.sh|  17 ++
 .../Linux/Ubuntu12/weave_install.sh |  19 ++
 contrib/agent-simulator/cluster.py  | 175 +++
 contrib/agent-simulator/config.py   |  36 
 contrib/agent-simulator/config/config.ini   |  49 ++
 contrib/agent-simulator/docker.py   |  27 +++
 contrib/agent-simulator/launcher_cluster.py | 136 ++
 contrib/agent-simulator/launcher_docker.py  |  41 +
 contrib/agent-simulator/server_setup.sh |  42 +
 contrib/agent-simulator/tips.txt|  18 ++
 contrib/agent-simulator/vm.py   |  81 +
 17 files changed, 823 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6eb0e6b1/contrib/agent-simulator/Docker/Dockerfile
--
diff --git a/contrib/agent-simulator/Docker/Dockerfile 
b/contrib/agent-simulator/Docker/Dockerfile
new file mode 100644
index 000..d22435a
--- /dev/null
+++ b/contrib/agent-simulator/Docker/Dockerfile
@@ -0,0 +1,39 @@
+# 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 rega4rding 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.
+
+
+# Set the bas image to CentOS 6.x
+FROM centos:7
+
+# Author
+MAINTAINER Pengcheng_Xu
+
+# Copy the files into Docker: Agent package file
+ADD agent.rpm /agent.rpm
+# Copy the files into Docker: launcher_agent.py
+ADD launcher_agent.py /launcher_agent.py
+# Copy the files into Docker: ambari_agent_start.sh
+ADD ambari_agent_start.sh /ambari_agent_start.sh
+# Copy hostname file into Docker: hosts
+ADD hosts /hosts
+
+RUN chmod 755 /ambari_agent_start.sh
+
+# Install ambari-agent
+# RUN yum install -y /agent.rpm
+RUN yum install -y wget
+RUN wget -O /etc/yum.repos.d/ambari.repo 
http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos7/2.x/latest/2.1.0/ambaribn.repo
+RUN yum install -y epel-release
+RUN yum install -y ambari-agent
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/6eb0e6b1/contrib/agent-simulator/Docker/__init__.py
--
diff --git a/contrib/agent-simulator/Docker/__init__.py 
b/contrib/agent-simulator/Docker/__init__.py
new file mode 100644
index 000..62aeca1
--- /dev/null
+++ b/contrib/agent-simulator/Docker/__init__.py
@@ -0,0 +1,17 @@
+'''
+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.

ambari git commit: Revert AMBARI-12355. DATANODE START failed on secure cluster.(vbrodetskyi)

2015-07-09 Thread yusaku
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 719d16cd5 - b10ace406


Revert AMBARI-12355. DATANODE START failed on secure cluster.(vbrodetskyi)

This reverts commit ca12ce6f5a13e7732fbfc09349be160a0e76236b.


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

Branch: refs/heads/branch-2.1
Commit: b10ace406b9ad304c03556a10d93e23abd60e69c
Parents: 719d16c
Author: Yusaku Sako yus...@hortonworks.com
Authored: Thu Jul 9 17:23:27 2015 -0700
Committer: Yusaku Sako yus...@hortonworks.com
Committed: Thu Jul 9 17:23:27 2015 -0700

--
 .../HDFS/2.1.0.2.0/package/scripts/utils.py |  4 ++-
 .../python/stacks/2.0.6/HDFS/test_datanode.py   | 24 +++
 .../stacks/2.0.6/HDFS/test_journalnode.py   | 12 
 .../python/stacks/2.0.6/HDFS/test_namenode.py   | 32 ++--
 .../python/stacks/2.0.6/HDFS/test_nfsgateway.py | 12 
 .../python/stacks/2.0.6/HDFS/test_snamenode.py  | 12 
 .../test/python/stacks/2.0.6/HDFS/test_zkfc.py  | 20 ++--
 7 files changed, 59 insertions(+), 57 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b10ace40/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
index 71cdec7..745a8d4 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
@@ -185,7 +185,9 @@ def service(action=None, name=None, user=None, options=, 
create_pid_dir=False,
 }
 hadoop_env_exports.update(custom_export)
 
-  check_process = as_sudo([test, -f, pid_file]) ++ 
as_sudo([pgrep, --pidfile, pid_file])
+  check_process = as_user(format(
+ls {pid_file} /dev/null 21 
+ ps -p `cat {pid_file}` /dev/null 21), user=params.hdfs_user)
 
   # on STOP directories shouldn't be created
   # since during stop still old dirs are used (which were created during 
previous start)

http://git-wip-us.apache.org/repos/asf/ambari/blob/b10ace40/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py
--
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py 
b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py
index 8c2a2cc..b99f53a 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py
@@ -63,11 +63,11 @@ class TestDatanode(RMFTestCase):
   )
 self.assertResourceCalled('File', 
'/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid',
 action = ['delete'],
-not_if = ambari-sudo.sh [RMF_ENV_PLACEHOLDER] -H -E test -f 
/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid  ambari-sudo.sh 
[RMF_ENV_PLACEHOLDER] -H -E pgrep --pidfile 
/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid,
+not_if = ambari-sudo.sh su hdfs -l -s /bin/bash -c 
'[RMF_EXPORT_PLACEHOLDER]ls /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid 
/dev/null 21  ps -p `cat /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid` 
/dev/null 21',
 )
 self.assertResourceCalled('Execute', ambari-sudo.sh su hdfs -l -s 
/bin/bash -c '[RMF_EXPORT_PLACEHOLDER]ulimit -c unlimited ;  
/usr/lib/hadoop/sbin/hadoop-daemon.sh --config /etc/hadoop/conf start 
datanode',
 environment = {'HADOOP_LIBEXEC_DIR': '/usr/lib/hadoop/libexec'},
-not_if = ambari-sudo.sh [RMF_ENV_PLACEHOLDER] -H -E test -f 
/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid  ambari-sudo.sh 
[RMF_ENV_PLACEHOLDER] -H -E pgrep --pidfile 
/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid,
+not_if = ambari-sudo.sh su hdfs -l -s /bin/bash -c 
'[RMF_EXPORT_PLACEHOLDER]ls /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid 
/dev/null 21  ps -p `cat /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid` 
/dev/null 21',
 )
 self.assertNoMoreResources()
 
@@ -82,7 +82,7 @@ class TestDatanode(RMFTestCase):
 )
 self.assertResourceCalled('File', 
'/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid',
 action = ['delete'],
-not_if = ambari-sudo.sh [RMF_ENV_PLACEHOLDER] -H -E test -f 
/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid  ambari-sudo.sh 
[RMF_ENV_PLACEHOLDER] -H -E pgrep --pidfile 
/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid,
+not_if = ambari-sudo.sh su hdfs -l -s /bin/bash -c 

ambari git commit: Revert AMBARI-12355. DATANODE START failed on secure cluster.(vbrodetskyi)

2015-07-09 Thread yusaku
Repository: ambari
Updated Branches:
  refs/heads/trunk 6eb0e6b16 - 23c1e9324


Revert AMBARI-12355. DATANODE START failed on secure cluster.(vbrodetskyi)

This reverts commit 94a4adc994f9ee2f058bbb8b908d5600adb92ae9.


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

Branch: refs/heads/trunk
Commit: 23c1e93247fe91f098c13a999cc807ec74e470df
Parents: 6eb0e6b
Author: Yusaku Sako yus...@hortonworks.com
Authored: Thu Jul 9 17:22:56 2015 -0700
Committer: Yusaku Sako yus...@hortonworks.com
Committed: Thu Jul 9 17:22:56 2015 -0700

--
 .../HDFS/2.1.0.2.0/package/scripts/utils.py |  4 ++-
 .../python/stacks/2.0.6/HDFS/test_datanode.py   | 24 +++
 .../stacks/2.0.6/HDFS/test_journalnode.py   | 12 
 .../python/stacks/2.0.6/HDFS/test_namenode.py   | 32 ++--
 .../python/stacks/2.0.6/HDFS/test_nfsgateway.py | 12 
 .../python/stacks/2.0.6/HDFS/test_snamenode.py  | 12 
 .../test/python/stacks/2.0.6/HDFS/test_zkfc.py  | 20 ++--
 7 files changed, 59 insertions(+), 57 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/23c1e932/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
index 71cdec7..745a8d4 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
@@ -185,7 +185,9 @@ def service(action=None, name=None, user=None, options=, 
create_pid_dir=False,
 }
 hadoop_env_exports.update(custom_export)
 
-  check_process = as_sudo([test, -f, pid_file]) ++ 
as_sudo([pgrep, --pidfile, pid_file])
+  check_process = as_user(format(
+ls {pid_file} /dev/null 21 
+ ps -p `cat {pid_file}` /dev/null 21), user=params.hdfs_user)
 
   # on STOP directories shouldn't be created
   # since during stop still old dirs are used (which were created during 
previous start)

http://git-wip-us.apache.org/repos/asf/ambari/blob/23c1e932/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py
--
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py 
b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py
index 8c2a2cc..b99f53a 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py
@@ -63,11 +63,11 @@ class TestDatanode(RMFTestCase):
   )
 self.assertResourceCalled('File', 
'/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid',
 action = ['delete'],
-not_if = ambari-sudo.sh [RMF_ENV_PLACEHOLDER] -H -E test -f 
/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid  ambari-sudo.sh 
[RMF_ENV_PLACEHOLDER] -H -E pgrep --pidfile 
/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid,
+not_if = ambari-sudo.sh su hdfs -l -s /bin/bash -c 
'[RMF_EXPORT_PLACEHOLDER]ls /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid 
/dev/null 21  ps -p `cat /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid` 
/dev/null 21',
 )
 self.assertResourceCalled('Execute', ambari-sudo.sh su hdfs -l -s 
/bin/bash -c '[RMF_EXPORT_PLACEHOLDER]ulimit -c unlimited ;  
/usr/lib/hadoop/sbin/hadoop-daemon.sh --config /etc/hadoop/conf start 
datanode',
 environment = {'HADOOP_LIBEXEC_DIR': '/usr/lib/hadoop/libexec'},
-not_if = ambari-sudo.sh [RMF_ENV_PLACEHOLDER] -H -E test -f 
/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid  ambari-sudo.sh 
[RMF_ENV_PLACEHOLDER] -H -E pgrep --pidfile 
/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid,
+not_if = ambari-sudo.sh su hdfs -l -s /bin/bash -c 
'[RMF_EXPORT_PLACEHOLDER]ls /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid 
/dev/null 21  ps -p `cat /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid` 
/dev/null 21',
 )
 self.assertNoMoreResources()
 
@@ -82,7 +82,7 @@ class TestDatanode(RMFTestCase):
 )
 self.assertResourceCalled('File', 
'/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid',
 action = ['delete'],
-not_if = ambari-sudo.sh [RMF_ENV_PLACEHOLDER] -H -E test -f 
/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid  ambari-sudo.sh 
[RMF_ENV_PLACEHOLDER] -H -E pgrep --pidfile 
/var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid,
+not_if = ambari-sudo.sh su hdfs -l -s /bin/bash -c 

ambari git commit: Revert AMBARI-12276. Ozzie running with pig fail to renew JHS delegation token when RU because JHS recovery is not enabled (dlysnichenko)

2015-07-09 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/trunk 23c1e9324 - dbf9ccbbb


Revert AMBARI-12276. Ozzie running with pig fail to renew JHS delegation token 
when RU because JHS recovery is not enabled (dlysnichenko)

This reverts commit e09b5c8006e5df32e64bfc5976cd0dd25c9e9267.


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

Branch: refs/heads/trunk
Commit: dbf9cce49e46b3d11d5c730c484f69963241
Parents: 23c1e93
Author: Sumit Mohanty smoha...@hortonworks.com
Authored: Thu Jul 9 17:29:25 2015 -0700
Committer: Sumit Mohanty smoha...@hortonworks.com
Committed: Thu Jul 9 17:29:25 2015 -0700

--
 .../ambari/server/checks/CheckDescription.java  |  13 --
 ...apReduce2JobHistoryStatePreservingCheck.java | 156 ---
 .../2.1.0.2.0/package/scripts/params_linux.py   |   1 -
 .../YARN/2.1.0.2.0/package/scripts/yarn.py  |   6 -
 .../YARN/configuration-mapred/mapred-site.xml   |  50 --
 ...duce2JobHistoryStatePreservingCheckTest.java | 152 --
 .../stacks/2.0.6/YARN/test_historyserver.py |  12 --
 7 files changed, 390 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/dbf9ccbb/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
index 1e028c1..0cd5352 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java
@@ -152,19 +152,6 @@ public enum CheckDescription {
   YARN should have state preserving restart enabled for the Timeline 
server. The yarn-site.xml property yarn.timeline-service.recovery.enabled 
should be set to true.);
   }}),
 
-  SERVICES_MR2_JOBHISTORY_ST(PrereqCheckType.SERVICE,
-  MapReduce2 JobHistory recovery should be enabled,
-  new HashMapString, String() {{
-
put(MapReduce2JobHistoryStatePreservingCheck.MAPREDUCE2_JOBHISTORY_RECOVERY_ENABLE_KEY,
-  MapReduce2 should have recovery enabled for the JobHistory server. 
The mapred-site.xml property mapreduce.jobhistory.recovery.enable should be set 
to true.);
-
put(MapReduce2JobHistoryStatePreservingCheck.MAPREDUCE2_JOBHISTORY_RECOVERY_STORE_KEY,
-  MapReduce2 should have recovery enabled for the JobHistory server. 
The mapred-site.xml property mapreduce.jobhistory.recovery.store.class should 
be set to 
org.apache.hadoop.mapreduce.v2.hs.HistoryServerLeveldbStateStoreService.);
-
put(MapReduce2JobHistoryStatePreservingCheck.MAPREDUCE2_JOBHISTORY_RECOVERY_STORE_LEVELDB_PATH_KEY,
-  MapReduce2 should have recovery enabled for the JobHistory server. 
The mapred-site.xml property mapreduce.jobhistory.recovery.store.leveldb.path 
should be set. Please note that 
\mapreduce.jobhistory.recovery.store.leveldb.path\ should be set equal to 
\yarn.timeline-service.leveldb-state-store.path\ for consistency.);
-
put(MapReduce2JobHistoryStatePreservingCheck.YARN_TIMELINE_SERVICE_LEVELDB_STATE_STORE_PATH_KEY,
-  The mapred-site.xml property 
mapreduce.jobhistory.recovery.store.leveldb.path should be set. Please note 
that \mapreduce.jobhistory.recovery.store.leveldb.path\ should be set equal 
to \yarn.timeline-service.leveldb-state-store.path\ for consistency.);
-  }}),
-
   SERVICES_HIVE_DYNAMIC_SERVICE_DISCOVERY(PrereqCheckType.SERVICE,
   Hive Dynamic Service Discovery,
   new HashMapString, String() {{

http://git-wip-us.apache.org/repos/asf/ambari/blob/dbf9ccbb/ambari-server/src/main/java/org/apache/ambari/server/checks/MapReduce2JobHistoryStatePreservingCheck.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/MapReduce2JobHistoryStatePreservingCheck.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/MapReduce2JobHistoryStatePreservingCheck.java
deleted file mode 100644
index 0bb08b4..000
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/MapReduce2JobHistoryStatePreservingCheck.java
+++ /dev/null
@@ -1,156 +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
- *