ambari git commit: AMBARI-18981 - Manage JournalNodes Wizard: Display only the steps needed for DELETE ONLY task (rzang)

2016-12-05 Thread rzang
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 1c89883e8 -> 89bcca4ea


AMBARI-18981 - Manage JournalNodes Wizard: Display only the steps needed for 
DELETE ONLY task (rzang)


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

Branch: refs/heads/branch-2.5
Commit: 89bcca4ea1e111c15438059f042d92969ff79f34
Parents: 1c89883
Author: Richard Zang 
Authored: Mon Dec 5 18:11:12 2016 -0800
Committer: Richard Zang 
Committed: Mon Dec 5 18:17:56 2016 -0800

--
 .../app/controllers/global/update_controller.js |  5 ++--
 .../journalNode/wizard_controller.js| 28 +---
 .../app/routes/manage_journalnode_routes.js |  4 +--
 .../highAvailability/journalNode/wizard.hbs |  8 +++---
 .../highAvailability/journalNode/step2_view.js  |  5 ++--
 5 files changed, 28 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/89bcca4e/ambari-web/app/controllers/global/update_controller.js
--
diff --git a/ambari-web/app/controllers/global/update_controller.js 
b/ambari-web/app/controllers/global/update_controller.js
index 4631f09..ce93b34 100644
--- a/ambari-web/app/controllers/global/update_controller.js
+++ b/ambari-web/app/controllers/global/update_controller.js
@@ -249,11 +249,10 @@ App.UpdateController = Em.Controller.extend({
 ]);
   }
   else {
-// clusterController.isHostsLoaded may be changed in callback, that is 
why it's value is cached before calling callback
-isHostsLoaded = App.router.get('clusterController.isHostsLoaded');
-callback();
 // On pages except for hosts/hostDetails, making sure hostsMapper 
loaded only once on page load, no need to update, but at least once
+isHostsLoaded = App.router.get('clusterController.isHostsLoaded');
 if (isHostsLoaded) {
+  callback();
   return;
 }
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/89bcca4e/ambari-web/app/controllers/main/admin/highAvailability/journalNode/wizard_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/admin/highAvailability/journalNode/wizard_controller.js
 
b/ambari-web/app/controllers/main/admin/highAvailability/journalNode/wizard_controller.js
index 2305524..fe9a15b 100644
--- 
a/ambari-web/app/controllers/main/admin/highAvailability/journalNode/wizard_controller.js
+++ 
b/ambari-web/app/controllers/main/admin/highAvailability/journalNode/wizard_controller.js
@@ -120,22 +120,30 @@ App.ManageJournalNodeWizardController = 
App.WizardController.extend({
   },
 
   getJournalNodesToAdd: function () {
-return 
this.get('content.masterComponentHosts').filterProperty('component', 
'JOURNALNODE')
-  .filterProperty('isInstalled', false).mapProperty('hostName');
+var result = [];
+var masterComponentHosts = this.get('content.masterComponentHosts');
+if (masterComponentHosts) {
+  result = masterComponentHosts.filterProperty('component', 
'JOURNALNODE').filterProperty('isInstalled', false).mapProperty('hostName');
+}
+return result;
   },
 
   getJournalNodesToDelete: function () {
-var existingHosts = 
App.HostComponent.find().filterProperty('componentName', 
'JOURNALNODE').mapProperty('hostName');
-var currentJNs = 
this.get('content.masterComponentHosts').filterProperty('component', 
'JOURNALNODE');
-var removed = existingHosts.filter(function(host) {
-  return currentJNs.filterProperty('hostName', host).length == 0;
-});
-return removed;
+var result = [];
+var masterComponentHosts = this.get('content.masterComponentHosts');
+if (masterComponentHosts) {
+  var currentJNs = masterComponentHosts.filterProperty('component', 
'JOURNALNODE');
+  var existingHosts = 
App.HostComponent.find().filterProperty('componentName', 
'JOURNALNODE').mapProperty('hostName');
+  result = existingHosts.filter(function(host) {
+return currentJNs.filterProperty('hostName', host).length == 0;
+  });
+}
+return result;
   },
 
   isDeleteOnly: function () {
-return this.getJournalNodesToAdd().length == 0 && 
this.getJournalNodesToDelete().length > 0;
-  },
+return this.get('currentStep') > 1 && this.getJournalNodesToAdd().length 
== 0 && this.getJournalNodesToDelete().length > 0;
+  }.property('content.masterComponentHosts', 
'App.router.clusterController.isHostsLoaded', 'currentStep'),
 
   /**
* Save config properties


ambari git commit: AMBARI-18981 - Manage JournalNodes Wizard: Display only the steps needed for DELETE ONLY task (rzang)

2016-12-05 Thread rzang
Repository: ambari
Updated Branches:
  refs/heads/trunk e88f84646 -> 353b2ac00


AMBARI-18981 - Manage JournalNodes Wizard: Display only the steps needed for 
DELETE ONLY task (rzang)


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

Branch: refs/heads/trunk
Commit: 353b2ac0064e0d014ace50acba12c523491782a8
Parents: e88f846
Author: Richard Zang 
Authored: Mon Dec 5 18:11:12 2016 -0800
Committer: Richard Zang 
Committed: Mon Dec 5 18:11:12 2016 -0800

--
 .../app/controllers/global/update_controller.js |  5 ++--
 .../journalNode/wizard_controller.js| 28 +---
 .../app/routes/manage_journalnode_routes.js |  4 +--
 .../highAvailability/journalNode/wizard.hbs | 13 +
 .../highAvailability/journalNode/step2_view.js  |  5 ++--
 5 files changed, 30 insertions(+), 25 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/353b2ac0/ambari-web/app/controllers/global/update_controller.js
--
diff --git a/ambari-web/app/controllers/global/update_controller.js 
b/ambari-web/app/controllers/global/update_controller.js
index 4631f09..ce93b34 100644
--- a/ambari-web/app/controllers/global/update_controller.js
+++ b/ambari-web/app/controllers/global/update_controller.js
@@ -249,11 +249,10 @@ App.UpdateController = Em.Controller.extend({
 ]);
   }
   else {
-// clusterController.isHostsLoaded may be changed in callback, that is 
why it's value is cached before calling callback
-isHostsLoaded = App.router.get('clusterController.isHostsLoaded');
-callback();
 // On pages except for hosts/hostDetails, making sure hostsMapper 
loaded only once on page load, no need to update, but at least once
+isHostsLoaded = App.router.get('clusterController.isHostsLoaded');
 if (isHostsLoaded) {
+  callback();
   return;
 }
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/353b2ac0/ambari-web/app/controllers/main/admin/highAvailability/journalNode/wizard_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/admin/highAvailability/journalNode/wizard_controller.js
 
b/ambari-web/app/controllers/main/admin/highAvailability/journalNode/wizard_controller.js
index 2305524..fe9a15b 100644
--- 
a/ambari-web/app/controllers/main/admin/highAvailability/journalNode/wizard_controller.js
+++ 
b/ambari-web/app/controllers/main/admin/highAvailability/journalNode/wizard_controller.js
@@ -120,22 +120,30 @@ App.ManageJournalNodeWizardController = 
App.WizardController.extend({
   },
 
   getJournalNodesToAdd: function () {
-return 
this.get('content.masterComponentHosts').filterProperty('component', 
'JOURNALNODE')
-  .filterProperty('isInstalled', false).mapProperty('hostName');
+var result = [];
+var masterComponentHosts = this.get('content.masterComponentHosts');
+if (masterComponentHosts) {
+  result = masterComponentHosts.filterProperty('component', 
'JOURNALNODE').filterProperty('isInstalled', false).mapProperty('hostName');
+}
+return result;
   },
 
   getJournalNodesToDelete: function () {
-var existingHosts = 
App.HostComponent.find().filterProperty('componentName', 
'JOURNALNODE').mapProperty('hostName');
-var currentJNs = 
this.get('content.masterComponentHosts').filterProperty('component', 
'JOURNALNODE');
-var removed = existingHosts.filter(function(host) {
-  return currentJNs.filterProperty('hostName', host).length == 0;
-});
-return removed;
+var result = [];
+var masterComponentHosts = this.get('content.masterComponentHosts');
+if (masterComponentHosts) {
+  var currentJNs = masterComponentHosts.filterProperty('component', 
'JOURNALNODE');
+  var existingHosts = 
App.HostComponent.find().filterProperty('componentName', 
'JOURNALNODE').mapProperty('hostName');
+  result = existingHosts.filter(function(host) {
+return currentJNs.filterProperty('hostName', host).length == 0;
+  });
+}
+return result;
   },
 
   isDeleteOnly: function () {
-return this.getJournalNodesToAdd().length == 0 && 
this.getJournalNodesToDelete().length > 0;
-  },
+return this.get('currentStep') > 1 && this.getJournalNodesToAdd().length 
== 0 && this.getJournalNodesToDelete().length > 0;
+  }.property('content.masterComponentHosts', 
'App.router.clusterController.isHostsLoaded', 'currentStep'),
 
   /**
* Save config properties


[2/2] ambari git commit: AMBARI-18965 : Investigate and reduce AMS HA dependency on Zookeeper. (avijayan)

2016-12-05 Thread avijayan
AMBARI-18965 : Investigate and reduce AMS HA dependency on Zookeeper. (avijayan)


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

Branch: refs/heads/trunk
Commit: e88f84646d587549d00ef83496f4e9b61572d2cf
Parents: c711850
Author: Aravindan Vijayan 
Authored: Mon Dec 5 14:30:53 2016 -0800
Committer: Aravindan Vijayan 
Committed: Mon Dec 5 14:30:53 2016 -0800

--
 .../timeline/AbstractTimelineMetricsSink.java   | 40 
 .../availability/MetricCollectorHAHelper.java   |  1 -
 .../availability/MetricCollectorHATest.java |  1 -
 .../src/main/python/core/config_reader.py   |  2 +-
 .../timeline/HBaseTimelineMetricStore.java  | 18 -
 .../timeline/TimelineMetricConfiguration.java   | 14 +++
 .../aggregators/AbstractTimelineAggregator.java |  6 +--
 .../MetricCollectorHAController.java|  4 +-
 .../TestApplicationHistoryServer.java   | 14 ++-
 .../MetricCollectorHAControllerTest.java|  4 +-
 .../0.1.0/configuration/ams-env.xml |  2 +-
 .../0.1.0/configuration/ams-site.xml| 12 ++
 .../0.1.0/package/scripts/params.py | 13 ---
 13 files changed, 96 insertions(+), 35 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e88f8464/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
--
diff --git 
a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
 
b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
index 2c0c822..f92f968 100644
--- 
a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
+++ 
b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
@@ -84,6 +84,10 @@ public abstract class AbstractTimelineMetricsSink {
   public int ZK_CONNECT_TRY_COUNT = 10;
   public int ZK_SLEEP_BETWEEN_RETRY_TIME = 2000;
   public boolean shardExpired = true;
+  private int zookeeperMinBackoffTimeMins = 2;
+  private int zookeeperMaxBackoffTimeMins = 5;
+  private long zookeeperBackoffTimeMillis;
+  private long lastFailedZkRequestTime = 0l;
 
   private SSLSocketFactory sslSocketFactory;
 
@@ -132,6 +136,7 @@ public abstract class AbstractTimelineMetricsSink {
 metricSinkWriteShardStrategy = new 
MetricSinkWriteShardHostnameHashingStrategy(getHostname());
 collectorHAHelper = new MetricCollectorHAHelper(getZookeeperQuorum(),
   ZK_CONNECT_TRY_COUNT, ZK_SLEEP_BETWEEN_RETRY_TIME);
+zookeeperBackoffTimeMillis = getZookeeperBackoffTimeMillis();
 isInitializedForHA = true;
   }
 
@@ -337,13 +342,27 @@ public abstract class AbstractTimelineMetricsSink {
 }
 
 // Reach out to all configured collectors before Zookeeper
-refreshCollectorsFromConfigured();
+Collection collectorHosts = getConfiguredCollectorHosts();
+refreshCollectorsFromConfigured(collectorHosts);
 
 // Lookup Zookeeper for live hosts - max 10 seconds wait time
-if (allKnownLiveCollectors.size() == 0 && getZookeeperQuorum() != null) {
-  //TODO : Bring back Zk fallback after proper curation.
-  LOG.info("No live collectors from configuration. Not requesting 
zookeeper...");
-  
//allKnownLiveCollectors.addAll(collectorHAHelper.findLiveCollectorHostsFromZNode());
+long currentTime = System.currentTimeMillis();
+if (allKnownLiveCollectors.size() == 0 && getZookeeperQuorum() != null
+  && (currentTime - lastFailedZkRequestTime) > zookeeperBackoffTimeMillis) 
{
+
+  LOG.info("No live collectors from configuration. Requesting 
zookeeper...");
+  
allKnownLiveCollectors.addAll(collectorHAHelper.findLiveCollectorHostsFromZNode());
+  boolean noNewCollectorFromZk = true;
+  for (String collectorHostFromZk : allKnownLiveCollectors) {
+if (!collectorHosts.contains(collectorHostFromZk)) {
+  noNewCollectorFromZk = false;
+  break;
+}
+  }
+  if (noNewCollectorFromZk) {
+LOG.info("No new collector was found from Zookeeper. Will not request 
zookeeper for " + zookeeperBackoffTimeMillis + " millis");
+lastFailedZkRequestTime = System.currentTimeMillis();
+  }
 }
 
 if (allKnownLiveCollectors.size() != 0) {
@@ -356,7 +375,7 @@ public abstract class AbstractTimelineMetricsSink {
  

[1/2] ambari git commit: AMBARI-19088 : Make sure AMS in embedded mode cannot have more than 1 deployed instance. (avijayan)

2016-12-05 Thread avijayan
Repository: ambari
Updated Branches:
  refs/heads/trunk edf8ab243 -> e88f84646


AMBARI-19088 : Make sure AMS in embedded mode cannot have more than 1 deployed 
instance. (avijayan)


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

Branch: refs/heads/trunk
Commit: c711850a8e53d3c838a4f7c5b9b81f7b133afbdf
Parents: edf8ab2
Author: Aravindan Vijayan 
Authored: Mon Dec 5 14:30:16 2016 -0800
Committer: Aravindan Vijayan 
Committed: Mon Dec 5 14:30:16 2016 -0800

--
 .../0.1.0/package/scripts/metrics_collector.py  | 2 ++
 .../AMBARI_METRICS/0.1.0/package/scripts/params.py  | 9 +++--
 2 files changed, 9 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c711850a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py
 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py
index c26eafc..7073de6 100644
--- 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py
+++ 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py
@@ -38,6 +38,8 @@ class AmsCollector(Script):
   def configure(self, env, action = None):
 import params
 env.set_params(params)
+if action == 'start' and params.embedded_mode_multiple_instances:
+  raise Fail("AMS in embedded mode cannot have more than 1 instance. 
Delete all but 1 instances or switch to Distributed mode ")
 hbase('master', action)
 hbase('regionserver', action)
 ams(name='collector')

http://git-wip-us.apache.org/repos/asf/ambari/blob/c711850a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
index 4bda033..529cf4c 100644
--- 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
@@ -55,10 +55,16 @@ pass
 
 #AMBARI_METRICS data
 ams_pid_dir = status_params.ams_collector_pid_dir
-
+is_ams_distributed = 
config['configurations']['ams-site']['timeline.metrics.service.operation.mode'] 
== 'distributed'
 ams_collector_script = "/usr/sbin/ambari-metrics-collector"
 ams_collector_pid_dir = status_params.ams_collector_pid_dir
 ams_collector_hosts = 
",".join(default("/clusterHostInfo/metrics_collector_hosts", []))
+ams_collector_list = default("/clusterHostInfo/metrics_collector_hosts", [])
+embedded_mode_multiple_instances = False
+
+if not is_ams_distributed and len(ams_collector_list) > 1:
+  embedded_mode_multiple_instances = True
+
 failover_strategy_blacklisted_interval_seconds = 
default("/configurations/ams-env/failover_strategy_blacklisted_interval", "600")
 failover_strategy = default("/configurations/ams-site/failover.strategy", 
"round-robin")
 if default("/configurations/ams-site/timeline.metrics.service.http.policy", 
"HTTP_ONLY") == "HTTPS_ONLY":
@@ -180,7 +186,6 @@ hbase_pid_dir = status_params.hbase_pid_dir
 
 is_hbase_distributed = 
config['configurations']['ams-hbase-site']['hbase.cluster.distributed']
 is_local_fs_rootdir = hbase_root_dir.startswith('file://')
-is_ams_distributed = 
config['configurations']['ams-site']['timeline.metrics.service.operation.mode'] 
== 'distributed'
 
 # security is disabled for embedded mode, when HBase is backed by file
 security_enabled = False if not is_hbase_distributed else 
config['configurations']['cluster-env']['security_enabled']



[1/2] ambari git commit: AMBARI-18965 : Investigate and reduce AMS HA dependency on Zookeeper. (avijayan)

2016-12-05 Thread avijayan
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 655ec87d2 -> 1c89883e8


AMBARI-18965 : Investigate and reduce AMS HA dependency on Zookeeper. (avijayan)


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

Branch: refs/heads/branch-2.5
Commit: 1c89883e80231a6033160de37e389457ae3d630e
Parents: 5fd60da
Author: Aravindan Vijayan 
Authored: Mon Dec 5 14:28:27 2016 -0800
Committer: Aravindan Vijayan 
Committed: Mon Dec 5 14:28:35 2016 -0800

--
 .../timeline/AbstractTimelineMetricsSink.java   | 40 
 .../availability/MetricCollectorHAHelper.java   |  1 -
 .../availability/MetricCollectorHATest.java |  1 -
 .../src/main/python/core/config_reader.py   |  2 +-
 .../timeline/HBaseTimelineMetricStore.java  | 18 -
 .../timeline/TimelineMetricConfiguration.java   | 14 +++
 .../aggregators/AbstractTimelineAggregator.java |  6 +--
 .../MetricCollectorHAController.java|  4 +-
 .../TestApplicationHistoryServer.java   | 14 ++-
 .../MetricCollectorHAControllerTest.java|  4 +-
 .../0.1.0/configuration/ams-env.xml |  2 +-
 .../0.1.0/configuration/ams-site.xml| 12 ++
 .../0.1.0/package/scripts/params.py | 13 ---
 13 files changed, 96 insertions(+), 35 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1c89883e/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
--
diff --git 
a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
 
b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
index 2c0c822..f92f968 100644
--- 
a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
+++ 
b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
@@ -84,6 +84,10 @@ public abstract class AbstractTimelineMetricsSink {
   public int ZK_CONNECT_TRY_COUNT = 10;
   public int ZK_SLEEP_BETWEEN_RETRY_TIME = 2000;
   public boolean shardExpired = true;
+  private int zookeeperMinBackoffTimeMins = 2;
+  private int zookeeperMaxBackoffTimeMins = 5;
+  private long zookeeperBackoffTimeMillis;
+  private long lastFailedZkRequestTime = 0l;
 
   private SSLSocketFactory sslSocketFactory;
 
@@ -132,6 +136,7 @@ public abstract class AbstractTimelineMetricsSink {
 metricSinkWriteShardStrategy = new 
MetricSinkWriteShardHostnameHashingStrategy(getHostname());
 collectorHAHelper = new MetricCollectorHAHelper(getZookeeperQuorum(),
   ZK_CONNECT_TRY_COUNT, ZK_SLEEP_BETWEEN_RETRY_TIME);
+zookeeperBackoffTimeMillis = getZookeeperBackoffTimeMillis();
 isInitializedForHA = true;
   }
 
@@ -337,13 +342,27 @@ public abstract class AbstractTimelineMetricsSink {
 }
 
 // Reach out to all configured collectors before Zookeeper
-refreshCollectorsFromConfigured();
+Collection collectorHosts = getConfiguredCollectorHosts();
+refreshCollectorsFromConfigured(collectorHosts);
 
 // Lookup Zookeeper for live hosts - max 10 seconds wait time
-if (allKnownLiveCollectors.size() == 0 && getZookeeperQuorum() != null) {
-  //TODO : Bring back Zk fallback after proper curation.
-  LOG.info("No live collectors from configuration. Not requesting 
zookeeper...");
-  
//allKnownLiveCollectors.addAll(collectorHAHelper.findLiveCollectorHostsFromZNode());
+long currentTime = System.currentTimeMillis();
+if (allKnownLiveCollectors.size() == 0 && getZookeeperQuorum() != null
+  && (currentTime - lastFailedZkRequestTime) > zookeeperBackoffTimeMillis) 
{
+
+  LOG.info("No live collectors from configuration. Requesting 
zookeeper...");
+  
allKnownLiveCollectors.addAll(collectorHAHelper.findLiveCollectorHostsFromZNode());
+  boolean noNewCollectorFromZk = true;
+  for (String collectorHostFromZk : allKnownLiveCollectors) {
+if (!collectorHosts.contains(collectorHostFromZk)) {
+  noNewCollectorFromZk = false;
+  break;
+}
+  }
+  if (noNewCollectorFromZk) {
+LOG.info("No new collector was found from Zookeeper. Will not request 
zookeeper for " + zookeeperBackoffTimeMillis + " millis");
+lastFailedZkRequestTime = System.currentTimeMillis();
+  }
 }
 
 if 

ambari git commit: AMBARI-19082. Ambari Server upgrade from 2.0.2 to 2.2.2 changed the following configs and added a port of -1.(vbrodetskyi)

2016-12-05 Thread vbrodetskyi
Repository: ambari
Updated Branches:
  refs/heads/trunk a00c5 -> edf8ab243


AMBARI-19082. Ambari Server upgrade from 2.0.2 to 2.2.2 changed the following 
configs and added a port of -1.(vbrodetskyi)


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

Branch: refs/heads/trunk
Commit: edf8ab2432af6b73f73c4ae386ff13c93c6c38c2
Parents: a00
Author: Vitaly Brodetskyi 
Authored: Tue Dec 6 00:06:31 2016 +0200
Committer: Vitaly Brodetskyi 
Committed: Tue Dec 6 00:06:31 2016 +0200

--
 .../server/upgrade/AbstractUpgradeCatalog.java  | 21 
 .../server/upgrade/UpgradeCatalog210Test.java   |  2 ++
 2 files changed, 15 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/edf8ab24/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
index ce9fcc6..7f91a68 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
@@ -17,6 +17,11 @@
  */
 package org.apache.ambari.server.upgrade;
 
+import javax.persistence.EntityManager;
+import javax.xml.bind.JAXBException;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
 import java.io.File;
 import java.io.FileReader;
 import java.io.FilenameFilter;
@@ -42,11 +47,6 @@ import java.util.TreeMap;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import javax.persistence.EntityManager;
-import javax.xml.bind.JAXBException;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.api.services.AmbariMetaInfo;
 import org.apache.ambari.server.configuration.Configuration;
@@ -447,11 +447,16 @@ public abstract class AbstractUpgradeCatalog implements 
UpgradeCatalog {
 Config hdfsSiteConfig = 
cluster.getDesiredConfigByType(CONFIGURATION_TYPE_HDFS_SITE);
 if (hdfsSiteConfig != null) {
   Map properties = hdfsSiteConfig.getProperties();
+  if (properties.containsKey("dfs.internal.nameservices")) {
+return true;
+  }
   String nameServices = properties.get(PROPERTY_DFS_NAMESERVICES);
   if (!StringUtils.isEmpty(nameServices)) {
-String namenodes = properties.get(String.format("dfs.ha.namenodes.%s", 
nameServices));
-if (!StringUtils.isEmpty(namenodes)) {
-  return (namenodes.split(",").length > 1);
+for (String nameService : nameServices.split(",")) {
+  String namenodes = 
properties.get(String.format("dfs.ha.namenodes.%s", nameService));
+  if (!StringUtils.isEmpty(namenodes)) {
+return (namenodes.split(",").length > 1);
+  }
 }
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/edf8ab24/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java
index 3bff060..0bd8f48 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java
@@ -880,6 +880,8 @@ public class UpgradeCatalog210Test {
 
 final Map propertiesExpectedHdfs = new HashMap();
 final Map propertiesExpectedCoreSite = new HashMap();
+propertiesExpectedHdfs.put("dfs.nameservices", "nncl1,nncl2");
+propertiesExpectedHdfs.put("dfs.ha.namenodes.nncl2", "nn1,nn2");
 propertiesExpectedCoreSite.put("fs.defaultFS", "hdfs://EXAMPLE.COM:8020");
 final Injector mockInjector = Guice.createInjector(new AbstractModule() {
   @Override



ambari git commit: AMBARI-19082. Ambari Server upgrade from 2.0.2 to 2.2.2 changed the following configs and added a port of -1.(vbrodetskyi)

2016-12-05 Thread vbrodetskyi
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 7492e65f7 -> 655ec87d2


AMBARI-19082. Ambari Server upgrade from 2.0.2 to 2.2.2 changed the following 
configs and added a port of -1.(vbrodetskyi)


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

Branch: refs/heads/branch-2.5
Commit: 655ec87d24c99c97a19e98ea1f1d7f6ddc300ce3
Parents: 7492e65
Author: Vitaly Brodetskyi 
Authored: Mon Dec 5 23:54:23 2016 +0200
Committer: Vitaly Brodetskyi 
Committed: Mon Dec 5 23:54:23 2016 +0200

--
 .../server/upgrade/AbstractUpgradeCatalog.java  | 21 
 .../server/upgrade/UpgradeCatalog210Test.java   |  2 ++
 2 files changed, 15 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/655ec87d/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
index 1038766..b1db4e4 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
@@ -17,6 +17,11 @@
  */
 package org.apache.ambari.server.upgrade;
 
+import javax.persistence.EntityManager;
+import javax.xml.bind.JAXBException;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
 import java.io.File;
 import java.io.FileReader;
 import java.io.FilenameFilter;
@@ -42,11 +47,6 @@ import java.util.TreeMap;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import javax.persistence.EntityManager;
-import javax.xml.bind.JAXBException;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.api.services.AmbariMetaInfo;
 import org.apache.ambari.server.configuration.Configuration;
@@ -447,11 +447,16 @@ public abstract class AbstractUpgradeCatalog implements 
UpgradeCatalog {
 Config hdfsSiteConfig = 
cluster.getDesiredConfigByType(CONFIGURATION_TYPE_HDFS_SITE);
 if (hdfsSiteConfig != null) {
   Map properties = hdfsSiteConfig.getProperties();
+  if (properties.containsKey("dfs.internal.nameservices")) {
+return true;
+  }
   String nameServices = properties.get(PROPERTY_DFS_NAMESERVICES);
   if (!StringUtils.isEmpty(nameServices)) {
-String namenodes = properties.get(String.format("dfs.ha.namenodes.%s", 
nameServices));
-if (!StringUtils.isEmpty(namenodes)) {
-  return (namenodes.split(",").length > 1);
+for (String nameService : nameServices.split(",")) {
+  String namenodes = 
properties.get(String.format("dfs.ha.namenodes.%s", nameService));
+  if (!StringUtils.isEmpty(namenodes)) {
+return (namenodes.split(",").length > 1);
+  }
 }
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/655ec87d/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java
index e8ed042..f19288f 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java
@@ -876,6 +876,8 @@ public class UpgradeCatalog210Test {
 
 final Map propertiesExpectedHdfs = new HashMap();
 final Map propertiesExpectedCoreSite = new HashMap();
+propertiesExpectedHdfs.put("dfs.nameservices", "nncl1,nncl2");
+propertiesExpectedHdfs.put("dfs.ha.namenodes.nncl2", "nn1,nn2");
 propertiesExpectedCoreSite.put("fs.defaultFS", "hdfs://EXAMPLE.COM:8020");
 final Injector mockInjector = Guice.createInjector(new AbstractModule() {
   @Override



ambari git commit: AMBARI-19086. LDAP sync creates groups with Local type (Attila Doroszla via rlevas)

2016-12-05 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 0693f552b -> 7492e65f7


AMBARI-19086. LDAP sync creates groups with Local type (Attila Doroszla via 
rlevas)


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

Branch: refs/heads/branch-2.5
Commit: 7492e65f7374cd7b01e9b1f2dd0e5b21a1d10ff1
Parents: 0693f55
Author: Attila Doroszlai 
Authored: Mon Dec 5 16:43:26 2016 -0500
Committer: Robert Levas 
Committed: Mon Dec 5 16:43:26 2016 -0500

--
 .../apache/ambari/server/orm/entities/GroupEntity.java|  5 +++--
 .../ambari/server/security/authorization/Users.java   | 10 --
 .../server/security/ldap/AmbariLdapDataPopulatorTest.java |  3 ++-
 3 files changed, 9 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7492e65f/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/GroupEntity.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/GroupEntity.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/GroupEntity.java
index 58b2e5d..dc71b61 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/GroupEntity.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/GroupEntity.java
@@ -101,7 +101,7 @@ public class GroupEntity {
 return ldapGroup == 0 ? Boolean.FALSE : Boolean.TRUE;
   }
 
-  public void setLdapGroup(Boolean ldapGroup) {
+  private void setLdapGroup(Boolean ldapGroup) {
 if (ldapGroup == null) {
   this.ldapGroup = null;
 } else {
@@ -113,8 +113,9 @@ public class GroupEntity {
 return groupType;
   }
 
-  public void setgroupType(GroupType groupType) {
+  public void setGroupType(GroupType groupType) {
 this.groupType = groupType;
+setLdapGroup(groupType == GroupType.LDAP);
   }
 
   public Set getMemberEntities() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/7492e65f/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/Users.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/Users.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/Users.java
index 2f7bdd0..4b3237b 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/Users.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/Users.java
@@ -49,10 +49,8 @@ import 
org.apache.ambari.server.orm.entities.PermissionEntity;
 import org.apache.ambari.server.orm.entities.PrincipalEntity;
 import org.apache.ambari.server.orm.entities.PrincipalTypeEntity;
 import org.apache.ambari.server.orm.entities.PrivilegeEntity;
-import org.apache.ambari.server.orm.entities.ResourceEntity;
 import org.apache.ambari.server.orm.entities.ResourceTypeEntity;
 import org.apache.ambari.server.orm.entities.UserEntity;
-import org.apache.ambari.server.security.ClientSecurityType;
 import org.apache.ambari.server.security.ldap.LdapBatchDto;
 import org.apache.ambari.server.security.ldap.LdapUserGroupMemberDto;
 import org.apache.commons.lang.StringUtils;
@@ -277,7 +275,7 @@ public class Users {
   public synchronized void setGroupLdap(String groupName) throws 
AmbariException {
 GroupEntity groupEntity = groupDAO.findGroupByName(groupName);
 if (groupEntity != null) {
-  groupEntity.setLdapGroup(true);
+  groupEntity.setGroupType(GroupType.LDAP);
   groupDAO.merge(groupEntity);
 } else {
   throw new AmbariException("Group " + groupName + " doesn't exist");
@@ -435,7 +433,7 @@ public class Users {
 final GroupEntity groupEntity = new GroupEntity();
 groupEntity.setGroupName(groupName);
 groupEntity.setPrincipal(principalEntity);
-groupEntity.setgroupType(groupType);
+groupEntity.setGroupType(groupType);
 
 groupDAO.create(groupEntity);
   }
@@ -701,7 +699,7 @@ public class Users {
 final Set groupsToBecomeLdap = new HashSet();
 for (String groupName : batchInfo.getGroupsToBecomeLdap()) {
   final GroupEntity groupEntity = groupDAO.findGroupByName(groupName);
-  groupEntity.setLdapGroup(true);
+  groupEntity.setGroupType(GroupType.LDAP);
   allGroups.put(groupEntity.getGroupName(), groupEntity);
   groupsToBecomeLdap.add(groupEntity);
 }
@@ -737,7 +735,7 @@ public class Users {
   final GroupEntity groupEntity = new GroupEntity();
   groupEntity.setGroupName(groupName);
   

ambari git commit: AMBARI-19086. LDAP sync creates groups with Local type (Attila Doroszla via rlevas)

2016-12-05 Thread rlevas
Repository: ambari
Updated Branches:
  refs/heads/trunk b5122e258 -> a00c5


AMBARI-19086. LDAP sync creates groups with Local type (Attila Doroszla via 
rlevas)


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

Branch: refs/heads/trunk
Commit: a00c54a8063c1728d2f3ba24db04504864da
Parents: b5122e2
Author: Attila Doroszlai 
Authored: Mon Dec 5 16:42:14 2016 -0500
Committer: Robert Levas 
Committed: Mon Dec 5 16:42:14 2016 -0500

--
 .../apache/ambari/server/orm/entities/GroupEntity.java|  5 +++--
 .../ambari/server/security/authorization/Users.java   | 10 --
 .../server/security/ldap/AmbariLdapDataPopulatorTest.java |  3 ++-
 3 files changed, 9 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a00c/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/GroupEntity.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/GroupEntity.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/GroupEntity.java
index 58b2e5d..dc71b61 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/GroupEntity.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/GroupEntity.java
@@ -101,7 +101,7 @@ public class GroupEntity {
 return ldapGroup == 0 ? Boolean.FALSE : Boolean.TRUE;
   }
 
-  public void setLdapGroup(Boolean ldapGroup) {
+  private void setLdapGroup(Boolean ldapGroup) {
 if (ldapGroup == null) {
   this.ldapGroup = null;
 } else {
@@ -113,8 +113,9 @@ public class GroupEntity {
 return groupType;
   }
 
-  public void setgroupType(GroupType groupType) {
+  public void setGroupType(GroupType groupType) {
 this.groupType = groupType;
+setLdapGroup(groupType == GroupType.LDAP);
   }
 
   public Set getMemberEntities() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/a00c/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/Users.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/Users.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/Users.java
index 2cd538c..e69bbc9 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/Users.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/Users.java
@@ -49,10 +49,8 @@ import 
org.apache.ambari.server.orm.entities.PermissionEntity;
 import org.apache.ambari.server.orm.entities.PrincipalEntity;
 import org.apache.ambari.server.orm.entities.PrincipalTypeEntity;
 import org.apache.ambari.server.orm.entities.PrivilegeEntity;
-import org.apache.ambari.server.orm.entities.ResourceEntity;
 import org.apache.ambari.server.orm.entities.ResourceTypeEntity;
 import org.apache.ambari.server.orm.entities.UserEntity;
-import org.apache.ambari.server.security.ClientSecurityType;
 import org.apache.ambari.server.security.ldap.LdapBatchDto;
 import org.apache.ambari.server.security.ldap.LdapUserGroupMemberDto;
 import org.apache.commons.lang.StringUtils;
@@ -277,7 +275,7 @@ public class Users {
   public synchronized void setGroupLdap(String groupName) throws 
AmbariException {
 GroupEntity groupEntity = groupDAO.findGroupByName(groupName);
 if (groupEntity != null) {
-  groupEntity.setLdapGroup(true);
+  groupEntity.setGroupType(GroupType.LDAP);
   groupDAO.merge(groupEntity);
 } else {
   throw new AmbariException("Group " + groupName + " doesn't exist");
@@ -435,7 +433,7 @@ public class Users {
 final GroupEntity groupEntity = new GroupEntity();
 groupEntity.setGroupName(groupName);
 groupEntity.setPrincipal(principalEntity);
-groupEntity.setgroupType(groupType);
+groupEntity.setGroupType(groupType);
 
 groupDAO.create(groupEntity);
   }
@@ -701,7 +699,7 @@ public class Users {
 final Set groupsToBecomeLdap = new HashSet();
 for (String groupName : batchInfo.getGroupsToBecomeLdap()) {
   final GroupEntity groupEntity = groupDAO.findGroupByName(groupName);
-  groupEntity.setLdapGroup(true);
+  groupEntity.setGroupType(GroupType.LDAP);
   allGroups.put(groupEntity.getGroupName(), groupEntity);
   groupsToBecomeLdap.add(groupEntity);
 }
@@ -737,7 +735,7 @@ public class Users {
   final GroupEntity groupEntity = new GroupEntity();
   groupEntity.setGroupName(groupName);
   

ambari git commit: AMBARI-19074. Host-Ordered: Empty groups are returned for Downgrade (ncole)

2016-12-05 Thread ncole
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 b90b0f8a7 -> 0693f552b


AMBARI-19074. Host-Ordered: Empty groups are returned for Downgrade (ncole)


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

Branch: refs/heads/branch-2.5
Commit: 0693f552b21e86eb4df11c3f34c5ef6ce2526289
Parents: b90b0f8
Author: Nate Cole 
Authored: Mon Dec 5 12:54:41 2016 -0500
Committer: Nate Cole 
Committed: Mon Dec 5 16:17:50 2016 -0500

--
 .../ambari/server/state/stack/UpgradePack.java  | 19 --
 .../ambari/server/state/UpgradeHelperTest.java  | 39 +++-
 2 files changed, 36 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0693f552/ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java
index edf5c89..afcab40 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java
@@ -287,10 +287,15 @@ public class UpgradePack {
 if (direction.isUpgrade()) {
   list = groups;
 } else {
-  if (type == UpgradeType.ROLLING) {
-list = getDowngradeGroupsForRolling();
-  } else if (type == UpgradeType.NON_ROLLING) {
-list = getDowngradeGroupsForNonrolling();
+  switch (type) {
+case NON_ROLLING:
+  list = getDowngradeGroupsForNonrolling();
+  break;
+case HOST_ORDERED:
+case ROLLING:
+default:
+  list = getDowngradeGroupsForRolling();
+  break;
   }
 }
 
@@ -357,6 +362,12 @@ public class UpgradePack {
   private List getDowngradeGroupsForRolling() {
 List reverse = new ArrayList();
 
+// !!! Testing exposed groups.size() == 1 issue.  Normally there's no 
precedent for
+// a one-group upgrade pack, so take it into account anyway.
+if (groups.size() == 1) {
+  return groups;
+}
+
 int idx = 0;
 int iter = 0;
 Iterator it = groups.iterator();

http://git-wip-us.apache.org/repos/asf/ambari/blob/0693f552/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
index 6b4b85a..ea1f18a 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
@@ -24,6 +24,7 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
+import java.lang.reflect.Field;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
@@ -1921,25 +1922,27 @@ public class UpgradeHelperTest {
 ServiceComponentHost sch1 = sc.addServiceComponentHost("h1");
 ServiceComponentHost sch2 = sc.addServiceComponentHost("h2");
 
-UpgradePack upgradePack = new UpgradePack() {
-  @Override
-  public List getGroups(Direction direction) {
-HostOrderItem hostItem = new 
HostOrderItem(HostOrderActionType.HOST_UPGRADE,
-Lists.newArrayList("h1", "h2"));
-HostOrderItem checkItem = new 
HostOrderItem(HostOrderActionType.SERVICE_CHECK,
-Lists.newArrayList("ZOOKEEPER", "STORM"));
-
-Grouping g = new HostOrderGrouping();
-((HostOrderGrouping) g).setHostOrderItems(Lists.newArrayList(hostItem, 
checkItem));
-g.title = "Some Title";
-return Lists.newArrayList(g);
-  }
+// !!! make a custom grouping
+HostOrderItem hostItem = new 
HostOrderItem(HostOrderActionType.HOST_UPGRADE,
+Lists.newArrayList("h1", "h2"));
+HostOrderItem checkItem = new 
HostOrderItem(HostOrderActionType.SERVICE_CHECK,
+Lists.newArrayList("ZOOKEEPER", "STORM"));
+
+Grouping g = new HostOrderGrouping();
+((HostOrderGrouping) g).setHostOrderItems(Lists.newArrayList(hostItem, 
checkItem));
+g.title = "Some Title";
+
+UpgradePack upgradePack = new UpgradePack();
+
+// !!! set the groups directly; allow the logic in getGroups(Direction) to 
happen
+Field field = 

ambari git commit: AMBARI-19039: In stack version, build number should not be mandatory (Amruta Borkar via dili)

2016-12-05 Thread dili
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 829304fbc -> b90b0f8a7


AMBARI-19039: In stack version, build number should not be mandatory (Amruta 
Borkar via dili)


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

Branch: refs/heads/branch-2.5
Commit: b90b0f8a7fa2445eec220f7987c14488406367c7
Parents: 829304f
Author: Di Li 
Authored: Mon Dec 5 16:03:50 2016 -0500
Committer: Di Li 
Committed: Mon Dec 5 16:10:20 2016 -0500

--
 .../python/resource_management/libraries/functions/copy_tarball.py | 2 +-
 .../libraries/functions/dynamic_variable_interpretation.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b90b0f8a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
index 519c88b..31a9be4 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
@@ -188,7 +188,7 @@ def _get_single_version_from_stack_select():
 Logger.error("Could not verify stack version by calling '{0}'. Return 
Code: {1}, Output: {2}.".format(get_stack_versions_cmd, str(code), str(out)))
 return None
 
-  matches = re.findall(r"([\d\.]+\-\d+)", out)
+  matches = re.findall(r"([\d\.]+(?:-\d+)?)", out)
 
   if matches and len(matches) == 1:
 stack_version = matches[0]

http://git-wip-us.apache.org/repos/asf/ambari/blob/b90b0f8a/ambari-common/src/main/python/resource_management/libraries/functions/dynamic_variable_interpretation.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/dynamic_variable_interpretation.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/dynamic_variable_interpretation.py
index ca8fe19..74db04a 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/dynamic_variable_interpretation.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/dynamic_variable_interpretation.py
@@ -185,7 +185,7 @@ def copy_tarballs_to_hdfs(tarball_prefix, 
stack_select_component_name, component
(get_stack_version_cmd, str(code), str(out)))
 return 1
 
-  matches = re.findall(r"([\d\.]+\-\d+)", out)
+  matches = re.findall(r"([\d\.]+(?:-\d+)?)", out)
   stack_version = matches[0] if matches and len(matches) > 0 else None
 
   if not stack_version:



ambari git commit: AMBARI-19039: In stack version, build number should not be mandatory (Amruta Borkar via dili)

2016-12-05 Thread dili
Repository: ambari
Updated Branches:
  refs/heads/trunk 50ead4d23 -> b5122e258


AMBARI-19039: In stack version, build number should not be mandatory (Amruta 
Borkar via dili)


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

Branch: refs/heads/trunk
Commit: b5122e258bfe5a2e56511eb9dd29a70cf1260a9c
Parents: 50ead4d
Author: Di Li 
Authored: Mon Dec 5 16:03:50 2016 -0500
Committer: Di Li 
Committed: Mon Dec 5 16:03:50 2016 -0500

--
 .../python/resource_management/libraries/functions/copy_tarball.py | 2 +-
 .../libraries/functions/dynamic_variable_interpretation.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b5122e25/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
index 519c88b..31a9be4 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
@@ -188,7 +188,7 @@ def _get_single_version_from_stack_select():
 Logger.error("Could not verify stack version by calling '{0}'. Return 
Code: {1}, Output: {2}.".format(get_stack_versions_cmd, str(code), str(out)))
 return None
 
-  matches = re.findall(r"([\d\.]+\-\d+)", out)
+  matches = re.findall(r"([\d\.]+(?:-\d+)?)", out)
 
   if matches and len(matches) == 1:
 stack_version = matches[0]

http://git-wip-us.apache.org/repos/asf/ambari/blob/b5122e25/ambari-common/src/main/python/resource_management/libraries/functions/dynamic_variable_interpretation.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/dynamic_variable_interpretation.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/dynamic_variable_interpretation.py
index ca8fe19..74db04a 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/dynamic_variable_interpretation.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/dynamic_variable_interpretation.py
@@ -185,7 +185,7 @@ def copy_tarballs_to_hdfs(tarball_prefix, 
stack_select_component_name, component
(get_stack_version_cmd, str(code), str(out)))
 return 1
 
-  matches = re.findall(r"([\d\.]+\-\d+)", out)
+  matches = re.findall(r"([\d\.]+(?:-\d+)?)", out)
   stack_version = matches[0] if matches and len(matches) > 0 else None
 
   if not stack_version:



ambari git commit: AMBARI-19074. Host-Ordered: Empty groups are returned for Downgrade (ncole)

2016-12-05 Thread ncole
Repository: ambari
Updated Branches:
  refs/heads/trunk 8fbc2718e -> 50ead4d23


AMBARI-19074. Host-Ordered: Empty groups are returned for Downgrade (ncole)


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

Branch: refs/heads/trunk
Commit: 50ead4d237b0c03fee68192a5983044409e3e9db
Parents: 8fbc271
Author: Nate Cole 
Authored: Mon Dec 5 12:54:41 2016 -0500
Committer: Nate Cole 
Committed: Mon Dec 5 15:27:19 2016 -0500

--
 .../ambari/server/state/stack/UpgradePack.java  | 19 --
 .../ambari/server/state/UpgradeHelperTest.java  | 39 +++-
 2 files changed, 36 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/50ead4d2/ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java
index aa97fa3..76f1897 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java
@@ -289,10 +289,15 @@ public class UpgradePack {
 if (direction.isUpgrade()) {
   list = groups;
 } else {
-  if (type == UpgradeType.ROLLING) {
-list = getDowngradeGroupsForRolling();
-  } else if (type == UpgradeType.NON_ROLLING) {
-list = getDowngradeGroupsForNonrolling();
+  switch (type) {
+case NON_ROLLING:
+  list = getDowngradeGroupsForNonrolling();
+  break;
+case HOST_ORDERED:
+case ROLLING:
+default:
+  list = getDowngradeGroupsForRolling();
+  break;
   }
 }
 
@@ -358,6 +363,12 @@ public class UpgradePack {
   private List getDowngradeGroupsForRolling() {
 List reverse = new ArrayList();
 
+// !!! Testing exposed groups.size() == 1 issue.  Normally there's no 
precedent for
+// a one-group upgrade pack, so take it into account anyway.
+if (groups.size() == 1) {
+  return groups;
+}
+
 int idx = 0;
 int iter = 0;
 Iterator it = groups.iterator();

http://git-wip-us.apache.org/repos/asf/ambari/blob/50ead4d2/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
index 6b4b85a..ea1f18a 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
@@ -24,6 +24,7 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
+import java.lang.reflect.Field;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
@@ -1921,25 +1922,27 @@ public class UpgradeHelperTest {
 ServiceComponentHost sch1 = sc.addServiceComponentHost("h1");
 ServiceComponentHost sch2 = sc.addServiceComponentHost("h2");
 
-UpgradePack upgradePack = new UpgradePack() {
-  @Override
-  public List getGroups(Direction direction) {
-HostOrderItem hostItem = new 
HostOrderItem(HostOrderActionType.HOST_UPGRADE,
-Lists.newArrayList("h1", "h2"));
-HostOrderItem checkItem = new 
HostOrderItem(HostOrderActionType.SERVICE_CHECK,
-Lists.newArrayList("ZOOKEEPER", "STORM"));
-
-Grouping g = new HostOrderGrouping();
-((HostOrderGrouping) g).setHostOrderItems(Lists.newArrayList(hostItem, 
checkItem));
-g.title = "Some Title";
-return Lists.newArrayList(g);
-  }
+// !!! make a custom grouping
+HostOrderItem hostItem = new 
HostOrderItem(HostOrderActionType.HOST_UPGRADE,
+Lists.newArrayList("h1", "h2"));
+HostOrderItem checkItem = new 
HostOrderItem(HostOrderActionType.SERVICE_CHECK,
+Lists.newArrayList("ZOOKEEPER", "STORM"));
+
+Grouping g = new HostOrderGrouping();
+((HostOrderGrouping) g).setHostOrderItems(Lists.newArrayList(hostItem, 
checkItem));
+g.title = "Some Title";
+
+UpgradePack upgradePack = new UpgradePack();
+
+// !!! set the groups directly; allow the logic in getGroups(Direction) to 
happen
+Field field = 

[05/14] ambari git commit: AMBARI-19067. Special characters break creating user homes (Laszlo Puskas via magyari_sandor)

2016-12-05 Thread jonathanhurley
AMBARI-19067. Special characters break creating user homes (Laszlo Puskas via 
magyari_sandor)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: cac20e090151785edf2b8176d9ac0bddb1adc86f
Parents: 7f6ca9d
Author: Laszlo Puskas 
Authored: Mon Dec 5 14:07:33 2016 +0100
Committer: Sandor Magyari 
Committed: Mon Dec 5 14:07:33 2016 +0100

--
 .../src/main/resources/scripts/post-user-creation-hook.sh | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/cac20e09/ambari-server/src/main/resources/scripts/post-user-creation-hook.sh
--
diff --git 
a/ambari-server/src/main/resources/scripts/post-user-creation-hook.sh 
b/ambari-server/src/main/resources/scripts/post-user-creation-hook.sh
index 34169c1..ee8d2d1 100755
--- a/ambari-server/src/main/resources/scripts/post-user-creation-hook.sh
+++ b/ambari-server/src/main/resources/scripts/post-user-creation-hook.sh
@@ -84,6 +84,10 @@ echo "[" | cat > "$JSON_INPUT"
 while read -r LINE
 do
   USR_NAME=$(echo "$LINE" | awk -F, '{print $1}')
+  echo "Processing user name: $USR_NAME"
+
+  # encoding the username
+  USR_NAME=$(printf "%q" "$USR_NAME")
 
   cat <> "$JSON_INPUT"
 {
@@ -97,7 +101,10 @@ do
 EOF
 done <"$CSV_FILE"
 
+# deleting the last line
 sed -i '$ d' "$JSON_INPUT"
+
+# appending json closing elements to the end of the file
 echo $'}\n]' | cat >> "$JSON_INPUT"
 echo "Generating file $JSON_INPUT ... DONE."
 echo "Processing post user creation hook payload ... DONE."



[02/14] ambari git commit: AMBARI-19055 - Removing Tasks From host_role_command Causes Upgrades To Show As PENDING (jonathanhurley)

2016-12-05 Thread jonathanhurley
AMBARI-19055 - Removing Tasks From host_role_command Causes Upgrades To Show As 
PENDING (jonathanhurley)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 12a3cd87184167cadf3cd12eb9b3c9d67dd3907a
Parents: 5ec73bc
Author: Jonathan Hurley 
Authored: Sat Dec 3 08:35:12 2016 -0500
Committer: Jonathan Hurley 
Committed: Sat Dec 3 14:09:44 2016 -0500

--
 .../controller/internal/CalculatedStatus.java   | 52 +++-
 .../internal/RequestResourceProvider.java   | 34 -
 .../internal/StageResourceProvider.java |  2 +-
 .../ambari/server/topology/TopologyManager.java | 19 ++-
 .../internal/CalculatedStatusTest.java  | 31 
 .../internal/RequestResourceProviderTest.java   | 12 +++--
 6 files changed, 121 insertions(+), 29 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/12a3cd87/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CalculatedStatus.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CalculatedStatus.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CalculatedStatus.java
index 3a86aef..3c415df 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CalculatedStatus.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CalculatedStatus.java
@@ -53,6 +53,17 @@ public class CalculatedStatus {
*/
   private final double percent;
 
+  /**
+   * A status which represents a COMPLETED state at 0%
+   */
+  public static final CalculatedStatus COMPLETED = new 
CalculatedStatus(HostRoleStatus.COMPLETED,
+  HostRoleStatus.COMPLETED, 100.0);
+
+  /**
+   * A status which represents a PENDING state at 0%
+   */
+  public static final CalculatedStatus PENDING = new 
CalculatedStatus(HostRoleStatus.PENDING,
+  HostRoleStatus.PENDING, 0.0);
 
   // - Constructors --
 
@@ -79,12 +90,6 @@ public class CalculatedStatus {
 this.percent = percent;
   }
 
-  /**
-   * Static factory method to get Status that represents a Completed state
-   */
-  public static CalculatedStatus getCompletedStatus() {
-return new CalculatedStatus(HostRoleStatus.COMPLETED, 
HostRoleStatus.COMPLETED, 100.0);
-  }
 
   // - CalculatedStatus --
 
@@ -291,14 +296,25 @@ public class CalculatedStatus {
   }
 
   /**
-   * Calculates the overall status of an upgrade.
-   * @param stageDto  the map of stage-to-summary value objects
-   * @param stageIds  the stage ids to consider from the value objects
+   * Calculates the overall status of an upgrade. If there are no tasks, then a
+   * status of {@link HostRoleStatus#COMPLETED} is returned.
+   *
+   * @param stageDto
+   *  the map of stage-to-summary value objects
+   * @param stageIds
+   *  the stage ids to consider from the value objects
* @return the calculated status
*/
   public static CalculatedStatus statusFromStageSummary(Map stageDto,
   Set stageIds) {
 
+// if either are empty, then we have no tasks and therefore no status - we
+// should return COMPLETED. This can happen if someone removes all tasks 
but
+// leaves the stages and request
+if (stageDto.isEmpty() || stageIds.isEmpty()) {
+  return COMPLETED;
+}
+
 Collection stageStatuses = new HashSet<>();
 Collection stageDisplayStatuses = new HashSet<>();
 Collection taskStatuses = new ArrayList<>();
@@ -378,19 +394,28 @@ public class CalculatedStatus {
*/
   public static HostRoleStatus 
calculateSummaryStatusOfStage(Map counters,
   int total, boolean skippable) {
+
+// when there are 0 tasks, return COMPLETED
+if (total == 0) {
+  return HostRoleStatus.COMPLETED;
+}
+
 if (counters.get(HostRoleStatus.PENDING) == total) {
   return HostRoleStatus.PENDING;
 }
+
 // By definition, any tasks in a future stage must be held in a PENDING 
status.
 if (counters.get(HostRoleStatus.HOLDING) > 0 || 
counters.get(HostRoleStatus.HOLDING_FAILED) > 0 || 
counters.get(HostRoleStatus.HOLDING_TIMEDOUT) > 0) {
   return counters.get(HostRoleStatus.HOLDING) > 0 ? HostRoleStatus.HOLDING 
:
   counters.get(HostRoleStatus.HOLDING_FAILED) > 0 ? 
HostRoleStatus.HOLDING_FAILED :
   

[08/14] ambari git commit: AMBARI-19059 Falcon quicklinks combobox is absent (dsen)

2016-12-05 Thread jonathanhurley
AMBARI-19059 Falcon quicklinks combobox is absent (dsen)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 431d2659c67f7c07fe704b67eded4f83fe30d25a
Parents: 89b9cf5
Author: Dmytro Sen 
Authored: Mon Dec 5 17:25:35 2016 +0200
Committer: Dmytro Sen 
Committed: Mon Dec 5 17:25:35 2016 +0200

--
 .../FALCON/0.5.0.2.1/metainfo.xml   |  7 
 .../FALCON/0.5.0.2.1/quicklinks/quicklinks.json | 35 
 2 files changed, 42 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/431d2659/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/metainfo.xml
 
b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/metainfo.xml
index 7dab615..2cda70a 100644
--- 
a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/metainfo.xml
+++ 
b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/metainfo.xml
@@ -131,6 +131,13 @@
   
 oozie-site
   
+
+  
+
+  quicklinks.json
+  true
+
+  
 
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/431d2659/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/quicklinks/quicklinks.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/quicklinks/quicklinks.json
 
b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/quicklinks/quicklinks.json
new file mode 100644
index 000..cc81fca
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/quicklinks/quicklinks.json
@@ -0,0 +1,35 @@
+{
+  "name": "default",
+  "description": "default quick links configuration",
+  "configuration": {
+"protocol":
+{
+  "type":"https",
+  "checks":[
+{
+  "property":"falcon.enableTLS",
+  "desired":"true",
+  "site":"falcon-startup-properties"
+}
+  ]
+},
+
+"links": [
+  {
+"name": "falcon_dashboard",
+"label": "Falcon Dashboard",
+"requires_user_name": "true",
+"component_name": "FALCON_SERVER",
+"url": "%@://%@:%@/",
+"port":{
+  "http_property": "falcon_port",
+  "http_default_port": "15000",
+  "https_property": "falcon_port",
+  "https_default_port": "15443",
+  "regex": "^(\\d+)$",
+  "site": "falcon-env"
+}
+  }
+]
+  }
+}
\ No newline at end of file



[13/14] ambari git commit: AMBARI-19036. Add default roles to auto created views. (Ashwin Rajeev via dipayanb)

2016-12-05 Thread jonathanhurley
AMBARI-19036. Add default roles to auto created views. (Ashwin Rajeev via 
dipayanb)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 8fbc2718e65a3771a6af9acc48f1b06d13c32bd4
Parents: b2d2ef1
Author: Dipayan Bhowmick 
Authored: Tue Dec 6 01:01:43 2016 +0530
Committer: Dipayan Bhowmick 
Committed: Tue Dec 6 01:03:08 2016 +0530

--
 .../src/main/resources/view.xml | 23 +++-
 contrib/views/files/src/main/resources/view.xml |  7 ++
 .../views/hive-next/src/main/resources/view.xml |  7 ++
 contrib/views/tez/src/main/resources/view.xml   |  7 ++
 4 files changed, 34 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8fbc2718/contrib/views/capacity-scheduler/src/main/resources/view.xml
--
diff --git a/contrib/views/capacity-scheduler/src/main/resources/view.xml 
b/contrib/views/capacity-scheduler/src/main/resources/view.xml
index 84a9ee0..cba243c 100644
--- a/contrib/views/capacity-scheduler/src/main/resources/view.xml
+++ b/contrib/views/capacity-scheduler/src/main/resources/view.xml
@@ -23,19 +23,22 @@
 2.1.*
 AMBARI-ONLY
 
-  
-  scheduler
-  
org.apache.ambari.view.capacityscheduler.CapacitySchedulerService
+
+scheduler
+
org.apache.ambari.view.capacityscheduler.CapacitySchedulerService
 
 
 
-  AUTO_CS_INSTANCE
-  YARN Queue Manager
-  Manage YARN Capacity Scheduler Queues
-  HDP-2.*
-  
-YARN
-  
+AUTO_CS_INSTANCE
+YARN Queue Manager
+Manage YARN Capacity Scheduler Queues
+HDP-2.*
+
+YARN
+
+
+CLUSTER.ADMINISTRATOR
+
 
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/8fbc2718/contrib/views/files/src/main/resources/view.xml
--
diff --git a/contrib/views/files/src/main/resources/view.xml 
b/contrib/views/files/src/main/resources/view.xml
index d6b2fde..640cee9 100644
--- a/contrib/views/files/src/main/resources/view.xml
+++ b/contrib/views/files/src/main/resources/view.xml
@@ -155,5 +155,12 @@
 
   HDFS
 
+
+CLUSTER.ADMINISTRATOR
+CLUSTER.OPERATOR
+SERVICE.ADMINISTRATOR
+SERVICE.OPERATOR
+CLUSTER.USER
+
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/8fbc2718/contrib/views/hive-next/src/main/resources/view.xml
--
diff --git a/contrib/views/hive-next/src/main/resources/view.xml 
b/contrib/views/hive-next/src/main/resources/view.xml
index 02e632c..1107cd1 100644
--- a/contrib/views/hive-next/src/main/resources/view.xml
+++ b/contrib/views/hive-next/src/main/resources/view.xml
@@ -337,5 +337,12 @@
 
 HIVE
 
+
+CLUSTER.ADMINISTRATOR
+CLUSTER.OPERATOR
+SERVICE.ADMINISTRATOR
+SERVICE.OPERATOR
+CLUSTER.USER
+
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/8fbc2718/contrib/views/tez/src/main/resources/view.xml
--
diff --git a/contrib/views/tez/src/main/resources/view.xml 
b/contrib/views/tez/src/main/resources/view.xml
index 2bb2bb0..41ffdbc 100644
--- a/contrib/views/tez/src/main/resources/view.xml
+++ b/contrib/views/tez/src/main/resources/view.xml
@@ -91,5 +91,12 @@ limitations under the License. Kerberos, LDAP, Custom. 
Binary/Htt
 
   TEZ
 
+
+  CLUSTER.ADMINISTRATOR
+  CLUSTER.OPERATOR
+  SERVICE.ADMINISTRATOR
+  SERVICE.OPERATOR
+  CLUSTER.USER
+
   
 



[11/14] ambari git commit: AMBARI-18065. Change Ranger Admin start script to setup db for ranger (magyari_sandor)

2016-12-05 Thread jonathanhurley
AMBARI-18065. Change Ranger Admin start script to setup db for ranger 
(magyari_sandor)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: f5051dcb7f17f0e26fed9e70eef35a3758a35e60
Parents: 431d265
Author: Sandor Magyari 
Authored: Thu Dec 1 19:36:01 2016 +0100
Committer: Sandor Magyari 
Committed: Mon Dec 5 16:39:13 2016 +0100

--
 .../libraries/functions/constants.py|   1 +
 .../RANGER/0.4.0/package/scripts/params.py  |   1 +
 .../0.4.0/package/scripts/ranger_admin.py   |  36 +-
 .../HDP/2.0.6/properties/stack_features.json|   5 +
 .../stacks/2.6/RANGER/test_ranger_admin.py  | 504 
 .../2.6/configs/ranger-admin-default.json   | 704 +
 .../2.6/configs/ranger-admin-secured.json   | 773 +++
 7 files changed, 2010 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f5051dcb/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
index 3431495..46562e0 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
@@ -97,6 +97,7 @@ class StackFeature:
   RANGER_PID_SUPPORT = "ranger_pid_support"
   RANGER_KMS_PID_SUPPORT = "ranger_kms_pid_support"
   RANGER_ADMIN_PASSWD_CHANGE = "ranger_admin_password_change"
+  RANGER_SETUP_DB_ON_START = "ranger_setup_db_on_start"
   STORM_METRICS_APACHE_CLASSES = "storm_metrics_apache_classes"
   SPARK_JAVA_OPTS_SUPPORT = "spark_java_opts_support"
   ATLAS_HBASE_SETUP = "atlas_hbase_setup"

http://git-wip-us.apache.org/repos/asf/ambari/blob/f5051dcb/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
index e27b363..f2cc940 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
@@ -70,6 +70,7 @@ stack_supports_usersync_passwd = 
check_stack_feature(StackFeature.RANGER_USERSYN
 stack_supports_infra_client = 
check_stack_feature(StackFeature.RANGER_INSTALL_INFRA_CLIENT, 
version_for_stack_feature_checks)
 stack_supports_pid = check_stack_feature(StackFeature.RANGER_PID_SUPPORT, 
version_for_stack_feature_checks)
 stack_supports_ranger_admin_password_change = 
check_stack_feature(StackFeature.RANGER_ADMIN_PASSWD_CHANGE, 
version_for_stack_feature_checks)
+stack_supports_ranger_setup_db_on_start = 
check_stack_feature(StackFeature.RANGER_SETUP_DB_ON_START, 
version_for_stack_feature_checks)
 
 downgrade_from_version = default("/commandParams/downgrade_from_version", None)
 upgrade_direction = default("/commandParams/upgrade_direction", None)

http://git-wip-us.apache.org/repos/asf/ambari/blob/f5051dcb/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
index a9656c7..b849d58 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
@@ -45,18 +45,9 @@ class RangerAdmin(Script):
 self.install_packages(env)
 import params
 env.set_params(params)
-if params.xml_configurations_supported:
-  from setup_ranger_xml import setup_ranger_db
-  setup_ranger_db()
-
-self.configure(env)
-
-if params.xml_configurations_supported:
-  from setup_ranger_xml import setup_java_patch
-  setup_java_patch()
-
-if params.stack_supports_ranger_admin_password_change:
-  setup_ranger_admin_passwd_change()
+# call config and setup db only in case of HDP version < 2.6
+if not 

[14/14] ambari git commit: Merge branch 'trunk' into branch-feature-AMBARI-18456

2016-12-05 Thread jonathanhurley
Merge branch 'trunk' into branch-feature-AMBARI-18456


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 803f44ba5f7411d9421b44dbacaa48f81ce3edc6
Parents: 3bbe75c 8fbc271
Author: Jonathan Hurley 
Authored: Mon Dec 5 15:21:25 2016 -0500
Committer: Jonathan Hurley 
Committed: Mon Dec 5 15:21:25 2016 -0500

--
 .../libraries/functions/constants.py|   1 +
 .../libraries/functions/setup_atlas_hook.py |  47 +-
 .../BlueprintConfigurationProcessor.java|   3 +-
 .../ambari/server/topology/TopologyManager.java |  19 +-
 .../server/upgrade/UpgradeCatalog250.java   |  30 +
 .../src/main/python/ambari_server_main.py   |   8 +-
 .../0.5.0.2.1/configuration/falcon-env.xml  |  17 +
 .../FALCON/0.5.0.2.1/metainfo.xml   |   7 +
 .../FALCON/0.5.0.2.1/package/scripts/falcon.py  |   2 +-
 .../0.5.0.2.1/package/scripts/params_linux.py   |   5 +-
 .../FALCON/0.5.0.2.1/quicklinks/quicklinks.json |  35 +
 .../HIVE/0.12.0.2.0/configuration/hive-env.xml  |  17 +
 .../HIVE/0.12.0.2.0/package/scripts/hcat.py |   2 +-
 .../HIVE/0.12.0.2.0/package/scripts/hive.py |   2 +-
 .../0.12.0.2.0/package/scripts/params_linux.py  |   5 +-
 .../HIVE/0.12.0.2.0/package/scripts/webhcat.py  |   2 +-
 .../RANGER/0.4.0/package/scripts/params.py  |   1 +
 .../0.4.0/package/scripts/ranger_admin.py   |  36 +-
 .../SQOOP/1.4.4.2.0/configuration/sqoop-env.xml |  17 +
 .../1.4.4.2.0/configuration/sqoop-site.xml  |   6 +
 .../1.4.4.2.0/package/scripts/params_linux.py   |   5 +-
 .../SQOOP/1.4.4.2.0/package/scripts/sqoop.py|   2 +-
 .../STORM/0.10.0/configuration/storm-env.xml|  17 +
 .../STORM/0.9.1/package/scripts/params_linux.py |   6 +-
 .../STORM/0.9.1/package/scripts/storm.py|   2 +-
 .../scripts/post-user-creation-hook.sh  |   7 +
 .../HDP/2.0.6/properties/stack_features.json|   5 +
 .../services/HIVE/configuration/hive-site.xml   |   4 +
 .../services/STORM/configuration/storm-site.xml |   4 +
 .../stacks/HDP/2.3/services/stack_advisor.py|  57 +-
 .../stacks/HDP/2.5/services/stack_advisor.py|   6 -
 .../BlueprintConfigurationProcessorTest.java|  11 +
 .../server/upgrade/UpgradeCatalog250Test.java   |  93 +++
 .../stacks/2.3/common/test_stack_advisor.py |  28 +-
 .../stacks/2.6/RANGER/test_ranger_admin.py  | 504 
 .../2.6/configs/ranger-admin-default.json   | 704 +
 .../2.6/configs/ranger-admin-secured.json   | 773 +++
 ambari-web/app/styles/wizard.less   |   6 +-
 .../common/configs/notifications_configs.hbs|   2 +-
 ambari-web/app/templates/wizard/step1.hbs   |   2 +-
 .../notification_configs_view.js|  18 +-
 .../configs/service_configs_by_category_view.js |   9 +-
 ambari-web/app/views/wizard/step1_view.js   |  21 +-
 .../widgets/slider_config_widget_view_test.js   |  23 -
 .../test/views/main/dashboard/widgets_test.js   |   2 +-
 contrib/utils/perf/deploy-gce-perf-cluster.py   |  10 +-
 .../src/main/resources/view.xml |  23 +-
 contrib/views/files/src/main/resources/view.xml |   7 +
 .../views/hive-next/src/main/resources/view.xml |   7 +
 contrib/views/tez/src/main/resources/view.xml   |   7 +
 50 files changed, 2502 insertions(+), 125 deletions(-)
--




[06/14] ambari git commit: AMBARI-19058. Perf: Deploy 3000 Agent cluster and find perf bugs. Part 1.(vbrodetskyi)

2016-12-05 Thread jonathanhurley
AMBARI-19058. Perf: Deploy 3000 Agent cluster and find perf bugs. Part 
1.(vbrodetskyi)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 08342b3cb268481e5033c99cbf418f123e509327
Parents: cac20e0
Author: Vitaly Brodetskyi 
Authored: Mon Dec 5 15:12:32 2016 +0200
Committer: Vitaly Brodetskyi 
Committed: Mon Dec 5 15:12:32 2016 +0200

--
 contrib/utils/perf/deploy-gce-perf-cluster.py | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/08342b3c/contrib/utils/perf/deploy-gce-perf-cluster.py
--
diff --git a/contrib/utils/perf/deploy-gce-perf-cluster.py 
b/contrib/utils/perf/deploy-gce-perf-cluster.py
index 4737c6f..6de3938 100644
--- a/contrib/utils/perf/deploy-gce-perf-cluster.py
+++ b/contrib/utils/perf/deploy-gce-perf-cluster.py
@@ -28,7 +28,7 @@ import re
 import socket
 
 cluster_prefix = "perf"
-ambari_repo_file_url = 
"http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/2.x/latest/trunk/ambaribn.repo;
+ambari_repo_file_url = 
"http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/2.x/updates/2.5.0.0/ambaribn.repo;
 
 public_hostname_script = "foo"
 hostname_script = "foo"
@@ -285,8 +285,8 @@ def create_vms(args, number_of_nodes):
   time.sleep(10)
 
   # trying to create cluster with needed params
-  print "Creating agent VMs {0}-agent-{1} with {2} large nodes on 
centos6...".format(cluster_prefix, args.cluster_suffix, str(number_of_nodes))
-  execute_command(args, args.controller, "/usr/sbin/gce up {0}-agent-{1} {2} 
--centos6 --large".format(cluster_prefix, args.cluster_suffix, 
str(number_of_nodes)),
+  print "Creating agent VMs {0}-agent-{1} with {2} xlarge nodes on 
centos6...".format(cluster_prefix, args.cluster_suffix, str(number_of_nodes))
+  execute_command(args, args.controller, "/usr/sbin/gce up {0}-agent-{1} {2} 
--centos6 --xlarge".format(cluster_prefix, args.cluster_suffix, 
str(number_of_nodes)),
   "Failed to create cluster VMs, probably not enough 
resources!", "-tt")
 
   # VMs are not accessible immediately
@@ -331,7 +331,7 @@ def create_server_script(server_host_name):
   contents = "#!/bin/bash\n" + \
   "wget -O /etc/yum.repos.d/ambari.repo {0}\n".format(ambari_repo_file_url) + \
   "yum clean all; yum install git ambari-server -y\n" + \
-  "mkdir /home ; cd /home ; git clone https://github.com/apache/ambari.git\n; 
+ \
+  "mkdir /home ; cd /home ; git clone https://github.com/apache/ambari.git ; 
cd ambari ; git checkout branch-2.5\n" + \
   "cp -r /home/ambari/ambari-server/src/main/resources/stacks/PERF 
/var/lib/ambari-server/resources/stacks/PERF\n" + \
   "cp -r /home/ambari/ambari-server/src/main/resources/stacks/PERF 
/var/lib/ambari-agent/cache/stacks/PERF\n" + \
   "\n" + \
@@ -384,7 +384,7 @@ def create_agent_script(server_host_name):
   contents = "#!/bin/bash\n" + \
   "wget -O /etc/yum.repos.d/ambari.repo {0}\n".format(ambari_repo_file_url) + \
   "yum clean all; yum install git ambari-agent -y\n" + \
-  "mkdir /home ; cd /home; git clone https://github.com/apache/ambari.git\n; + 
\
+  "mkdir /home ; cd /home; git clone https://github.com/apache/ambari.git ; cd 
ambari ; git checkout branch-2.5\n" + \
   "cp -r /home/ambari/ambari-server/src/main/resources/stacks/PERF 
/var/lib/ambari-agent/cache/stacks/PERF\n" + \
   "sed -i -e 's/hostname=localhost/hostname={0}/g' 
/etc/ambari-agent/conf/ambari-agent.ini\n".format(server_host_name) + \
   "sed -i -e 
's/agent]/agent]\\nhostname_script={0}\\npublic_hostname_script={1}\\n/1' 
/etc/ambari-agent/conf/ambari-agent.ini\n".format(hostname_script, 
public_hostname_script) + \



[12/14] ambari git commit: AMBARI-19084. Custom property added to the Notification settings appears twice (onechiporenko)

2016-12-05 Thread jonathanhurley
AMBARI-19084. Custom property added to the Notification settings appears twice 
(onechiporenko)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: b2d2ef1689d5434c20d6a791ace598f58742605a
Parents: f5051dc
Author: Oleg Nechiporenko 
Authored: Mon Dec 5 17:08:41 2016 +0200
Committer: Oleg Nechiporenko 
Committed: Mon Dec 5 18:05:42 2016 +0200

--
 .../common/configs/notifications_configs.hbs  |  2 +-
 .../notification_configs_view.js  | 18 ++
 .../configs/service_configs_by_category_view.js   |  9 -
 3 files changed, 23 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b2d2ef16/ambari-web/app/templates/common/configs/notifications_configs.hbs
--
diff --git a/ambari-web/app/templates/common/configs/notifications_configs.hbs 
b/ambari-web/app/templates/common/configs/notifications_configs.hbs
index ca2c208..2dd71aa 100644
--- a/ambari-web/app/templates/common/configs/notifications_configs.hbs
+++ b/ambari-web/app/templates/common/configs/notifications_configs.hbs
@@ -20,7 +20,7 @@
   
 
   
-  {{view.category.displayName}}
+  {{view.category.displayName}}
 
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b2d2ef16/ambari-web/app/views/common/configs/custom_category_views/notification_configs_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/custom_category_views/notification_configs_view.js
 
b/ambari-web/app/views/common/configs/custom_category_views/notification_configs_view.js
index 9ad8762..d299b5f 100644
--- 
a/ambari-web/app/views/common/configs/custom_category_views/notification_configs_view.js
+++ 
b/ambari-web/app/views/common/configs/custom_category_views/notification_configs_view.js
@@ -62,8 +62,8 @@ App.NotificationsConfigsView = 
App.ServiceConfigsByCategoryView.extend({
 if (!this.get('categoryConfigsAll.length')) return;
 this.set('createNotification', 
this.get('categoryConfigsAll').findProperty('name', 
'create_notification').get('value'));
 this.set('tlsOrSsl', this.get('categoryConfigsAll').findProperty('name', 
'mail.smtp.starttls.enable').get('value') ? 'tls' : 'ssl');
-var smtp_use_auth = this.get('categoryConfigsAll').findProperty('name', 
'smtp_use_auth');
-smtp_use_auth.set('value', Boolean(smtp_use_auth.get('value') === 'true'));
+var smtpUseAuth = this.get('categoryConfigsAll').findProperty('name', 
'smtp_use_auth');
+smtpUseAuth.set('value', Boolean(smtpUseAuth.get('value') === 'true'));
 this.updateCategoryConfigs();
   },
 
@@ -74,8 +74,8 @@ App.NotificationsConfigsView = 
App.ServiceConfigsByCategoryView.extend({
*/
   onTlsOrSslChanged: function () {
 var tlsOrSsl = this.get('tlsOrSsl');
-this.get('categoryConfigsAll').findProperty('name', 
'mail.smtp.starttls.enable').set('value', tlsOrSsl == 'tls');
-this.get('categoryConfigsAll').findProperty('name', 
'mail.smtp.startssl.enable').set('value', tlsOrSsl == 'ssl');
+this.get('categoryConfigsAll').findProperty('name', 
'mail.smtp.starttls.enable').set('value', tlsOrSsl === 'tls');
+this.get('categoryConfigsAll').findProperty('name', 
'mail.smtp.startssl.enable').set('value', tlsOrSsl === 'ssl');
   }.observes('tlsOrSsl'),
 
   /**
@@ -122,6 +122,16 @@ App.NotificationsConfigsView = 
App.ServiceConfigsByCategoryView.extend({
   updateConfig: function (config, flag) {
 config.set('isRequired', flag);
 config.set('isEditable', flag);
+  },
+
+  /**
+   * No sense to store config to serviceConfigs and 
categoryConfigsAll because
+   * categoryConfigsAll is a subset of serviceConfigs
+   *
+   * @override
+   */
+  _appendConfigToCollection: function (serviceConfigProperty) {
+this.get('serviceConfigs').pushObject(serviceConfigProperty);
   }
 
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/b2d2ef16/ambari-web/app/views/common/configs/service_configs_by_category_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/service_configs_by_category_view.js 
b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
index dfcd5df..16258cf 100644
--- a/ambari-web/app/views/common/configs/service_configs_by_category_view.js
+++ b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
@@ -439,7 +439,14 @@ App.ServiceConfigsByCategoryView = 

[03/14] ambari git commit: AMBARI-19007 Atlas to support configuration of hooks from separate cluster (mugdha)

2016-12-05 Thread jonathanhurley
AMBARI-19007 Atlas to support configuration of hooks from separate cluster 
(mugdha)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 8ad494e97302d5da69224c7ce9e493d5f20797c1
Parents: 12a3cd8
Author: Mugdha Varadkar 
Authored: Fri Dec 2 18:15:39 2016 +0530
Committer: Mugdha Varadkar 
Committed: Mon Dec 5 10:13:09 2016 +0530

--
 .../libraries/functions/setup_atlas_hook.py | 47 +-
 .../BlueprintConfigurationProcessor.java|  3 +-
 .../server/upgrade/UpgradeCatalog250.java   | 30 +++
 .../0.5.0.2.1/configuration/falcon-env.xml  | 17 
 .../FALCON/0.5.0.2.1/package/scripts/falcon.py  |  2 +-
 .../0.5.0.2.1/package/scripts/params_linux.py   |  5 +-
 .../HIVE/0.12.0.2.0/configuration/hive-env.xml  | 17 
 .../HIVE/0.12.0.2.0/package/scripts/hcat.py |  2 +-
 .../HIVE/0.12.0.2.0/package/scripts/hive.py |  2 +-
 .../0.12.0.2.0/package/scripts/params_linux.py  |  5 +-
 .../HIVE/0.12.0.2.0/package/scripts/webhcat.py  |  2 +-
 .../SQOOP/1.4.4.2.0/configuration/sqoop-env.xml | 17 
 .../1.4.4.2.0/configuration/sqoop-site.xml  |  6 ++
 .../1.4.4.2.0/package/scripts/params_linux.py   |  5 +-
 .../SQOOP/1.4.4.2.0/package/scripts/sqoop.py|  2 +-
 .../STORM/0.10.0/configuration/storm-env.xml| 17 
 .../STORM/0.9.1/package/scripts/params_linux.py |  6 +-
 .../STORM/0.9.1/package/scripts/storm.py|  2 +-
 .../services/HIVE/configuration/hive-site.xml   |  4 +
 .../services/STORM/configuration/storm-site.xml |  4 +
 .../stacks/HDP/2.3/services/stack_advisor.py| 57 +++-
 .../stacks/HDP/2.5/services/stack_advisor.py|  6 --
 .../BlueprintConfigurationProcessorTest.java| 11 +++
 .../server/upgrade/UpgradeCatalog250Test.java   | 93 
 .../stacks/2.3/common/test_stack_advisor.py | 28 +-
 25 files changed, 339 insertions(+), 51 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8ad494e9/ambari-common/src/main/python/resource_management/libraries/functions/setup_atlas_hook.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/setup_atlas_hook.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/setup_atlas_hook.py
index a1d2f95..eeae4bc 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/setup_atlas_hook.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/setup_atlas_hook.py
@@ -117,6 +117,8 @@ def setup_atlas_hook(service_name, service_props, 
atlas_hook_filepath, owner, gr
   """
   import params
   atlas_props = default('/configurations/application-properties', {})
+  merged_props = {}
+  merged_props.update(service_props)
 
   if has_atlas_in_cluster():
 # Take the subset
@@ -131,12 +133,12 @@ def setup_atlas_hook(service_name, service_props, 
atlas_hook_filepath, owner, gr
 
 merged_props.update(service_props)
 
-Logger.info(format("Generating Atlas Hook config file 
{atlas_hook_filepath}"))
-PropertiesFile(atlas_hook_filepath,
-   properties = merged_props,
-   owner = owner,
-   group = group,
-   mode = 0644)
+  Logger.info(format("Generating Atlas Hook config file 
{atlas_hook_filepath}"))
+  PropertiesFile(atlas_hook_filepath,
+   properties = merged_props,
+   owner = owner,
+   group = group,
+   mode = 0644)
 
 
 def setup_atlas_jar_symlinks(hook_name, jar_source_dir):
@@ -157,22 +159,23 @@ def setup_atlas_jar_symlinks(hook_name, jar_source_dir):
   """
   import params
 
-  if has_atlas_in_cluster():
-atlas_home_dir = os.environ['METADATA_HOME_DIR'] if 'METADATA_HOME_DIR' in 
os.environ \
-  else format("{stack_root}/current/atlas-server")
-
-# Will only exist if this host contains Atlas Server
-atlas_hook_dir = os.path.join(atlas_home_dir, "hook", hook_name)
-if os.path.exists(atlas_hook_dir):
-  Logger.info("Atlas Server is present on this host, will symlink jars 
inside of %s to %s if not already done." %
-  (jar_source_dir, atlas_hook_dir))
-
-  src_files = os.listdir(atlas_hook_dir)
-  for file_name in src_files:
-atlas_hook_file_name = os.path.join(atlas_hook_dir, file_name)
-source_lib_file_name = os.path.join(jar_source_dir, file_name)
-if os.path.isfile(atlas_hook_file_name):
-  Link(source_lib_file_name, to=atlas_hook_file_name)
+  atlas_home_dir = 

[04/14] ambari git commit: AMBARI-19081. JS error on "User RedHat Satellite" click on step1 installer (onechiporenko)

2016-12-05 Thread jonathanhurley
AMBARI-19081. JS error on "User RedHat Satellite" click on step1 installer 
(onechiporenko)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 7f6ca9d07b2f2e389d9e887853238ca3969d99ce
Parents: 8ad494e
Author: Oleg Nechiporenko 
Authored: Mon Dec 5 13:29:05 2016 +0200
Committer: Oleg Nechiporenko 
Committed: Mon Dec 5 13:29:05 2016 +0200

--
 ambari-web/app/styles/wizard.less   |  6 -
 ambari-web/app/templates/wizard/step1.hbs   |  2 +-
 ambari-web/app/views/wizard/step1_view.js   | 21 +-
 .../widgets/slider_config_widget_view_test.js   | 23 
 .../test/views/main/dashboard/widgets_test.js   |  2 +-
 5 files changed, 18 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7f6ca9d0/ambari-web/app/styles/wizard.less
--
diff --git a/ambari-web/app/styles/wizard.less 
b/ambari-web/app/styles/wizard.less
index a4dac8c..57dae45 100644
--- a/ambari-web/app/styles/wizard.less
+++ b/ambari-web/app/styles/wizard.less
@@ -554,6 +554,11 @@
   }
 }
   }
+  .inner-table {
+td {
+  vertical-align: middle;
+}
+  }
   .repos-panel {
 .remove-icon {
   color: red;
@@ -567,7 +572,6 @@
 }
 .repo-url input {
   width: 90%;
-  height: 24px;
 }
 #skip-validation, #use-redhat {
   span.disabled {

http://git-wip-us.apache.org/repos/asf/ambari/blob/7f6ca9d0/ambari-web/app/templates/wizard/step1.hbs
--
diff --git a/ambari-web/app/templates/wizard/step1.hbs 
b/ambari-web/app/templates/wizard/step1.hbs
index 5297d12..8179b41 100644
--- a/ambari-web/app/templates/wizard/step1.hbs
+++ b/ambari-web/app/templates/wizard/step1.hbs
@@ -144,7 +144,7 @@
 {{view view.popoverView 
repositoryBinding="repository"}}
   
   
-
+
   {{view Ember.TextField 
placeholderBinding="repository.placeholder" valueBinding="repository.baseUrl" 
disabledBinding="controller.selectedStack.useRedhatSatellite" 
classNames="form-control"}}
   {{#if 
controller.selectedStack.usePublicRepo}}
 http://git-wip-us.apache.org/repos/asf/ambari/blob/7f6ca9d0/ambari-web/app/views/wizard/step1_view.js
--
diff --git a/ambari-web/app/views/wizard/step1_view.js 
b/ambari-web/app/views/wizard/step1_view.js
index d5cbbb5..161d794 100644
--- a/ambari-web/app/views/wizard/step1_view.js
+++ b/ambari-web/app/views/wizard/step1_view.js
@@ -226,17 +226,18 @@ App.WizardStep1View = Em.View.extend({
 checkedBinding: 'controller.selectedStack.useRedhatSatellite',
 disabledBinding: 'controller.selectedStack.usePublicRepo',
 click: function () {
-  // click triggered before value is toggled, so if-statement is inverted
-  if (this.get('disabled')) return;
-  if (!this.get('controller.selectedStack.useRedhatSatellite')) {
-App.ModalPopup.show({
-  header: Em.I18n.t('common.important'),
-  secondary: false,
-  bodyClass: Ember.View.extend({
-template: 
Ember.Handlebars.compile(Em.I18n.t('installer.step1.advancedRepo.useRedhatSatellite.warning'))
-  })
-});
+  if (!this.get('disabled')) {
+this.toggleProperty('controller.selectedStack.useRedhatSatellite');
+if (this.get('controller.selectedStack.useRedhatSatellite')) {
+  App.ModalPopup.show({
+header: Em.I18n.t('common.important'),
+encodeBody: false,
+secondary: false,
+body: 
Em.I18n.t('installer.step1.advancedRepo.useRedhatSatellite.warning')
+  });
+}
   }
+  return false;
 }
   }),
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/7f6ca9d0/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 a6b25ce..5cc055c 100644
--- 
a/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
+++ 

[07/14] ambari git commit: AMBARI-19083. After ambari only upgrade Enable security(Configure Ambari Identity) was failed because could not run "ambari-sudo.sh" (aonishuk)

2016-12-05 Thread jonathanhurley
AMBARI-19083. After ambari only upgrade Enable security(Configure Ambari 
Identity) was failed because could not run  "ambari-sudo.sh" (aonishuk)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 89b9cf5beb1304b0d90dad00b371947a3c467e8a
Parents: 08342b3
Author: Andrew Onishuk 
Authored: Mon Dec 5 15:23:58 2016 +0200
Committer: Andrew Onishuk 
Committed: Mon Dec 5 15:23:58 2016 +0200

--
 ambari-server/src/main/python/ambari_server_main.py | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/89b9cf5b/ambari-server/src/main/python/ambari_server_main.py
--
diff --git a/ambari-server/src/main/python/ambari_server_main.py 
b/ambari-server/src/main/python/ambari_server_main.py
index b642cea..dbcafa4 100644
--- a/ambari-server/src/main/python/ambari_server_main.py
+++ b/ambari-server/src/main/python/ambari_server_main.py
@@ -28,6 +28,7 @@ from ambari_commons.logging_utils import get_debug_mode, 
print_warning_msg, prin
 from ambari_commons.os_check import OSConst
 from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
 from ambari_commons.os_utils import is_root, run_os_command
+from ambari_server.ambariPath import AmbariPath
 from ambari_server.dbConfiguration import ensure_dbms_is_running, 
ensure_jdbc_driver_is_installed
 from ambari_server.serverConfiguration import configDefaults, find_jdk, 
get_ambari_properties, \
   get_conf_dir, get_is_persisted, get_is_secure, get_java_exe_path, 
get_original_master_key, read_ambari_user, \
@@ -121,6 +122,8 @@ AMBARI_SERVER_NOT_STARTED_MSG = "Ambari Server java process 
hasn't been started
 ULIMIT_OPEN_FILES_KEY = 'ulimit.open.files'
 ULIMIT_OPEN_FILES_DEFAULT = 1
 
+AMBARI_ENV_FILE = AmbariPath.get("/var/lib/ambari-server/ambari-env.sh")
+
 @OsFamilyFuncImpl(OSConst.WINSRV_FAMILY)
 def ensure_server_security_is_configured():
   pass
@@ -179,9 +182,10 @@ def generate_child_process_param_list(ambari_user, 
java_exe, class_path,
 # from subprocess, we have to skip --login option of su command. That's why
 # we change dir to / (otherwise subprocess can face with 'permission 
denied'
 # errors while trying to list current directory
-cmd = "{ulimit_cmd} ; {su} {ambari_user} -s {sh_shell} -c 
'{command}'".format(ulimit_cmd=ulimit_cmd, 
+cmd = "{ulimit_cmd} ; {su} {ambari_user} -s {sh_shell} -c 'source 
{ambari_env_file} ; {command}'".format(ulimit_cmd=ulimit_cmd,

 su=locate_file('su', '/bin'), ambari_user=ambari_user,
-   
 sh_shell=locate_file('sh', '/bin'), command=command)
+   
 sh_shell=locate_file('sh', '/bin'), command=command,
+   
 ambari_env_file=AMBARI_ENV_FILE)
   else:
 cmd = "{ulimit_cmd} ; {command}".format(ulimit_cmd=ulimit_cmd, 
command=command)
 



[10/14] ambari git commit: AMBARI-18065. Change Ranger Admin start script to setup db for ranger (magyari_sandor)

2016-12-05 Thread jonathanhurley
http://git-wip-us.apache.org/repos/asf/ambari/blob/f5051dcb/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-default.json
--
diff --git 
a/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-default.json 
b/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-default.json
new file mode 100644
index 000..1d5adff
--- /dev/null
+++ b/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-default.json
@@ -0,0 +1,704 @@
+{
+"localComponents": [
+"NAMENODE", 
+"SECONDARY_NAMENODE", 
+"ZOOKEEPER_SERVER", 
+"DATANODE", 
+"HDFS_CLIENT", 
+"ZOOKEEPER_CLIENT", 
+"RANGER_USERSYNC", 
+"RANGER_ADMIN", 
+"RANGER_TAGSYNC",
+"LOGSEARCH_SOLR",
+"LOGSEARCH_SOLR_CLIENT"
+], 
+"configuration_attributes": {
+"ranger-hdfs-audit": {}, 
+"ssl-client": {}, 
+"ranger-admin-site": {}, 
+"ranger-hdfs-policymgr-ssl": {}, 
+"tagsync-application-properties": {}, 
+"ranger-env": {}, 
+"usersync-log4j": {}, 
+"admin-properties": {}, 
+"ranger-ugsync-site": {}, 
+"hdfs-site": {
+"final": {
+"dfs.datanode.data.dir": "true", 
+"dfs.namenode.http-address": "true", 
+"dfs.datanode.failed.volumes.tolerated": "true", 
+"dfs.support.append": "true", 
+"dfs.namenode.name.dir": "true", 
+"dfs.webhdfs.enabled": "true"
+}
+}, 
+"ranger-tagsync-site": {}, 
+"zoo.cfg": {}, 
+"hadoop-policy": {}, 
+"hdfs-log4j": {}, 
+"ranger-hdfs-plugin-properties": {}, 
+"core-site": {
+"final": {
+"fs.defaultFS": "true"
+}
+}, 
+"hadoop-env": {}, 
+"zookeeper-log4j": {}, 
+"ssl-server": {}, 
+"ranger-site": {}, 
+"admin-log4j": {}, 
+"tagsync-log4j": {}, 
+"ranger-hdfs-security": {}, 
+"usersync-properties": {}, 
+"zookeeper-env": {},
+"infra-solr-env": {},
+"infra-solr-client-log4j": {},
+"cluster-env": {}
+}, 
+"public_hostname": "c6401.ambari.apache.org", 
+"commandId": "11-0", 
+"hostname": "c6401.ambari.apache.org", 
+"kerberosCommandParams": [], 
+"serviceName": "RANGER", 
+"role": "RANGER_ADMIN", 
+"forceRefreshConfigTagsBeforeExecution": [], 
+"requestId": 11, 
+"agentConfigParams": {
+"agent": {
+"parallel_execution": 0
+}
+}, 
+"clusterName": "c1", 
+"commandType": "EXECUTION_COMMAND", 
+"taskId": 31, 
+"roleParams": {}, 
+"configurationTags": {
+"ranger-hdfs-audit": {
+"tag": "version1466705299922"
+}, 
+"ssl-client": {
+"tag": "version1"
+}, 
+"ranger-admin-site": {
+"tag": "version1466705299949"
+}, 
+"ranger-hdfs-policymgr-ssl": {
+"tag": "version1466705299922"
+}, 
+"tagsync-application-properties": {
+"tag": "version1466705299949"
+}, 
+"ranger-env": {
+"tag": "version1466705299949"
+}, 
+"usersync-log4j": {
+"tag": "version1466705299949"
+}, 
+"admin-properties": {
+"tag": "version1466705299949"
+}, 
+"ranger-ugsync-site": {
+"tag": "version1466705299949"
+}, 
+"hdfs-site": {
+"tag": "version1"
+}, 
+"ranger-tagsync-site": {
+"tag": "version1466705299949"
+}, 
+"zoo.cfg": {
+"tag": "version1"
+}, 
+"hadoop-policy": {
+"tag": "version1"
+}, 
+"hdfs-log4j": {
+"tag": "version1"
+}, 
+"ranger-hdfs-plugin-properties": {
+"tag": "version1466705299922"
+}, 
+"core-site": {
+"tag": "version1"
+}, 
+"hadoop-env": {
+"tag": "version1"
+}, 
+"zookeeper-log4j": {
+"tag": "version1"
+}, 
+"ssl-server": {
+"tag": "version1"
+}, 
+"ranger-site": {
+"tag": "version1466705299949"
+}, 
+"admin-log4j": {
+"tag": "version1466705299949"
+}, 
+"tagsync-log4j": {
+"tag": "version1466705299949"
+}, 
+"ranger-hdfs-security": {
+"tag": "version1466705299922"
+}, 
+"usersync-properties": {
+"tag": "version1466705299949"
+}, 
+"zookeeper-env": {
+"tag": "version1"
+},
+"infra-solr-env": {
+"tag": "version1467098537360"
+},
+"infra-solr-client-log4j": {
+

[01/14] ambari git commit: Revert "AMBARI-19055 - Removing Tasks From host_role_command Causes Upgrades To Show As PENDING (jonathanhurley)"

2016-12-05 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-18456 3bbe75c3b -> 803f44ba5


Revert "AMBARI-19055 - Removing Tasks From host_role_command Causes Upgrades To 
Show As PENDING (jonathanhurley)"

This reverts commit 32840c1ed434ae4cc99e3ab6f7d3f2604fb69d06.


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 5ec73bce006a659f33c09c57cb50f28037eca5d7
Parents: 3096c79
Author: Jonathan Hurley 
Authored: Sat Dec 3 08:22:31 2016 -0500
Committer: Jonathan Hurley 
Committed: Sat Dec 3 08:22:31 2016 -0500

--
 .../controller/internal/CalculatedStatus.java   | 52 +---
 .../internal/RequestResourceProvider.java   | 34 +
 .../internal/StageResourceProvider.java |  2 +-
 .../internal/CalculatedStatusTest.java  | 31 
 .../internal/RequestResourceProviderTest.java   | 12 ++---
 5 files changed, 28 insertions(+), 103 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5ec73bce/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CalculatedStatus.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CalculatedStatus.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CalculatedStatus.java
index 3c415df..3a86aef 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CalculatedStatus.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CalculatedStatus.java
@@ -53,17 +53,6 @@ public class CalculatedStatus {
*/
   private final double percent;
 
-  /**
-   * A status which represents a COMPLETED state at 0%
-   */
-  public static final CalculatedStatus COMPLETED = new 
CalculatedStatus(HostRoleStatus.COMPLETED,
-  HostRoleStatus.COMPLETED, 100.0);
-
-  /**
-   * A status which represents a PENDING state at 0%
-   */
-  public static final CalculatedStatus PENDING = new 
CalculatedStatus(HostRoleStatus.PENDING,
-  HostRoleStatus.PENDING, 0.0);
 
   // - Constructors --
 
@@ -90,6 +79,12 @@ public class CalculatedStatus {
 this.percent = percent;
   }
 
+  /**
+   * Static factory method to get Status that represents a Completed state
+   */
+  public static CalculatedStatus getCompletedStatus() {
+return new CalculatedStatus(HostRoleStatus.COMPLETED, 
HostRoleStatus.COMPLETED, 100.0);
+  }
 
   // - CalculatedStatus --
 
@@ -296,25 +291,14 @@ public class CalculatedStatus {
   }
 
   /**
-   * Calculates the overall status of an upgrade. If there are no tasks, then a
-   * status of {@link HostRoleStatus#COMPLETED} is returned.
-   *
-   * @param stageDto
-   *  the map of stage-to-summary value objects
-   * @param stageIds
-   *  the stage ids to consider from the value objects
+   * Calculates the overall status of an upgrade.
+   * @param stageDto  the map of stage-to-summary value objects
+   * @param stageIds  the stage ids to consider from the value objects
* @return the calculated status
*/
   public static CalculatedStatus statusFromStageSummary(Map stageDto,
   Set stageIds) {
 
-// if either are empty, then we have no tasks and therefore no status - we
-// should return COMPLETED. This can happen if someone removes all tasks 
but
-// leaves the stages and request
-if (stageDto.isEmpty() || stageIds.isEmpty()) {
-  return COMPLETED;
-}
-
 Collection stageStatuses = new HashSet<>();
 Collection stageDisplayStatuses = new HashSet<>();
 Collection taskStatuses = new ArrayList<>();
@@ -394,28 +378,19 @@ public class CalculatedStatus {
*/
   public static HostRoleStatus 
calculateSummaryStatusOfStage(Map counters,
   int total, boolean skippable) {
-
-// when there are 0 tasks, return COMPLETED
-if (total == 0) {
-  return HostRoleStatus.COMPLETED;
-}
-
 if (counters.get(HostRoleStatus.PENDING) == total) {
   return HostRoleStatus.PENDING;
 }
-
 // By definition, any tasks in a future stage must be held in a PENDING 
status.
 if (counters.get(HostRoleStatus.HOLDING) > 0 || 
counters.get(HostRoleStatus.HOLDING_FAILED) > 0 || 
counters.get(HostRoleStatus.HOLDING_TIMEDOUT) > 0) {
   return counters.get(HostRoleStatus.HOLDING) > 0 ? HostRoleStatus.HOLDING 
:
 

[09/14] ambari git commit: AMBARI-18065. Change Ranger Admin start script to setup db for ranger (magyari_sandor)

2016-12-05 Thread jonathanhurley
http://git-wip-us.apache.org/repos/asf/ambari/blob/f5051dcb/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-secured.json
--
diff --git 
a/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-secured.json 
b/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-secured.json
new file mode 100644
index 000..030b717
--- /dev/null
+++ b/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-secured.json
@@ -0,0 +1,773 @@
+{
+"localComponents": [
+"SECONDARY_NAMENODE", 
+"HDFS_CLIENT", 
+"DATANODE", 
+"NAMENODE", 
+"RANGER_ADMIN", 
+"RANGER_TAGSYNC", 
+"RANGER_USERSYNC", 
+"ZOOKEEPER_SERVER", 
+"ZOOKEEPER_CLIENT", 
+"KERBEROS_CLIENT",
+"LOGSEARCH_SOLR",
+"LOGSEARCH_SOLR_CLIENT"
+], 
+"configuration_attributes": {
+"ranger-hdfs-audit": {}, 
+"ssl-client": {}, 
+"ranger-admin-site": {}, 
+"ranger-hdfs-policymgr-ssl": {}, 
+"tagsync-application-properties": {}, 
+"ranger-env": {}, 
+"usersync-log4j": {}, 
+"ranger-hdfs-plugin-properties": {}, 
+"kerberos-env": {}, 
+"admin-properties": {}, 
+"ranger-ugsync-site": {}, 
+"hdfs-site": {
+"final": {
+"dfs.datanode.data.dir": "true", 
+"dfs.namenode.http-address": "true", 
+"dfs.datanode.failed.volumes.tolerated": "true", 
+"dfs.support.append": "true", 
+"dfs.namenode.name.dir": "true", 
+"dfs.webhdfs.enabled": "true"
+}
+}, 
+"ranger-tagsync-site": {}, 
+"zoo.cfg": {}, 
+"hadoop-policy": {}, 
+"hdfs-log4j": {}, 
+"krb5-conf": {}, 
+"core-site": {
+"final": {
+"fs.defaultFS": "true"
+}
+}, 
+"hadoop-env": {}, 
+"zookeeper-log4j": {}, 
+"ssl-server": {}, 
+"ranger-site": {}, 
+"admin-log4j": {}, 
+"tagsync-log4j": {}, 
+"ranger-hdfs-security": {}, 
+"usersync-properties": {}, 
+"zookeeper-env": {},
+"infra-solr-env": {},
+"infra-solr-client-log4j": {},
+"cluster-env": {}
+}, 
+"public_hostname": "c6401.ambari.apache.org", 
+"commandId": "41-2", 
+"hostname": "c6401.ambari.apache.org", 
+"kerberosCommandParams": [], 
+"serviceName": "RANGER", 
+"role": "RANGER_ADMIN", 
+"forceRefreshConfigTagsBeforeExecution": [], 
+"requestId": 41, 
+"agentConfigParams": {
+"agent": {
+"parallel_execution": 0
+}
+}, 
+"clusterName": "test_Cluster01", 
+"commandType": "EXECUTION_COMMAND", 
+"taskId": 186, 
+"roleParams": {}, 
+"configurationTags": {
+"ranger-hdfs-audit": {
+"tag": "version1466705299922"
+}, 
+"ssl-client": {
+"tag": "version1"
+}, 
+"ranger-admin-site": {
+"tag": "version1467016680635"
+}, 
+"ranger-hdfs-policymgr-ssl": {
+"tag": "version1466705299922"
+}, 
+"tagsync-application-properties": {
+"tag": "version1467016680511"
+}, 
+"ranger-env": {
+"tag": "version1466705299949"
+}, 
+"ranger-ugsync-site": {
+"tag": "version1467016680537"
+}, 
+"ranger-hdfs-plugin-properties": {
+"tag": "version1466705299922"
+}, 
+"kerberos-env": {
+"tag": "version1467016537243"
+}, 
+"admin-properties": {
+"tag": "version1466705299949"
+}, 
+"hdfs-site": {
+"tag": "version1467016680401"
+}, 
+"ranger-tagsync-site": {
+"tag": "version1467016680586"
+}, 
+"zoo.cfg": {
+"tag": "version1"
+}, 
+"hadoop-policy": {
+"tag": "version1"
+}, 
+"hdfs-log4j": {
+"tag": "version1"
+}, 
+"usersync-log4j": {
+"tag": "version1466705299949"
+}, 
+"krb5-conf": {
+"tag": "version1467016537243"
+}, 
+"core-site": {
+"tag": "version1467016680612"
+}, 
+"hadoop-env": {
+"tag": "version1467016680446"
+}, 
+"zookeeper-log4j": {
+"tag": "version1"
+}, 
+"ssl-server": {
+"tag": "version1"
+}, 
+"ranger-site": {
+"tag": "version1466705299949"
+}, 
+"admin-log4j": {
+"tag": "version1466705299949"
+}, 
+"tagsync-log4j": {
+"tag": "version1466705299949"
+}, 
+"ranger-hdfs-security": {
+"tag": "version1466705299922"
+}, 

ambari git commit: AMBARI-19036. Add default roles to auto created views. (Ashwin Rajeev via dipayanb)

2016-12-05 Thread dbhowmick
Repository: ambari
Updated Branches:
  refs/heads/trunk b2d2ef168 -> 8fbc2718e


AMBARI-19036. Add default roles to auto created views. (Ashwin Rajeev via 
dipayanb)


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

Branch: refs/heads/trunk
Commit: 8fbc2718e65a3771a6af9acc48f1b06d13c32bd4
Parents: b2d2ef1
Author: Dipayan Bhowmick 
Authored: Tue Dec 6 01:01:43 2016 +0530
Committer: Dipayan Bhowmick 
Committed: Tue Dec 6 01:03:08 2016 +0530

--
 .../src/main/resources/view.xml | 23 +++-
 contrib/views/files/src/main/resources/view.xml |  7 ++
 .../views/hive-next/src/main/resources/view.xml |  7 ++
 contrib/views/tez/src/main/resources/view.xml   |  7 ++
 4 files changed, 34 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8fbc2718/contrib/views/capacity-scheduler/src/main/resources/view.xml
--
diff --git a/contrib/views/capacity-scheduler/src/main/resources/view.xml 
b/contrib/views/capacity-scheduler/src/main/resources/view.xml
index 84a9ee0..cba243c 100644
--- a/contrib/views/capacity-scheduler/src/main/resources/view.xml
+++ b/contrib/views/capacity-scheduler/src/main/resources/view.xml
@@ -23,19 +23,22 @@
 2.1.*
 AMBARI-ONLY
 
-  
-  scheduler
-  
org.apache.ambari.view.capacityscheduler.CapacitySchedulerService
+
+scheduler
+
org.apache.ambari.view.capacityscheduler.CapacitySchedulerService
 
 
 
-  AUTO_CS_INSTANCE
-  YARN Queue Manager
-  Manage YARN Capacity Scheduler Queues
-  HDP-2.*
-  
-YARN
-  
+AUTO_CS_INSTANCE
+YARN Queue Manager
+Manage YARN Capacity Scheduler Queues
+HDP-2.*
+
+YARN
+
+
+CLUSTER.ADMINISTRATOR
+
 
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/8fbc2718/contrib/views/files/src/main/resources/view.xml
--
diff --git a/contrib/views/files/src/main/resources/view.xml 
b/contrib/views/files/src/main/resources/view.xml
index d6b2fde..640cee9 100644
--- a/contrib/views/files/src/main/resources/view.xml
+++ b/contrib/views/files/src/main/resources/view.xml
@@ -155,5 +155,12 @@
 
   HDFS
 
+
+CLUSTER.ADMINISTRATOR
+CLUSTER.OPERATOR
+SERVICE.ADMINISTRATOR
+SERVICE.OPERATOR
+CLUSTER.USER
+
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/8fbc2718/contrib/views/hive-next/src/main/resources/view.xml
--
diff --git a/contrib/views/hive-next/src/main/resources/view.xml 
b/contrib/views/hive-next/src/main/resources/view.xml
index 02e632c..1107cd1 100644
--- a/contrib/views/hive-next/src/main/resources/view.xml
+++ b/contrib/views/hive-next/src/main/resources/view.xml
@@ -337,5 +337,12 @@
 
 HIVE
 
+
+CLUSTER.ADMINISTRATOR
+CLUSTER.OPERATOR
+SERVICE.ADMINISTRATOR
+SERVICE.OPERATOR
+CLUSTER.USER
+
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/8fbc2718/contrib/views/tez/src/main/resources/view.xml
--
diff --git a/contrib/views/tez/src/main/resources/view.xml 
b/contrib/views/tez/src/main/resources/view.xml
index 2bb2bb0..41ffdbc 100644
--- a/contrib/views/tez/src/main/resources/view.xml
+++ b/contrib/views/tez/src/main/resources/view.xml
@@ -91,5 +91,12 @@ limitations under the License. Kerberos, LDAP, Custom. 
Binary/Htt
 
   TEZ
 
+
+  CLUSTER.ADMINISTRATOR
+  CLUSTER.OPERATOR
+  SERVICE.ADMINISTRATOR
+  SERVICE.OPERATOR
+  CLUSTER.USER
+
   
 



ambari git commit: AMBARI-19036. Add default roles to auto created views. (Ashwin Rajeev via dipayanb)

2016-12-05 Thread dbhowmick
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 cae500898 -> 829304fbc


AMBARI-19036. Add default roles to auto created views. (Ashwin Rajeev via 
dipayanb)


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

Branch: refs/heads/branch-2.5
Commit: 829304fbcdcfbbc1fd0e5d189eeed5758dd144f4
Parents: cae5008
Author: Dipayan Bhowmick 
Authored: Tue Dec 6 01:01:43 2016 +0530
Committer: Dipayan Bhowmick 
Committed: Tue Dec 6 01:01:43 2016 +0530

--
 .../src/main/resources/view.xml | 23 +++-
 contrib/views/files/src/main/resources/view.xml |  7 ++
 .../views/hive-next/src/main/resources/view.xml |  7 ++
 contrib/views/tez/src/main/resources/view.xml   |  7 ++
 4 files changed, 34 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/829304fb/contrib/views/capacity-scheduler/src/main/resources/view.xml
--
diff --git a/contrib/views/capacity-scheduler/src/main/resources/view.xml 
b/contrib/views/capacity-scheduler/src/main/resources/view.xml
index 84a9ee0..cba243c 100644
--- a/contrib/views/capacity-scheduler/src/main/resources/view.xml
+++ b/contrib/views/capacity-scheduler/src/main/resources/view.xml
@@ -23,19 +23,22 @@
 2.1.*
 AMBARI-ONLY
 
-  
-  scheduler
-  
org.apache.ambari.view.capacityscheduler.CapacitySchedulerService
+
+scheduler
+
org.apache.ambari.view.capacityscheduler.CapacitySchedulerService
 
 
 
-  AUTO_CS_INSTANCE
-  YARN Queue Manager
-  Manage YARN Capacity Scheduler Queues
-  HDP-2.*
-  
-YARN
-  
+AUTO_CS_INSTANCE
+YARN Queue Manager
+Manage YARN Capacity Scheduler Queues
+HDP-2.*
+
+YARN
+
+
+CLUSTER.ADMINISTRATOR
+
 
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/829304fb/contrib/views/files/src/main/resources/view.xml
--
diff --git a/contrib/views/files/src/main/resources/view.xml 
b/contrib/views/files/src/main/resources/view.xml
index d6b2fde..640cee9 100644
--- a/contrib/views/files/src/main/resources/view.xml
+++ b/contrib/views/files/src/main/resources/view.xml
@@ -155,5 +155,12 @@
 
   HDFS
 
+
+CLUSTER.ADMINISTRATOR
+CLUSTER.OPERATOR
+SERVICE.ADMINISTRATOR
+SERVICE.OPERATOR
+CLUSTER.USER
+
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/829304fb/contrib/views/hive-next/src/main/resources/view.xml
--
diff --git a/contrib/views/hive-next/src/main/resources/view.xml 
b/contrib/views/hive-next/src/main/resources/view.xml
index 02e632c..1107cd1 100644
--- a/contrib/views/hive-next/src/main/resources/view.xml
+++ b/contrib/views/hive-next/src/main/resources/view.xml
@@ -337,5 +337,12 @@
 
 HIVE
 
+
+CLUSTER.ADMINISTRATOR
+CLUSTER.OPERATOR
+SERVICE.ADMINISTRATOR
+SERVICE.OPERATOR
+CLUSTER.USER
+
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/829304fb/contrib/views/tez/src/main/resources/view.xml
--
diff --git a/contrib/views/tez/src/main/resources/view.xml 
b/contrib/views/tez/src/main/resources/view.xml
index 2bb2bb0..41ffdbc 100644
--- a/contrib/views/tez/src/main/resources/view.xml
+++ b/contrib/views/tez/src/main/resources/view.xml
@@ -91,5 +91,12 @@ limitations under the License. Kerberos, LDAP, Custom. 
Binary/Htt
 
   TEZ
 
+
+  CLUSTER.ADMINISTRATOR
+  CLUSTER.OPERATOR
+  SERVICE.ADMINISTRATOR
+  SERVICE.OPERATOR
+  CLUSTER.USER
+
   
 



ambari git commit: AMBARI-19084. Custom property added to the Notification settings appears twice (onechiporenko)

2016-12-05 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk f5051dcb7 -> b2d2ef168


AMBARI-19084. Custom property added to the Notification settings appears twice 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: b2d2ef1689d5434c20d6a791ace598f58742605a
Parents: f5051dc
Author: Oleg Nechiporenko 
Authored: Mon Dec 5 17:08:41 2016 +0200
Committer: Oleg Nechiporenko 
Committed: Mon Dec 5 18:05:42 2016 +0200

--
 .../common/configs/notifications_configs.hbs  |  2 +-
 .../notification_configs_view.js  | 18 ++
 .../configs/service_configs_by_category_view.js   |  9 -
 3 files changed, 23 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b2d2ef16/ambari-web/app/templates/common/configs/notifications_configs.hbs
--
diff --git a/ambari-web/app/templates/common/configs/notifications_configs.hbs 
b/ambari-web/app/templates/common/configs/notifications_configs.hbs
index ca2c208..2dd71aa 100644
--- a/ambari-web/app/templates/common/configs/notifications_configs.hbs
+++ b/ambari-web/app/templates/common/configs/notifications_configs.hbs
@@ -20,7 +20,7 @@
   
 
   
-  {{view.category.displayName}}
+  {{view.category.displayName}}
 
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b2d2ef16/ambari-web/app/views/common/configs/custom_category_views/notification_configs_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/custom_category_views/notification_configs_view.js
 
b/ambari-web/app/views/common/configs/custom_category_views/notification_configs_view.js
index 9ad8762..d299b5f 100644
--- 
a/ambari-web/app/views/common/configs/custom_category_views/notification_configs_view.js
+++ 
b/ambari-web/app/views/common/configs/custom_category_views/notification_configs_view.js
@@ -62,8 +62,8 @@ App.NotificationsConfigsView = 
App.ServiceConfigsByCategoryView.extend({
 if (!this.get('categoryConfigsAll.length')) return;
 this.set('createNotification', 
this.get('categoryConfigsAll').findProperty('name', 
'create_notification').get('value'));
 this.set('tlsOrSsl', this.get('categoryConfigsAll').findProperty('name', 
'mail.smtp.starttls.enable').get('value') ? 'tls' : 'ssl');
-var smtp_use_auth = this.get('categoryConfigsAll').findProperty('name', 
'smtp_use_auth');
-smtp_use_auth.set('value', Boolean(smtp_use_auth.get('value') === 'true'));
+var smtpUseAuth = this.get('categoryConfigsAll').findProperty('name', 
'smtp_use_auth');
+smtpUseAuth.set('value', Boolean(smtpUseAuth.get('value') === 'true'));
 this.updateCategoryConfigs();
   },
 
@@ -74,8 +74,8 @@ App.NotificationsConfigsView = 
App.ServiceConfigsByCategoryView.extend({
*/
   onTlsOrSslChanged: function () {
 var tlsOrSsl = this.get('tlsOrSsl');
-this.get('categoryConfigsAll').findProperty('name', 
'mail.smtp.starttls.enable').set('value', tlsOrSsl == 'tls');
-this.get('categoryConfigsAll').findProperty('name', 
'mail.smtp.startssl.enable').set('value', tlsOrSsl == 'ssl');
+this.get('categoryConfigsAll').findProperty('name', 
'mail.smtp.starttls.enable').set('value', tlsOrSsl === 'tls');
+this.get('categoryConfigsAll').findProperty('name', 
'mail.smtp.startssl.enable').set('value', tlsOrSsl === 'ssl');
   }.observes('tlsOrSsl'),
 
   /**
@@ -122,6 +122,16 @@ App.NotificationsConfigsView = 
App.ServiceConfigsByCategoryView.extend({
   updateConfig: function (config, flag) {
 config.set('isRequired', flag);
 config.set('isEditable', flag);
+  },
+
+  /**
+   * No sense to store config to serviceConfigs and 
categoryConfigsAll because
+   * categoryConfigsAll is a subset of serviceConfigs
+   *
+   * @override
+   */
+  _appendConfigToCollection: function (serviceConfigProperty) {
+this.get('serviceConfigs').pushObject(serviceConfigProperty);
   }
 
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/b2d2ef16/ambari-web/app/views/common/configs/service_configs_by_category_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/service_configs_by_category_view.js 
b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
index dfcd5df..16258cf 100644
--- a/ambari-web/app/views/common/configs/service_configs_by_category_view.js
+++ b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
@@ -439,7 +439,14 @@ 

[1/3] ambari git commit: AMBARI-18065. Change Ranger Admin start script to setup db for ranger (magyari_sandor)

2016-12-05 Thread magyari_sandor
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 a0b0a053f -> cae500898


http://git-wip-us.apache.org/repos/asf/ambari/blob/cae50089/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-secured.json
--
diff --git 
a/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-secured.json 
b/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-secured.json
new file mode 100644
index 000..030b717
--- /dev/null
+++ b/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-secured.json
@@ -0,0 +1,773 @@
+{
+"localComponents": [
+"SECONDARY_NAMENODE", 
+"HDFS_CLIENT", 
+"DATANODE", 
+"NAMENODE", 
+"RANGER_ADMIN", 
+"RANGER_TAGSYNC", 
+"RANGER_USERSYNC", 
+"ZOOKEEPER_SERVER", 
+"ZOOKEEPER_CLIENT", 
+"KERBEROS_CLIENT",
+"LOGSEARCH_SOLR",
+"LOGSEARCH_SOLR_CLIENT"
+], 
+"configuration_attributes": {
+"ranger-hdfs-audit": {}, 
+"ssl-client": {}, 
+"ranger-admin-site": {}, 
+"ranger-hdfs-policymgr-ssl": {}, 
+"tagsync-application-properties": {}, 
+"ranger-env": {}, 
+"usersync-log4j": {}, 
+"ranger-hdfs-plugin-properties": {}, 
+"kerberos-env": {}, 
+"admin-properties": {}, 
+"ranger-ugsync-site": {}, 
+"hdfs-site": {
+"final": {
+"dfs.datanode.data.dir": "true", 
+"dfs.namenode.http-address": "true", 
+"dfs.datanode.failed.volumes.tolerated": "true", 
+"dfs.support.append": "true", 
+"dfs.namenode.name.dir": "true", 
+"dfs.webhdfs.enabled": "true"
+}
+}, 
+"ranger-tagsync-site": {}, 
+"zoo.cfg": {}, 
+"hadoop-policy": {}, 
+"hdfs-log4j": {}, 
+"krb5-conf": {}, 
+"core-site": {
+"final": {
+"fs.defaultFS": "true"
+}
+}, 
+"hadoop-env": {}, 
+"zookeeper-log4j": {}, 
+"ssl-server": {}, 
+"ranger-site": {}, 
+"admin-log4j": {}, 
+"tagsync-log4j": {}, 
+"ranger-hdfs-security": {}, 
+"usersync-properties": {}, 
+"zookeeper-env": {},
+"infra-solr-env": {},
+"infra-solr-client-log4j": {},
+"cluster-env": {}
+}, 
+"public_hostname": "c6401.ambari.apache.org", 
+"commandId": "41-2", 
+"hostname": "c6401.ambari.apache.org", 
+"kerberosCommandParams": [], 
+"serviceName": "RANGER", 
+"role": "RANGER_ADMIN", 
+"forceRefreshConfigTagsBeforeExecution": [], 
+"requestId": 41, 
+"agentConfigParams": {
+"agent": {
+"parallel_execution": 0
+}
+}, 
+"clusterName": "test_Cluster01", 
+"commandType": "EXECUTION_COMMAND", 
+"taskId": 186, 
+"roleParams": {}, 
+"configurationTags": {
+"ranger-hdfs-audit": {
+"tag": "version1466705299922"
+}, 
+"ssl-client": {
+"tag": "version1"
+}, 
+"ranger-admin-site": {
+"tag": "version1467016680635"
+}, 
+"ranger-hdfs-policymgr-ssl": {
+"tag": "version1466705299922"
+}, 
+"tagsync-application-properties": {
+"tag": "version1467016680511"
+}, 
+"ranger-env": {
+"tag": "version1466705299949"
+}, 
+"ranger-ugsync-site": {
+"tag": "version1467016680537"
+}, 
+"ranger-hdfs-plugin-properties": {
+"tag": "version1466705299922"
+}, 
+"kerberos-env": {
+"tag": "version1467016537243"
+}, 
+"admin-properties": {
+"tag": "version1466705299949"
+}, 
+"hdfs-site": {
+"tag": "version1467016680401"
+}, 
+"ranger-tagsync-site": {
+"tag": "version1467016680586"
+}, 
+"zoo.cfg": {
+"tag": "version1"
+}, 
+"hadoop-policy": {
+"tag": "version1"
+}, 
+"hdfs-log4j": {
+"tag": "version1"
+}, 
+"usersync-log4j": {
+"tag": "version1466705299949"
+}, 
+"krb5-conf": {
+"tag": "version1467016537243"
+}, 
+"core-site": {
+"tag": "version1467016680612"
+}, 
+"hadoop-env": {
+"tag": "version1467016680446"
+}, 
+"zookeeper-log4j": {
+"tag": "version1"
+}, 
+"ssl-server": {
+"tag": "version1"
+}, 
+"ranger-site": {
+"tag": "version1466705299949"
+}, 
+"admin-log4j": {
+"tag": "version1466705299949"
+}, 
+"tagsync-log4j": {
+"tag": "version1466705299949"
+}, 
+   

[3/3] ambari git commit: AMBARI-18065. Change Ranger Admin start script to setup db for ranger (magyari_sandor)

2016-12-05 Thread magyari_sandor
AMBARI-18065. Change Ranger Admin start script to setup db for ranger 
(magyari_sandor)


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

Branch: refs/heads/branch-2.5
Commit: cae5008984d6f45385d8962d35aff1a7f8ea059d
Parents: a0b0a05
Author: Sandor Magyari 
Authored: Thu Dec 1 19:36:01 2016 +0100
Committer: Sandor Magyari 
Committed: Mon Dec 5 16:40:25 2016 +0100

--
 .../libraries/functions/constants.py|   1 +
 .../RANGER/0.4.0/package/scripts/params.py  |   1 +
 .../0.4.0/package/scripts/ranger_admin.py   |  36 +-
 .../HDP/2.0.6/properties/stack_features.json|   5 +
 .../stacks/2.6/RANGER/test_ranger_admin.py  | 504 
 .../2.6/configs/ranger-admin-default.json   | 704 +
 .../2.6/configs/ranger-admin-secured.json   | 773 +++
 7 files changed, 2010 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/cae50089/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
index 3431495..46562e0 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
@@ -97,6 +97,7 @@ class StackFeature:
   RANGER_PID_SUPPORT = "ranger_pid_support"
   RANGER_KMS_PID_SUPPORT = "ranger_kms_pid_support"
   RANGER_ADMIN_PASSWD_CHANGE = "ranger_admin_password_change"
+  RANGER_SETUP_DB_ON_START = "ranger_setup_db_on_start"
   STORM_METRICS_APACHE_CLASSES = "storm_metrics_apache_classes"
   SPARK_JAVA_OPTS_SUPPORT = "spark_java_opts_support"
   ATLAS_HBASE_SETUP = "atlas_hbase_setup"

http://git-wip-us.apache.org/repos/asf/ambari/blob/cae50089/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
index e27b363..f2cc940 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
@@ -70,6 +70,7 @@ stack_supports_usersync_passwd = 
check_stack_feature(StackFeature.RANGER_USERSYN
 stack_supports_infra_client = 
check_stack_feature(StackFeature.RANGER_INSTALL_INFRA_CLIENT, 
version_for_stack_feature_checks)
 stack_supports_pid = check_stack_feature(StackFeature.RANGER_PID_SUPPORT, 
version_for_stack_feature_checks)
 stack_supports_ranger_admin_password_change = 
check_stack_feature(StackFeature.RANGER_ADMIN_PASSWD_CHANGE, 
version_for_stack_feature_checks)
+stack_supports_ranger_setup_db_on_start = 
check_stack_feature(StackFeature.RANGER_SETUP_DB_ON_START, 
version_for_stack_feature_checks)
 
 downgrade_from_version = default("/commandParams/downgrade_from_version", None)
 upgrade_direction = default("/commandParams/upgrade_direction", None)

http://git-wip-us.apache.org/repos/asf/ambari/blob/cae50089/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
index a9656c7..b849d58 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
@@ -45,18 +45,9 @@ class RangerAdmin(Script):
 self.install_packages(env)
 import params
 env.set_params(params)
-if params.xml_configurations_supported:
-  from setup_ranger_xml import setup_ranger_db
-  setup_ranger_db()
-
-self.configure(env)
-
-if params.xml_configurations_supported:
-  from setup_ranger_xml import setup_java_patch
-  setup_java_patch()
-
-if params.stack_supports_ranger_admin_password_change:
-  setup_ranger_admin_passwd_change()
+# call config and setup db only in case of HDP version < 2.6
+if not 

[2/3] ambari git commit: AMBARI-18065. Change Ranger Admin start script to setup db for ranger (magyari_sandor)

2016-12-05 Thread magyari_sandor
http://git-wip-us.apache.org/repos/asf/ambari/blob/cae50089/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-default.json
--
diff --git 
a/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-default.json 
b/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-default.json
new file mode 100644
index 000..1d5adff
--- /dev/null
+++ b/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-default.json
@@ -0,0 +1,704 @@
+{
+"localComponents": [
+"NAMENODE", 
+"SECONDARY_NAMENODE", 
+"ZOOKEEPER_SERVER", 
+"DATANODE", 
+"HDFS_CLIENT", 
+"ZOOKEEPER_CLIENT", 
+"RANGER_USERSYNC", 
+"RANGER_ADMIN", 
+"RANGER_TAGSYNC",
+"LOGSEARCH_SOLR",
+"LOGSEARCH_SOLR_CLIENT"
+], 
+"configuration_attributes": {
+"ranger-hdfs-audit": {}, 
+"ssl-client": {}, 
+"ranger-admin-site": {}, 
+"ranger-hdfs-policymgr-ssl": {}, 
+"tagsync-application-properties": {}, 
+"ranger-env": {}, 
+"usersync-log4j": {}, 
+"admin-properties": {}, 
+"ranger-ugsync-site": {}, 
+"hdfs-site": {
+"final": {
+"dfs.datanode.data.dir": "true", 
+"dfs.namenode.http-address": "true", 
+"dfs.datanode.failed.volumes.tolerated": "true", 
+"dfs.support.append": "true", 
+"dfs.namenode.name.dir": "true", 
+"dfs.webhdfs.enabled": "true"
+}
+}, 
+"ranger-tagsync-site": {}, 
+"zoo.cfg": {}, 
+"hadoop-policy": {}, 
+"hdfs-log4j": {}, 
+"ranger-hdfs-plugin-properties": {}, 
+"core-site": {
+"final": {
+"fs.defaultFS": "true"
+}
+}, 
+"hadoop-env": {}, 
+"zookeeper-log4j": {}, 
+"ssl-server": {}, 
+"ranger-site": {}, 
+"admin-log4j": {}, 
+"tagsync-log4j": {}, 
+"ranger-hdfs-security": {}, 
+"usersync-properties": {}, 
+"zookeeper-env": {},
+"infra-solr-env": {},
+"infra-solr-client-log4j": {},
+"cluster-env": {}
+}, 
+"public_hostname": "c6401.ambari.apache.org", 
+"commandId": "11-0", 
+"hostname": "c6401.ambari.apache.org", 
+"kerberosCommandParams": [], 
+"serviceName": "RANGER", 
+"role": "RANGER_ADMIN", 
+"forceRefreshConfigTagsBeforeExecution": [], 
+"requestId": 11, 
+"agentConfigParams": {
+"agent": {
+"parallel_execution": 0
+}
+}, 
+"clusterName": "c1", 
+"commandType": "EXECUTION_COMMAND", 
+"taskId": 31, 
+"roleParams": {}, 
+"configurationTags": {
+"ranger-hdfs-audit": {
+"tag": "version1466705299922"
+}, 
+"ssl-client": {
+"tag": "version1"
+}, 
+"ranger-admin-site": {
+"tag": "version1466705299949"
+}, 
+"ranger-hdfs-policymgr-ssl": {
+"tag": "version1466705299922"
+}, 
+"tagsync-application-properties": {
+"tag": "version1466705299949"
+}, 
+"ranger-env": {
+"tag": "version1466705299949"
+}, 
+"usersync-log4j": {
+"tag": "version1466705299949"
+}, 
+"admin-properties": {
+"tag": "version1466705299949"
+}, 
+"ranger-ugsync-site": {
+"tag": "version1466705299949"
+}, 
+"hdfs-site": {
+"tag": "version1"
+}, 
+"ranger-tagsync-site": {
+"tag": "version1466705299949"
+}, 
+"zoo.cfg": {
+"tag": "version1"
+}, 
+"hadoop-policy": {
+"tag": "version1"
+}, 
+"hdfs-log4j": {
+"tag": "version1"
+}, 
+"ranger-hdfs-plugin-properties": {
+"tag": "version1466705299922"
+}, 
+"core-site": {
+"tag": "version1"
+}, 
+"hadoop-env": {
+"tag": "version1"
+}, 
+"zookeeper-log4j": {
+"tag": "version1"
+}, 
+"ssl-server": {
+"tag": "version1"
+}, 
+"ranger-site": {
+"tag": "version1466705299949"
+}, 
+"admin-log4j": {
+"tag": "version1466705299949"
+}, 
+"tagsync-log4j": {
+"tag": "version1466705299949"
+}, 
+"ranger-hdfs-security": {
+"tag": "version1466705299922"
+}, 
+"usersync-properties": {
+"tag": "version1466705299949"
+}, 
+"zookeeper-env": {
+"tag": "version1"
+},
+"infra-solr-env": {
+"tag": "version1467098537360"
+},
+"infra-solr-client-log4j": {
+

[3/3] ambari git commit: AMBARI-18065. Change Ranger Admin start script to setup db for ranger (magyari_sandor)

2016-12-05 Thread magyari_sandor
AMBARI-18065. Change Ranger Admin start script to setup db for ranger 
(magyari_sandor)


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

Branch: refs/heads/trunk
Commit: f5051dcb7f17f0e26fed9e70eef35a3758a35e60
Parents: 431d265
Author: Sandor Magyari 
Authored: Thu Dec 1 19:36:01 2016 +0100
Committer: Sandor Magyari 
Committed: Mon Dec 5 16:39:13 2016 +0100

--
 .../libraries/functions/constants.py|   1 +
 .../RANGER/0.4.0/package/scripts/params.py  |   1 +
 .../0.4.0/package/scripts/ranger_admin.py   |  36 +-
 .../HDP/2.0.6/properties/stack_features.json|   5 +
 .../stacks/2.6/RANGER/test_ranger_admin.py  | 504 
 .../2.6/configs/ranger-admin-default.json   | 704 +
 .../2.6/configs/ranger-admin-secured.json   | 773 +++
 7 files changed, 2010 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f5051dcb/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
--
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
index 3431495..46562e0 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
@@ -97,6 +97,7 @@ class StackFeature:
   RANGER_PID_SUPPORT = "ranger_pid_support"
   RANGER_KMS_PID_SUPPORT = "ranger_kms_pid_support"
   RANGER_ADMIN_PASSWD_CHANGE = "ranger_admin_password_change"
+  RANGER_SETUP_DB_ON_START = "ranger_setup_db_on_start"
   STORM_METRICS_APACHE_CLASSES = "storm_metrics_apache_classes"
   SPARK_JAVA_OPTS_SUPPORT = "spark_java_opts_support"
   ATLAS_HBASE_SETUP = "atlas_hbase_setup"

http://git-wip-us.apache.org/repos/asf/ambari/blob/f5051dcb/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
index e27b363..f2cc940 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
@@ -70,6 +70,7 @@ stack_supports_usersync_passwd = 
check_stack_feature(StackFeature.RANGER_USERSYN
 stack_supports_infra_client = 
check_stack_feature(StackFeature.RANGER_INSTALL_INFRA_CLIENT, 
version_for_stack_feature_checks)
 stack_supports_pid = check_stack_feature(StackFeature.RANGER_PID_SUPPORT, 
version_for_stack_feature_checks)
 stack_supports_ranger_admin_password_change = 
check_stack_feature(StackFeature.RANGER_ADMIN_PASSWD_CHANGE, 
version_for_stack_feature_checks)
+stack_supports_ranger_setup_db_on_start = 
check_stack_feature(StackFeature.RANGER_SETUP_DB_ON_START, 
version_for_stack_feature_checks)
 
 downgrade_from_version = default("/commandParams/downgrade_from_version", None)
 upgrade_direction = default("/commandParams/upgrade_direction", None)

http://git-wip-us.apache.org/repos/asf/ambari/blob/f5051dcb/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
index a9656c7..b849d58 100644
--- 
a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
+++ 
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py
@@ -45,18 +45,9 @@ class RangerAdmin(Script):
 self.install_packages(env)
 import params
 env.set_params(params)
-if params.xml_configurations_supported:
-  from setup_ranger_xml import setup_ranger_db
-  setup_ranger_db()
-
-self.configure(env)
-
-if params.xml_configurations_supported:
-  from setup_ranger_xml import setup_java_patch
-  setup_java_patch()
-
-if params.stack_supports_ranger_admin_password_change:
-  setup_ranger_admin_passwd_change()
+# call config and setup db only in case of HDP version < 2.6
+if not 

[2/3] ambari git commit: AMBARI-18065. Change Ranger Admin start script to setup db for ranger (magyari_sandor)

2016-12-05 Thread magyari_sandor
http://git-wip-us.apache.org/repos/asf/ambari/blob/f5051dcb/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-default.json
--
diff --git 
a/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-default.json 
b/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-default.json
new file mode 100644
index 000..1d5adff
--- /dev/null
+++ b/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-default.json
@@ -0,0 +1,704 @@
+{
+"localComponents": [
+"NAMENODE", 
+"SECONDARY_NAMENODE", 
+"ZOOKEEPER_SERVER", 
+"DATANODE", 
+"HDFS_CLIENT", 
+"ZOOKEEPER_CLIENT", 
+"RANGER_USERSYNC", 
+"RANGER_ADMIN", 
+"RANGER_TAGSYNC",
+"LOGSEARCH_SOLR",
+"LOGSEARCH_SOLR_CLIENT"
+], 
+"configuration_attributes": {
+"ranger-hdfs-audit": {}, 
+"ssl-client": {}, 
+"ranger-admin-site": {}, 
+"ranger-hdfs-policymgr-ssl": {}, 
+"tagsync-application-properties": {}, 
+"ranger-env": {}, 
+"usersync-log4j": {}, 
+"admin-properties": {}, 
+"ranger-ugsync-site": {}, 
+"hdfs-site": {
+"final": {
+"dfs.datanode.data.dir": "true", 
+"dfs.namenode.http-address": "true", 
+"dfs.datanode.failed.volumes.tolerated": "true", 
+"dfs.support.append": "true", 
+"dfs.namenode.name.dir": "true", 
+"dfs.webhdfs.enabled": "true"
+}
+}, 
+"ranger-tagsync-site": {}, 
+"zoo.cfg": {}, 
+"hadoop-policy": {}, 
+"hdfs-log4j": {}, 
+"ranger-hdfs-plugin-properties": {}, 
+"core-site": {
+"final": {
+"fs.defaultFS": "true"
+}
+}, 
+"hadoop-env": {}, 
+"zookeeper-log4j": {}, 
+"ssl-server": {}, 
+"ranger-site": {}, 
+"admin-log4j": {}, 
+"tagsync-log4j": {}, 
+"ranger-hdfs-security": {}, 
+"usersync-properties": {}, 
+"zookeeper-env": {},
+"infra-solr-env": {},
+"infra-solr-client-log4j": {},
+"cluster-env": {}
+}, 
+"public_hostname": "c6401.ambari.apache.org", 
+"commandId": "11-0", 
+"hostname": "c6401.ambari.apache.org", 
+"kerberosCommandParams": [], 
+"serviceName": "RANGER", 
+"role": "RANGER_ADMIN", 
+"forceRefreshConfigTagsBeforeExecution": [], 
+"requestId": 11, 
+"agentConfigParams": {
+"agent": {
+"parallel_execution": 0
+}
+}, 
+"clusterName": "c1", 
+"commandType": "EXECUTION_COMMAND", 
+"taskId": 31, 
+"roleParams": {}, 
+"configurationTags": {
+"ranger-hdfs-audit": {
+"tag": "version1466705299922"
+}, 
+"ssl-client": {
+"tag": "version1"
+}, 
+"ranger-admin-site": {
+"tag": "version1466705299949"
+}, 
+"ranger-hdfs-policymgr-ssl": {
+"tag": "version1466705299922"
+}, 
+"tagsync-application-properties": {
+"tag": "version1466705299949"
+}, 
+"ranger-env": {
+"tag": "version1466705299949"
+}, 
+"usersync-log4j": {
+"tag": "version1466705299949"
+}, 
+"admin-properties": {
+"tag": "version1466705299949"
+}, 
+"ranger-ugsync-site": {
+"tag": "version1466705299949"
+}, 
+"hdfs-site": {
+"tag": "version1"
+}, 
+"ranger-tagsync-site": {
+"tag": "version1466705299949"
+}, 
+"zoo.cfg": {
+"tag": "version1"
+}, 
+"hadoop-policy": {
+"tag": "version1"
+}, 
+"hdfs-log4j": {
+"tag": "version1"
+}, 
+"ranger-hdfs-plugin-properties": {
+"tag": "version1466705299922"
+}, 
+"core-site": {
+"tag": "version1"
+}, 
+"hadoop-env": {
+"tag": "version1"
+}, 
+"zookeeper-log4j": {
+"tag": "version1"
+}, 
+"ssl-server": {
+"tag": "version1"
+}, 
+"ranger-site": {
+"tag": "version1466705299949"
+}, 
+"admin-log4j": {
+"tag": "version1466705299949"
+}, 
+"tagsync-log4j": {
+"tag": "version1466705299949"
+}, 
+"ranger-hdfs-security": {
+"tag": "version1466705299922"
+}, 
+"usersync-properties": {
+"tag": "version1466705299949"
+}, 
+"zookeeper-env": {
+"tag": "version1"
+},
+"infra-solr-env": {
+"tag": "version1467098537360"
+},
+"infra-solr-client-log4j": {
+

[1/3] ambari git commit: AMBARI-18065. Change Ranger Admin start script to setup db for ranger (magyari_sandor)

2016-12-05 Thread magyari_sandor
Repository: ambari
Updated Branches:
  refs/heads/trunk 431d2659c -> f5051dcb7


http://git-wip-us.apache.org/repos/asf/ambari/blob/f5051dcb/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-secured.json
--
diff --git 
a/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-secured.json 
b/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-secured.json
new file mode 100644
index 000..030b717
--- /dev/null
+++ b/ambari-server/src/test/python/stacks/2.6/configs/ranger-admin-secured.json
@@ -0,0 +1,773 @@
+{
+"localComponents": [
+"SECONDARY_NAMENODE", 
+"HDFS_CLIENT", 
+"DATANODE", 
+"NAMENODE", 
+"RANGER_ADMIN", 
+"RANGER_TAGSYNC", 
+"RANGER_USERSYNC", 
+"ZOOKEEPER_SERVER", 
+"ZOOKEEPER_CLIENT", 
+"KERBEROS_CLIENT",
+"LOGSEARCH_SOLR",
+"LOGSEARCH_SOLR_CLIENT"
+], 
+"configuration_attributes": {
+"ranger-hdfs-audit": {}, 
+"ssl-client": {}, 
+"ranger-admin-site": {}, 
+"ranger-hdfs-policymgr-ssl": {}, 
+"tagsync-application-properties": {}, 
+"ranger-env": {}, 
+"usersync-log4j": {}, 
+"ranger-hdfs-plugin-properties": {}, 
+"kerberos-env": {}, 
+"admin-properties": {}, 
+"ranger-ugsync-site": {}, 
+"hdfs-site": {
+"final": {
+"dfs.datanode.data.dir": "true", 
+"dfs.namenode.http-address": "true", 
+"dfs.datanode.failed.volumes.tolerated": "true", 
+"dfs.support.append": "true", 
+"dfs.namenode.name.dir": "true", 
+"dfs.webhdfs.enabled": "true"
+}
+}, 
+"ranger-tagsync-site": {}, 
+"zoo.cfg": {}, 
+"hadoop-policy": {}, 
+"hdfs-log4j": {}, 
+"krb5-conf": {}, 
+"core-site": {
+"final": {
+"fs.defaultFS": "true"
+}
+}, 
+"hadoop-env": {}, 
+"zookeeper-log4j": {}, 
+"ssl-server": {}, 
+"ranger-site": {}, 
+"admin-log4j": {}, 
+"tagsync-log4j": {}, 
+"ranger-hdfs-security": {}, 
+"usersync-properties": {}, 
+"zookeeper-env": {},
+"infra-solr-env": {},
+"infra-solr-client-log4j": {},
+"cluster-env": {}
+}, 
+"public_hostname": "c6401.ambari.apache.org", 
+"commandId": "41-2", 
+"hostname": "c6401.ambari.apache.org", 
+"kerberosCommandParams": [], 
+"serviceName": "RANGER", 
+"role": "RANGER_ADMIN", 
+"forceRefreshConfigTagsBeforeExecution": [], 
+"requestId": 41, 
+"agentConfigParams": {
+"agent": {
+"parallel_execution": 0
+}
+}, 
+"clusterName": "test_Cluster01", 
+"commandType": "EXECUTION_COMMAND", 
+"taskId": 186, 
+"roleParams": {}, 
+"configurationTags": {
+"ranger-hdfs-audit": {
+"tag": "version1466705299922"
+}, 
+"ssl-client": {
+"tag": "version1"
+}, 
+"ranger-admin-site": {
+"tag": "version1467016680635"
+}, 
+"ranger-hdfs-policymgr-ssl": {
+"tag": "version1466705299922"
+}, 
+"tagsync-application-properties": {
+"tag": "version1467016680511"
+}, 
+"ranger-env": {
+"tag": "version1466705299949"
+}, 
+"ranger-ugsync-site": {
+"tag": "version1467016680537"
+}, 
+"ranger-hdfs-plugin-properties": {
+"tag": "version1466705299922"
+}, 
+"kerberos-env": {
+"tag": "version1467016537243"
+}, 
+"admin-properties": {
+"tag": "version1466705299949"
+}, 
+"hdfs-site": {
+"tag": "version1467016680401"
+}, 
+"ranger-tagsync-site": {
+"tag": "version1467016680586"
+}, 
+"zoo.cfg": {
+"tag": "version1"
+}, 
+"hadoop-policy": {
+"tag": "version1"
+}, 
+"hdfs-log4j": {
+"tag": "version1"
+}, 
+"usersync-log4j": {
+"tag": "version1466705299949"
+}, 
+"krb5-conf": {
+"tag": "version1467016537243"
+}, 
+"core-site": {
+"tag": "version1467016680612"
+}, 
+"hadoop-env": {
+"tag": "version1467016680446"
+}, 
+"zookeeper-log4j": {
+"tag": "version1"
+}, 
+"ssl-server": {
+"tag": "version1"
+}, 
+"ranger-site": {
+"tag": "version1466705299949"
+}, 
+"admin-log4j": {
+"tag": "version1466705299949"
+}, 
+"tagsync-log4j": {
+"tag": "version1466705299949"
+}, 
+

ambari git commit: AMBARI-19059 Falcon quicklinks combobox is absent (dsen)

2016-12-05 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 b76396164 -> a0b0a053f


AMBARI-19059 Falcon quicklinks combobox is absent (dsen)


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

Branch: refs/heads/branch-2.5
Commit: a0b0a053f3e8e4160f13d53c25e6415c80d3ba73
Parents: b763961
Author: Dmytro Sen 
Authored: Mon Dec 5 17:25:35 2016 +0200
Committer: Dmytro Sen 
Committed: Mon Dec 5 17:26:24 2016 +0200

--
 .../FALCON/0.5.0.2.1/metainfo.xml   |  7 
 .../FALCON/0.5.0.2.1/quicklinks/quicklinks.json | 35 
 2 files changed, 42 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a0b0a053/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/metainfo.xml
 
b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/metainfo.xml
index 3ddcc41..91d469b 100644
--- 
a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/metainfo.xml
+++ 
b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/metainfo.xml
@@ -131,6 +131,13 @@
   
 oozie-site
   
+
+  
+
+  quicklinks.json
+  true
+
+  
 
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/a0b0a053/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/quicklinks/quicklinks.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/quicklinks/quicklinks.json
 
b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/quicklinks/quicklinks.json
new file mode 100644
index 000..cc81fca
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/quicklinks/quicklinks.json
@@ -0,0 +1,35 @@
+{
+  "name": "default",
+  "description": "default quick links configuration",
+  "configuration": {
+"protocol":
+{
+  "type":"https",
+  "checks":[
+{
+  "property":"falcon.enableTLS",
+  "desired":"true",
+  "site":"falcon-startup-properties"
+}
+  ]
+},
+
+"links": [
+  {
+"name": "falcon_dashboard",
+"label": "Falcon Dashboard",
+"requires_user_name": "true",
+"component_name": "FALCON_SERVER",
+"url": "%@://%@:%@/",
+"port":{
+  "http_property": "falcon_port",
+  "http_default_port": "15000",
+  "https_property": "falcon_port",
+  "https_default_port": "15443",
+  "regex": "^(\\d+)$",
+  "site": "falcon-env"
+}
+  }
+]
+  }
+}
\ No newline at end of file



ambari git commit: AMBARI-19059 Falcon quicklinks combobox is absent (dsen)

2016-12-05 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/trunk 89b9cf5be -> 431d2659c


AMBARI-19059 Falcon quicklinks combobox is absent (dsen)


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

Branch: refs/heads/trunk
Commit: 431d2659c67f7c07fe704b67eded4f83fe30d25a
Parents: 89b9cf5
Author: Dmytro Sen 
Authored: Mon Dec 5 17:25:35 2016 +0200
Committer: Dmytro Sen 
Committed: Mon Dec 5 17:25:35 2016 +0200

--
 .../FALCON/0.5.0.2.1/metainfo.xml   |  7 
 .../FALCON/0.5.0.2.1/quicklinks/quicklinks.json | 35 
 2 files changed, 42 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/431d2659/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/metainfo.xml
 
b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/metainfo.xml
index 7dab615..2cda70a 100644
--- 
a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/metainfo.xml
+++ 
b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/metainfo.xml
@@ -131,6 +131,13 @@
   
 oozie-site
   
+
+  
+
+  quicklinks.json
+  true
+
+  
 
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/431d2659/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/quicklinks/quicklinks.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/quicklinks/quicklinks.json
 
b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/quicklinks/quicklinks.json
new file mode 100644
index 000..cc81fca
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/quicklinks/quicklinks.json
@@ -0,0 +1,35 @@
+{
+  "name": "default",
+  "description": "default quick links configuration",
+  "configuration": {
+"protocol":
+{
+  "type":"https",
+  "checks":[
+{
+  "property":"falcon.enableTLS",
+  "desired":"true",
+  "site":"falcon-startup-properties"
+}
+  ]
+},
+
+"links": [
+  {
+"name": "falcon_dashboard",
+"label": "Falcon Dashboard",
+"requires_user_name": "true",
+"component_name": "FALCON_SERVER",
+"url": "%@://%@:%@/",
+"port":{
+  "http_property": "falcon_port",
+  "http_default_port": "15000",
+  "https_property": "falcon_port",
+  "https_default_port": "15443",
+  "regex": "^(\\d+)$",
+  "site": "falcon-env"
+}
+  }
+]
+  }
+}
\ No newline at end of file



[1/2] ambari git commit: AMBARI-19083. After ambari only upgrade Enable security(Configure Ambari Identity) was failed because could not run "ambari-sudo.sh" (aonishuk)

2016-12-05 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 3e0d02145 -> b76396164
  refs/heads/trunk 08342b3cb -> 89b9cf5be


AMBARI-19083. After ambari only upgrade Enable security(Configure Ambari 
Identity) was failed because could not run  "ambari-sudo.sh" (aonishuk)


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

Branch: refs/heads/trunk
Commit: 89b9cf5beb1304b0d90dad00b371947a3c467e8a
Parents: 08342b3
Author: Andrew Onishuk 
Authored: Mon Dec 5 15:23:58 2016 +0200
Committer: Andrew Onishuk 
Committed: Mon Dec 5 15:23:58 2016 +0200

--
 ambari-server/src/main/python/ambari_server_main.py | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/89b9cf5b/ambari-server/src/main/python/ambari_server_main.py
--
diff --git a/ambari-server/src/main/python/ambari_server_main.py 
b/ambari-server/src/main/python/ambari_server_main.py
index b642cea..dbcafa4 100644
--- a/ambari-server/src/main/python/ambari_server_main.py
+++ b/ambari-server/src/main/python/ambari_server_main.py
@@ -28,6 +28,7 @@ from ambari_commons.logging_utils import get_debug_mode, 
print_warning_msg, prin
 from ambari_commons.os_check import OSConst
 from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
 from ambari_commons.os_utils import is_root, run_os_command
+from ambari_server.ambariPath import AmbariPath
 from ambari_server.dbConfiguration import ensure_dbms_is_running, 
ensure_jdbc_driver_is_installed
 from ambari_server.serverConfiguration import configDefaults, find_jdk, 
get_ambari_properties, \
   get_conf_dir, get_is_persisted, get_is_secure, get_java_exe_path, 
get_original_master_key, read_ambari_user, \
@@ -121,6 +122,8 @@ AMBARI_SERVER_NOT_STARTED_MSG = "Ambari Server java process 
hasn't been started
 ULIMIT_OPEN_FILES_KEY = 'ulimit.open.files'
 ULIMIT_OPEN_FILES_DEFAULT = 1
 
+AMBARI_ENV_FILE = AmbariPath.get("/var/lib/ambari-server/ambari-env.sh")
+
 @OsFamilyFuncImpl(OSConst.WINSRV_FAMILY)
 def ensure_server_security_is_configured():
   pass
@@ -179,9 +182,10 @@ def generate_child_process_param_list(ambari_user, 
java_exe, class_path,
 # from subprocess, we have to skip --login option of su command. That's why
 # we change dir to / (otherwise subprocess can face with 'permission 
denied'
 # errors while trying to list current directory
-cmd = "{ulimit_cmd} ; {su} {ambari_user} -s {sh_shell} -c 
'{command}'".format(ulimit_cmd=ulimit_cmd, 
+cmd = "{ulimit_cmd} ; {su} {ambari_user} -s {sh_shell} -c 'source 
{ambari_env_file} ; {command}'".format(ulimit_cmd=ulimit_cmd,

 su=locate_file('su', '/bin'), ambari_user=ambari_user,
-   
 sh_shell=locate_file('sh', '/bin'), command=command)
+   
 sh_shell=locate_file('sh', '/bin'), command=command,
+   
 ambari_env_file=AMBARI_ENV_FILE)
   else:
 cmd = "{ulimit_cmd} ; {command}".format(ulimit_cmd=ulimit_cmd, 
command=command)
 



[2/2] ambari git commit: AMBARI-19083. After ambari only upgrade Enable security(Configure Ambari Identity) was failed because could not run "ambari-sudo.sh" (aonishuk)

2016-12-05 Thread aonishuk
AMBARI-19083. After ambari only upgrade Enable security(Configure Ambari 
Identity) was failed because could not run  "ambari-sudo.sh" (aonishuk)


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

Branch: refs/heads/branch-2.5
Commit: b76396164dbd056417e9f2b54ed7c51f1bb9d9cc
Parents: 3e0d021
Author: Andrew Onishuk 
Authored: Mon Dec 5 15:24:01 2016 +0200
Committer: Andrew Onishuk 
Committed: Mon Dec 5 15:24:01 2016 +0200

--
 ambari-server/src/main/python/ambari_server_main.py | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b7639616/ambari-server/src/main/python/ambari_server_main.py
--
diff --git a/ambari-server/src/main/python/ambari_server_main.py 
b/ambari-server/src/main/python/ambari_server_main.py
index 572de4e..6c77522 100644
--- a/ambari-server/src/main/python/ambari_server_main.py
+++ b/ambari-server/src/main/python/ambari_server_main.py
@@ -28,6 +28,7 @@ from ambari_commons.logging_utils import get_debug_mode, 
print_warning_msg, prin
 from ambari_commons.os_check import OSConst
 from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
 from ambari_commons.os_utils import is_root, run_os_command
+from ambari_server.ambariPath import AmbariPath
 from ambari_server.dbConfiguration import ensure_dbms_is_running, 
ensure_jdbc_driver_is_installed
 from ambari_server.serverConfiguration import configDefaults, find_jdk, 
get_ambari_properties, \
   get_conf_dir, get_is_persisted, get_is_secure, get_java_exe_path, 
get_original_master_key, read_ambari_user, \
@@ -120,6 +121,8 @@ AMBARI_SERVER_NOT_STARTED_MSG = "Ambari Server java process 
hasn't been started
 ULIMIT_OPEN_FILES_KEY = 'ulimit.open.files'
 ULIMIT_OPEN_FILES_DEFAULT = 1
 
+AMBARI_ENV_FILE = AmbariPath.get("/var/lib/ambari-server/ambari-env.sh")
+
 @OsFamilyFuncImpl(OSConst.WINSRV_FAMILY)
 def ensure_server_security_is_configured():
   pass
@@ -178,9 +181,10 @@ def generate_child_process_param_list(ambari_user, 
java_exe, class_path,
 # from subprocess, we have to skip --login option of su command. That's why
 # we change dir to / (otherwise subprocess can face with 'permission 
denied'
 # errors while trying to list current directory
-cmd = "{ulimit_cmd} ; {su} {ambari_user} -s {sh_shell} -c 
'{command}'".format(ulimit_cmd=ulimit_cmd, 
+cmd = "{ulimit_cmd} ; {su} {ambari_user} -s {sh_shell} -c 'source 
{ambari_env_file} ; {command}'".format(ulimit_cmd=ulimit_cmd,

 su=locate_file('su', '/bin'), ambari_user=ambari_user,
-   
 sh_shell=locate_file('sh', '/bin'), command=command)
+   
 sh_shell=locate_file('sh', '/bin'), command=command,
+   
 ambari_env_file=AMBARI_ENV_FILE)
   else:
 cmd = "{ulimit_cmd} ; {command}".format(ulimit_cmd=ulimit_cmd, 
command=command)
 



ambari git commit: AMBARI-19067. Special characters break creating user homes (Laszlo Puskas via magyari_sandor)

2016-12-05 Thread magyari_sandor
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 8f26728cc -> 3e0d02145


AMBARI-19067. Special characters break creating user homes (Laszlo Puskas via 
magyari_sandor)


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

Branch: refs/heads/branch-2.5
Commit: 3e0d02145e836621a375613767672a5ccb908203
Parents: 8f26728
Author: Laszlo Puskas 
Authored: Mon Dec 5 14:07:33 2016 +0100
Committer: Sandor Magyari 
Committed: Mon Dec 5 14:12:44 2016 +0100

--
 .../src/main/resources/scripts/post-user-creation-hook.sh | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3e0d0214/ambari-server/src/main/resources/scripts/post-user-creation-hook.sh
--
diff --git 
a/ambari-server/src/main/resources/scripts/post-user-creation-hook.sh 
b/ambari-server/src/main/resources/scripts/post-user-creation-hook.sh
index 34169c1..ee8d2d1 100755
--- a/ambari-server/src/main/resources/scripts/post-user-creation-hook.sh
+++ b/ambari-server/src/main/resources/scripts/post-user-creation-hook.sh
@@ -84,6 +84,10 @@ echo "[" | cat > "$JSON_INPUT"
 while read -r LINE
 do
   USR_NAME=$(echo "$LINE" | awk -F, '{print $1}')
+  echo "Processing user name: $USR_NAME"
+
+  # encoding the username
+  USR_NAME=$(printf "%q" "$USR_NAME")
 
   cat <> "$JSON_INPUT"
 {
@@ -97,7 +101,10 @@ do
 EOF
 done <"$CSV_FILE"
 
+# deleting the last line
 sed -i '$ d' "$JSON_INPUT"
+
+# appending json closing elements to the end of the file
 echo $'}\n]' | cat >> "$JSON_INPUT"
 echo "Generating file $JSON_INPUT ... DONE."
 echo "Processing post user creation hook payload ... DONE."



ambari git commit: AMBARI-19058. Perf: Deploy 3000 Agent cluster and find perf bugs. Part 1.(vbrodetskyi)

2016-12-05 Thread vbrodetskyi
Repository: ambari
Updated Branches:
  refs/heads/trunk cac20e090 -> 08342b3cb


AMBARI-19058. Perf: Deploy 3000 Agent cluster and find perf bugs. Part 
1.(vbrodetskyi)


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

Branch: refs/heads/trunk
Commit: 08342b3cb268481e5033c99cbf418f123e509327
Parents: cac20e0
Author: Vitaly Brodetskyi 
Authored: Mon Dec 5 15:12:32 2016 +0200
Committer: Vitaly Brodetskyi 
Committed: Mon Dec 5 15:12:32 2016 +0200

--
 contrib/utils/perf/deploy-gce-perf-cluster.py | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/08342b3c/contrib/utils/perf/deploy-gce-perf-cluster.py
--
diff --git a/contrib/utils/perf/deploy-gce-perf-cluster.py 
b/contrib/utils/perf/deploy-gce-perf-cluster.py
index 4737c6f..6de3938 100644
--- a/contrib/utils/perf/deploy-gce-perf-cluster.py
+++ b/contrib/utils/perf/deploy-gce-perf-cluster.py
@@ -28,7 +28,7 @@ import re
 import socket
 
 cluster_prefix = "perf"
-ambari_repo_file_url = 
"http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/2.x/latest/trunk/ambaribn.repo;
+ambari_repo_file_url = 
"http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/2.x/updates/2.5.0.0/ambaribn.repo;
 
 public_hostname_script = "foo"
 hostname_script = "foo"
@@ -285,8 +285,8 @@ def create_vms(args, number_of_nodes):
   time.sleep(10)
 
   # trying to create cluster with needed params
-  print "Creating agent VMs {0}-agent-{1} with {2} large nodes on 
centos6...".format(cluster_prefix, args.cluster_suffix, str(number_of_nodes))
-  execute_command(args, args.controller, "/usr/sbin/gce up {0}-agent-{1} {2} 
--centos6 --large".format(cluster_prefix, args.cluster_suffix, 
str(number_of_nodes)),
+  print "Creating agent VMs {0}-agent-{1} with {2} xlarge nodes on 
centos6...".format(cluster_prefix, args.cluster_suffix, str(number_of_nodes))
+  execute_command(args, args.controller, "/usr/sbin/gce up {0}-agent-{1} {2} 
--centos6 --xlarge".format(cluster_prefix, args.cluster_suffix, 
str(number_of_nodes)),
   "Failed to create cluster VMs, probably not enough 
resources!", "-tt")
 
   # VMs are not accessible immediately
@@ -331,7 +331,7 @@ def create_server_script(server_host_name):
   contents = "#!/bin/bash\n" + \
   "wget -O /etc/yum.repos.d/ambari.repo {0}\n".format(ambari_repo_file_url) + \
   "yum clean all; yum install git ambari-server -y\n" + \
-  "mkdir /home ; cd /home ; git clone https://github.com/apache/ambari.git\n; 
+ \
+  "mkdir /home ; cd /home ; git clone https://github.com/apache/ambari.git ; 
cd ambari ; git checkout branch-2.5\n" + \
   "cp -r /home/ambari/ambari-server/src/main/resources/stacks/PERF 
/var/lib/ambari-server/resources/stacks/PERF\n" + \
   "cp -r /home/ambari/ambari-server/src/main/resources/stacks/PERF 
/var/lib/ambari-agent/cache/stacks/PERF\n" + \
   "\n" + \
@@ -384,7 +384,7 @@ def create_agent_script(server_host_name):
   contents = "#!/bin/bash\n" + \
   "wget -O /etc/yum.repos.d/ambari.repo {0}\n".format(ambari_repo_file_url) + \
   "yum clean all; yum install git ambari-agent -y\n" + \
-  "mkdir /home ; cd /home; git clone https://github.com/apache/ambari.git\n; + 
\
+  "mkdir /home ; cd /home; git clone https://github.com/apache/ambari.git ; cd 
ambari ; git checkout branch-2.5\n" + \
   "cp -r /home/ambari/ambari-server/src/main/resources/stacks/PERF 
/var/lib/ambari-agent/cache/stacks/PERF\n" + \
   "sed -i -e 's/hostname=localhost/hostname={0}/g' 
/etc/ambari-agent/conf/ambari-agent.ini\n".format(server_host_name) + \
   "sed -i -e 
's/agent]/agent]\\nhostname_script={0}\\npublic_hostname_script={1}\\n/1' 
/etc/ambari-agent/conf/ambari-agent.ini\n".format(hostname_script, 
public_hostname_script) + \



ambari git commit: AMBARI-19058. Perf: Deploy 3000 Agent cluster and find perf bugs. Part 1.(vbrodetskyi)

2016-12-05 Thread vbrodetskyi
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 d2d7b0774 -> 8f26728cc


AMBARI-19058. Perf: Deploy 3000 Agent cluster and find perf bugs. Part 
1.(vbrodetskyi)


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

Branch: refs/heads/branch-2.5
Commit: 8f26728cc65bff6f67616657143f082fab9283fd
Parents: d2d7b07
Author: Vitaly Brodetskyi 
Authored: Mon Dec 5 15:09:48 2016 +0200
Committer: Vitaly Brodetskyi 
Committed: Mon Dec 5 15:09:48 2016 +0200

--
 contrib/utils/perf/deploy-gce-perf-cluster.py | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8f26728c/contrib/utils/perf/deploy-gce-perf-cluster.py
--
diff --git a/contrib/utils/perf/deploy-gce-perf-cluster.py 
b/contrib/utils/perf/deploy-gce-perf-cluster.py
index 4737c6f..6de3938 100644
--- a/contrib/utils/perf/deploy-gce-perf-cluster.py
+++ b/contrib/utils/perf/deploy-gce-perf-cluster.py
@@ -28,7 +28,7 @@ import re
 import socket
 
 cluster_prefix = "perf"
-ambari_repo_file_url = 
"http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/2.x/latest/trunk/ambaribn.repo;
+ambari_repo_file_url = 
"http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/2.x/updates/2.5.0.0/ambaribn.repo;
 
 public_hostname_script = "foo"
 hostname_script = "foo"
@@ -285,8 +285,8 @@ def create_vms(args, number_of_nodes):
   time.sleep(10)
 
   # trying to create cluster with needed params
-  print "Creating agent VMs {0}-agent-{1} with {2} large nodes on 
centos6...".format(cluster_prefix, args.cluster_suffix, str(number_of_nodes))
-  execute_command(args, args.controller, "/usr/sbin/gce up {0}-agent-{1} {2} 
--centos6 --large".format(cluster_prefix, args.cluster_suffix, 
str(number_of_nodes)),
+  print "Creating agent VMs {0}-agent-{1} with {2} xlarge nodes on 
centos6...".format(cluster_prefix, args.cluster_suffix, str(number_of_nodes))
+  execute_command(args, args.controller, "/usr/sbin/gce up {0}-agent-{1} {2} 
--centos6 --xlarge".format(cluster_prefix, args.cluster_suffix, 
str(number_of_nodes)),
   "Failed to create cluster VMs, probably not enough 
resources!", "-tt")
 
   # VMs are not accessible immediately
@@ -331,7 +331,7 @@ def create_server_script(server_host_name):
   contents = "#!/bin/bash\n" + \
   "wget -O /etc/yum.repos.d/ambari.repo {0}\n".format(ambari_repo_file_url) + \
   "yum clean all; yum install git ambari-server -y\n" + \
-  "mkdir /home ; cd /home ; git clone https://github.com/apache/ambari.git\n; 
+ \
+  "mkdir /home ; cd /home ; git clone https://github.com/apache/ambari.git ; 
cd ambari ; git checkout branch-2.5\n" + \
   "cp -r /home/ambari/ambari-server/src/main/resources/stacks/PERF 
/var/lib/ambari-server/resources/stacks/PERF\n" + \
   "cp -r /home/ambari/ambari-server/src/main/resources/stacks/PERF 
/var/lib/ambari-agent/cache/stacks/PERF\n" + \
   "\n" + \
@@ -384,7 +384,7 @@ def create_agent_script(server_host_name):
   contents = "#!/bin/bash\n" + \
   "wget -O /etc/yum.repos.d/ambari.repo {0}\n".format(ambari_repo_file_url) + \
   "yum clean all; yum install git ambari-agent -y\n" + \
-  "mkdir /home ; cd /home; git clone https://github.com/apache/ambari.git\n; + 
\
+  "mkdir /home ; cd /home; git clone https://github.com/apache/ambari.git ; cd 
ambari ; git checkout branch-2.5\n" + \
   "cp -r /home/ambari/ambari-server/src/main/resources/stacks/PERF 
/var/lib/ambari-agent/cache/stacks/PERF\n" + \
   "sed -i -e 's/hostname=localhost/hostname={0}/g' 
/etc/ambari-agent/conf/ambari-agent.ini\n".format(server_host_name) + \
   "sed -i -e 
's/agent]/agent]\\nhostname_script={0}\\npublic_hostname_script={1}\\n/1' 
/etc/ambari-agent/conf/ambari-agent.ini\n".format(hostname_script, 
public_hostname_script) + \



ambari git commit: AMBARI-19067. Special characters break creating user homes (Laszlo Puskas via magyari_sandor)

2016-12-05 Thread magyari_sandor
Repository: ambari
Updated Branches:
  refs/heads/trunk 7f6ca9d07 -> cac20e090


AMBARI-19067. Special characters break creating user homes (Laszlo Puskas via 
magyari_sandor)


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

Branch: refs/heads/trunk
Commit: cac20e090151785edf2b8176d9ac0bddb1adc86f
Parents: 7f6ca9d
Author: Laszlo Puskas 
Authored: Mon Dec 5 14:07:33 2016 +0100
Committer: Sandor Magyari 
Committed: Mon Dec 5 14:07:33 2016 +0100

--
 .../src/main/resources/scripts/post-user-creation-hook.sh | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/cac20e09/ambari-server/src/main/resources/scripts/post-user-creation-hook.sh
--
diff --git 
a/ambari-server/src/main/resources/scripts/post-user-creation-hook.sh 
b/ambari-server/src/main/resources/scripts/post-user-creation-hook.sh
index 34169c1..ee8d2d1 100755
--- a/ambari-server/src/main/resources/scripts/post-user-creation-hook.sh
+++ b/ambari-server/src/main/resources/scripts/post-user-creation-hook.sh
@@ -84,6 +84,10 @@ echo "[" | cat > "$JSON_INPUT"
 while read -r LINE
 do
   USR_NAME=$(echo "$LINE" | awk -F, '{print $1}')
+  echo "Processing user name: $USR_NAME"
+
+  # encoding the username
+  USR_NAME=$(printf "%q" "$USR_NAME")
 
   cat <> "$JSON_INPUT"
 {
@@ -97,7 +101,10 @@ do
 EOF
 done <"$CSV_FILE"
 
+# deleting the last line
 sed -i '$ d' "$JSON_INPUT"
+
+# appending json closing elements to the end of the file
 echo $'}\n]' | cat >> "$JSON_INPUT"
 echo "Generating file $JSON_INPUT ... DONE."
 echo "Processing post user creation hook payload ... DONE."



ambari git commit: AMBARI-19081. JS error on "User RedHat Satellite" click on step1 installer (onechiporenko)

2016-12-05 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 8ad494e97 -> 7f6ca9d07


AMBARI-19081. JS error on "User RedHat Satellite" click on step1 installer 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: 7f6ca9d07b2f2e389d9e887853238ca3969d99ce
Parents: 8ad494e
Author: Oleg Nechiporenko 
Authored: Mon Dec 5 13:29:05 2016 +0200
Committer: Oleg Nechiporenko 
Committed: Mon Dec 5 13:29:05 2016 +0200

--
 ambari-web/app/styles/wizard.less   |  6 -
 ambari-web/app/templates/wizard/step1.hbs   |  2 +-
 ambari-web/app/views/wizard/step1_view.js   | 21 +-
 .../widgets/slider_config_widget_view_test.js   | 23 
 .../test/views/main/dashboard/widgets_test.js   |  2 +-
 5 files changed, 18 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7f6ca9d0/ambari-web/app/styles/wizard.less
--
diff --git a/ambari-web/app/styles/wizard.less 
b/ambari-web/app/styles/wizard.less
index a4dac8c..57dae45 100644
--- a/ambari-web/app/styles/wizard.less
+++ b/ambari-web/app/styles/wizard.less
@@ -554,6 +554,11 @@
   }
 }
   }
+  .inner-table {
+td {
+  vertical-align: middle;
+}
+  }
   .repos-panel {
 .remove-icon {
   color: red;
@@ -567,7 +572,6 @@
 }
 .repo-url input {
   width: 90%;
-  height: 24px;
 }
 #skip-validation, #use-redhat {
   span.disabled {

http://git-wip-us.apache.org/repos/asf/ambari/blob/7f6ca9d0/ambari-web/app/templates/wizard/step1.hbs
--
diff --git a/ambari-web/app/templates/wizard/step1.hbs 
b/ambari-web/app/templates/wizard/step1.hbs
index 5297d12..8179b41 100644
--- a/ambari-web/app/templates/wizard/step1.hbs
+++ b/ambari-web/app/templates/wizard/step1.hbs
@@ -144,7 +144,7 @@
 {{view view.popoverView 
repositoryBinding="repository"}}
   
   
-
+
   {{view Ember.TextField 
placeholderBinding="repository.placeholder" valueBinding="repository.baseUrl" 
disabledBinding="controller.selectedStack.useRedhatSatellite" 
classNames="form-control"}}
   {{#if 
controller.selectedStack.usePublicRepo}}
 http://git-wip-us.apache.org/repos/asf/ambari/blob/7f6ca9d0/ambari-web/app/views/wizard/step1_view.js
--
diff --git a/ambari-web/app/views/wizard/step1_view.js 
b/ambari-web/app/views/wizard/step1_view.js
index d5cbbb5..161d794 100644
--- a/ambari-web/app/views/wizard/step1_view.js
+++ b/ambari-web/app/views/wizard/step1_view.js
@@ -226,17 +226,18 @@ App.WizardStep1View = Em.View.extend({
 checkedBinding: 'controller.selectedStack.useRedhatSatellite',
 disabledBinding: 'controller.selectedStack.usePublicRepo',
 click: function () {
-  // click triggered before value is toggled, so if-statement is inverted
-  if (this.get('disabled')) return;
-  if (!this.get('controller.selectedStack.useRedhatSatellite')) {
-App.ModalPopup.show({
-  header: Em.I18n.t('common.important'),
-  secondary: false,
-  bodyClass: Ember.View.extend({
-template: 
Ember.Handlebars.compile(Em.I18n.t('installer.step1.advancedRepo.useRedhatSatellite.warning'))
-  })
-});
+  if (!this.get('disabled')) {
+this.toggleProperty('controller.selectedStack.useRedhatSatellite');
+if (this.get('controller.selectedStack.useRedhatSatellite')) {
+  App.ModalPopup.show({
+header: Em.I18n.t('common.important'),
+encodeBody: false,
+secondary: false,
+body: 
Em.I18n.t('installer.step1.advancedRepo.useRedhatSatellite.warning')
+  });
+}
   }
+  return false;
 }
   }),
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/7f6ca9d0/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 a6b25ce..5cc055c 100644
---