ambari git commit: AMBARI-13808. Ambari does not change permissions and owner/group for log and PID directories during install (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk 6f9ef6a9e -> 6be496905 AMBARI-13808. Ambari does not change permissions and owner/group for log and PID directories during install (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6be49690 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6be49690 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6be49690 Branch: refs/heads/trunk Commit: 6be4969058e3c1678bba647eebcffcc67ccc641f Parents: 6f9ef6a Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Nov 10 14:29:31 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Nov 10 14:29:31 2015 +0200 -- .../package/scripts/accumulo_configuration.py | 8 -- .../AMBARI_METRICS/0.1.0/package/scripts/ams.py | 5 +++- .../FLUME/1.4.0.2.0/package/scripts/flume.py| 6 - .../HBASE/0.96.0.2.0/package/scripts/hbase.py | 8 -- .../STORM/0.9.1.2.1/package/scripts/storm.py| 1 + .../3.4.5.2.0/package/scripts/zookeeper.py | 9 --- .../AMBARI_METRICS/test_metrics_collector.py| 3 ++- .../python/stacks/2.0.6/FLUME/test_flume.py | 15 --- .../stacks/2.0.6/HBASE/test_hbase_master.py | 18 +++-- .../2.0.6/HBASE/test_hbase_regionserver.py | 28 +--- .../2.0.6/HBASE/test_phoenix_queryserver.py | 8 ++ .../2.0.6/ZOOKEEPER/test_zookeeper_client.py| 10 +-- .../2.0.6/ZOOKEEPER/test_zookeeper_server.py| 10 +-- .../python/stacks/2.1/STORM/test_storm_base.py | 12 ++--- 14 files changed, 113 insertions(+), 28 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6be49690/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_configuration.py -- diff --git a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_configuration.py b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_configuration.py index d30a460..acc340f 100644 --- a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_configuration.py +++ b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_configuration.py @@ -85,14 +85,18 @@ def setup_conf_dir(name=None): # 'master' or 'tserver' or 'monitor' or 'gc' or ' Directory( params.pid_dir, owner = params.accumulo_user, group = params.user_group, - recursive = True + recursive = True, + cd_access = "a", + mode = 0755, ) # create log dir Directory (params.log_dir, owner = params.accumulo_user, group = params.user_group, - recursive = True + recursive = True, + cd_access = "a", + mode = 0755, ) # create env file http://git-wip-us.apache.org/repos/asf/ambari/blob/6be49690/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py index caac937..50e363c 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py @@ -248,7 +248,8 @@ def ams(name=None): owner=params.ams_user, group=params.user_group, cd_access="a", - recursive=True + recursive=True, + mode=0755, ) # Hack to allow native HBase libs to be included for embedded hbase @@ -333,12 +334,14 @@ def ams(name=None): Directory(params.ams_monitor_log_dir, owner=params.ams_user, group=params.user_group, + mode=0755, recursive=True ) Directory(params.ams_monitor_pid_dir, owner=params.ams_user, group=params.user_group, + mode=0755, recursive=True ) http://git-wip-us.apache.org/repos/asf/ambari/blob/6be49690/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume.py -- diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume.p
ambari git commit: AMBARI-13810. UT failures on branch-2.1 (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 570a7d538 -> 968e9379e AMBARI-13810. UT failures on branch-2.1 (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/968e9379 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/968e9379 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/968e9379 Branch: refs/heads/branch-2.1 Commit: 968e9379ed7e353e18c9b9a43a99fdf3597a3d3f Parents: 570a7d5 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Nov 10 15:12:07 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Nov 10 15:12:07 2015 +0200 -- .../src/test/python/stacks/2.0.6/HDFS/test_namenode.py | 9 - 1 file changed, 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/968e9379/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py index 1608f57..f18d501 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py +++ b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py @@ -1320,15 +1320,6 @@ class TestNamenode(RMFTestCase): self.assertResourceCalled('Execute', ('hdp-select', 'set', 'hadoop-hdfs-namenode', version), sudo=True) self.assertNoMoreResources() -self.assertEquals(1, mocks_dict['call'].call_count) -self.assertEquals(1, mocks_dict['checked_call'].call_count) -self.assertEquals( - ('conf-select', 'set-conf-dir', '--package', 'hadoop', '--stack-version', '2.3.0.0-1234', '--conf-version', '0'), - mocks_dict['checked_call'].call_args_list[0][0][0]) -self.assertEquals( - ('conf-select', 'create-conf-dir', '--package', 'hadoop', '--stack-version', '2.3.0.0-1234', '--conf-version', '0'), - mocks_dict['call'].call_args_list[0][0][0]) - def test_post_upgrade_restart(self): config_file = self.get_src_folder()+"/test/python/stacks/2.0.6/configs/default.json" with open(config_file, "r") as f:
ambari git commit: AMBARI-13676. Unit tests are consistently failing on builds.apache.org (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 a5c8dfc58 -> f024718c6 AMBARI-13676. Unit tests are consistently failing on builds.apache.org (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f024718c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f024718c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f024718c Branch: refs/heads/branch-2.1 Commit: f024718c640baafac9495259cc8af3ece7496c0b Parents: a5c8dfc Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Mon Nov 2 15:52:17 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Mon Nov 2 15:53:00 2015 +0200 -- .../metrics/timeline/TestClusterSuite.java | 2 ++ ...ClusterStackVersionResourceProviderTest.java | 16 +++-- .../internal/UpgradeResourceProviderTest.java | 10 +++--- .../cache/TimelineMetricCacheSizingTest.java| 2 ++ .../stacks/2.1/STORM/test_storm_drpc_server.py | 6 ++-- .../stacks/2.1/STORM/test_storm_nimbus.py | 8 ++--- .../2.1/STORM/test_storm_rest_api_service.py| 38 .../stacks/2.1/STORM/test_storm_supervisor.py | 8 ++--- .../stacks/2.1/STORM/test_storm_ui_server.py| 14 9 files changed, 41 insertions(+), 63 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f024718c/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestClusterSuite.java -- diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestClusterSuite.java b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestClusterSuite.java index 640604d..8405b49 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestClusterSuite.java +++ b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestClusterSuite.java @@ -18,11 +18,13 @@ package org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline; +import org.junit.Ignore; import org.junit.runner.RunWith; import org.junit.runners.Suite; import static org.junit.runners.Suite.SuiteClasses; +@Ignore @RunWith(Suite.class) @SuiteClasses({ITMetricAggregator.class, ITClusterAggregator.class, ITPhoenixHBaseAccessor.class}) public class TestClusterSuite { http://git-wip-us.apache.org/repos/asf/ambari/blob/f024718c/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java index afa1fa2..0188702 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java @@ -71,6 +71,7 @@ import org.apache.ambari.server.state.Clusters; import org.apache.ambari.server.state.ConfigHelper; import org.apache.ambari.server.state.Host; import org.apache.ambari.server.state.MaintenanceState; +import org.apache.ambari.server.state.RepositoryVersionState; import org.apache.ambari.server.state.ServiceComponentHost; import org.apache.ambari.server.state.ServiceInfo; import org.apache.ambari.server.state.ServiceOsSpecific; @@ -257,10 +258,18 @@ public class ClusterStackVersionResourceProviderTest { expect(actionManager.getRequestTasks(anyLong())).andReturn(Collections.emptyList()).anyTimes(); +ClusterEntity clusterEntity = new ClusterEntity(); +clusterEntity.setClusterId(1l); +clusterEntity.setClusterName(clusterName); +ClusterVersionEntity cve = new ClusterVersionEntity(clusterEntity, +repoVersion, RepositoryVersionState.INSTALL_FAILED, 0, ""); + expect(clusterVersionDAO.findByClusterAndStackAndVersion(anyObject(String.class), +anyObject(StackId.class), anyObject(String.class))).andReturn(cve); + // replay replay(managementController, response, clusters, resourceProviderFactory, csvResourceProvider, cluster, repositoryVersionDAOMock, configHelper, sch, actionManager, -executionCommand, exec
ambari git commit: AMBARI-13676. Unit tests are consistently failing on builds.apache.org (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk 0f0cf13d7 -> a6f9562d3 AMBARI-13676. Unit tests are consistently failing on builds.apache.org (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a6f9562d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a6f9562d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a6f9562d Branch: refs/heads/trunk Commit: a6f9562d38cbe0cd7700df4c6e426dd9a05c837a Parents: 0f0cf13 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Mon Nov 2 15:53:36 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Mon Nov 2 15:53:36 2015 +0200 -- .../metrics/timeline/TestClusterSuite.java | 2 ++ .../timeline/cache/TimelineMetricCacheSizingTest.java| 2 ++ .../src/test/python/stacks/2.1/STORM/test_storm_nimbus.py| 8 .../test/python/stacks/2.1/STORM/test_storm_supervisor.py| 8 .../src/test/python/stacks/2.1/STORM/test_storm_ui_server.py | 8 5 files changed, 16 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a6f9562d/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestClusterSuite.java -- diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestClusterSuite.java b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestClusterSuite.java index 640604d..8405b49 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestClusterSuite.java +++ b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestClusterSuite.java @@ -18,11 +18,13 @@ package org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline; +import org.junit.Ignore; import org.junit.runner.RunWith; import org.junit.runners.Suite; import static org.junit.runners.Suite.SuiteClasses; +@Ignore @RunWith(Suite.class) @SuiteClasses({ITMetricAggregator.class, ITClusterAggregator.class, ITPhoenixHBaseAccessor.class}) public class TestClusterSuite { http://git-wip-us.apache.org/repos/asf/ambari/blob/a6f9562d/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricCacheSizingTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricCacheSizingTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricCacheSizingTest.java index 69dcff3..51f16ce 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricCacheSizingTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricCacheSizingTest.java @@ -24,6 +24,7 @@ import org.apache.ambari.server.controller.spi.TemporalInfo; import org.apache.hadoop.metrics2.sink.timeline.TimelineMetric; import org.apache.hadoop.metrics2.sink.timeline.TimelineMetrics; import org.junit.Assert; +import org.junit.Ignore; import org.junit.Test; import java.util.HashSet; import java.util.Set; @@ -55,6 +56,7 @@ public class TimelineMetricCacheSizingTest { return metric; } + @Ignore @Test public void testTimelineMetricCacheSizing() throws Exception { Set metricNames = new HashSet<>(); http://git-wip-us.apache.org/repos/asf/ambari/blob/a6f9562d/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus.py -- diff --git a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus.py b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus.py index d80dde7..4c12470 100644 --- a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus.py +++ b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus.py @@ -66,8 +66,8 @@ class TestStormNimbus(TestStormBase): @patch("os.path.exists") def test_stop_default(self, path_exists_mock): -# Last bool is for the pid file -path_exists_mock.side_effect = [False, False, True] +# Bool for the pid file +path_exists_mock.side_effect = [True] self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/nimbus.py",
[2/2] ambari git commit: AMBARI-13697. local variable 'out' referenced before assignment (aonishuk)
AMBARI-13697. local variable 'out' referenced before assignment (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a1a1942a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a1a1942a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a1a1942a Branch: refs/heads/branch-2.1 Commit: a1a1942a18e3877dee2ba40de361aa93e2935aef Parents: a67b1e1 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Nov 3 17:13:20 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Nov 3 17:13:20 2015 +0200 -- .../main/python/resource_management/core/providers/service.py| 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a1a1942a/ambari-common/src/main/python/resource_management/core/providers/service.py -- diff --git a/ambari-common/src/main/python/resource_management/core/providers/service.py b/ambari-common/src/main/python/resource_management/core/providers/service.py index 50167f1..66f8076 100644 --- a/ambari-common/src/main/python/resource_management/core/providers/service.py +++ b/ambari-common/src/main/python/resource_management/core/providers/service.py @@ -67,7 +67,7 @@ class ServiceProvider(Provider): else: ret,out = shell.call(custom_cmd) else: - ret = self._init_cmd(command) + ret,out = self._init_cmd(command) if expect is not None and expect != ret: raise Fail("%r command %s for service %s failed with return code: %d. %s" % ( @@ -84,7 +84,7 @@ class ServiceProvider(Provider): ret,out = shell.call(["/sbin/" + command, self.resource.service_name]) else: ret,out = shell.call(["/etc/init.d/%s" % self.resource.service_name, command]) -return ret +return ret,out @property def _upstart(self):
[1/2] ambari git commit: AMBARI-13697. local variable 'out' referenced before assignment (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 a67b1e12d -> a1a1942a1 refs/heads/trunk ca7b82983 -> d501a38a1 AMBARI-13697. local variable 'out' referenced before assignment (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d501a38a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d501a38a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d501a38a Branch: refs/heads/trunk Commit: d501a38a144a037f282e53861deb942ea649d88e Parents: ca7b829 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Nov 3 17:13:15 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Nov 3 17:13:15 2015 +0200 -- .../main/python/resource_management/core/providers/service.py| 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d501a38a/ambari-common/src/main/python/resource_management/core/providers/service.py -- diff --git a/ambari-common/src/main/python/resource_management/core/providers/service.py b/ambari-common/src/main/python/resource_management/core/providers/service.py index 50167f1..66f8076 100644 --- a/ambari-common/src/main/python/resource_management/core/providers/service.py +++ b/ambari-common/src/main/python/resource_management/core/providers/service.py @@ -67,7 +67,7 @@ class ServiceProvider(Provider): else: ret,out = shell.call(custom_cmd) else: - ret = self._init_cmd(command) + ret,out = self._init_cmd(command) if expect is not None and expect != ret: raise Fail("%r command %s for service %s failed with return code: %d. %s" % ( @@ -84,7 +84,7 @@ class ServiceProvider(Provider): ret,out = shell.call(["/sbin/" + command, self.resource.service_name]) else: ret,out = shell.call(["/etc/init.d/%s" % self.resource.service_name, command]) -return ret +return ret,out @property def _upstart(self):
[2/3] ambari git commit: AMBARI-13627. Security can not be enabled on cluster with MOTD for "su" (aonishuk)
AMBARI-13627. Security can not be enabled on cluster with MOTD for "su" (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/81d5ccf0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/81d5ccf0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/81d5ccf0 Branch: refs/heads/branch-2.1 Commit: 81d5ccf014516debf1facfdc5db860802571b1fe Parents: 74eb8d1 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Oct 30 15:26:05 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Oct 30 15:26:05 2015 +0200 -- .../common-services/STORM/0.9.1.2.1/package/scripts/service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/81d5ccf0/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/service.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/service.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/service.py index 3210d8a..256d7cd 100644 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/service.py +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/service.py @@ -76,7 +76,7 @@ def service(name, action = 'start'): elif action == "stop": process_dont_exist = format("! ({no_op_test})") -pid = get_user_call_output.get_user_call_output(format("cat {pid_file}"), user=params.storm_user)[1] +pid = get_user_call_output.get_user_call_output(format("! test -f {pid_file} || cat {pid_file}"), user=params.storm_user)[1] Execute(format("{sudo} kill {pid}"), not_if = process_dont_exist)
[1/3] ambari git commit: AMBARI-13627. Security can not be enabled on cluster with MOTD for "su" (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 74eb8d1de -> 81d5ccf01 refs/heads/branch-2.1.2 38f6b0438 -> f3bbecabb refs/heads/trunk 8e06ea681 -> 7e45cd3ef AMBARI-13627. Security can not be enabled on cluster with MOTD for "su" (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7e45cd3e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7e45cd3e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7e45cd3e Branch: refs/heads/trunk Commit: 7e45cd3ef9e2691bb68f3ef12d7fedd1cbdf6ed4 Parents: 8e06ea6 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Oct 30 15:26:01 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Oct 30 15:26:01 2015 +0200 -- .../common-services/STORM/0.9.1.2.1/package/scripts/service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7e45cd3e/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/service.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/service.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/service.py index 3210d8a..256d7cd 100644 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/service.py +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/service.py @@ -76,7 +76,7 @@ def service(name, action = 'start'): elif action == "stop": process_dont_exist = format("! ({no_op_test})") -pid = get_user_call_output.get_user_call_output(format("cat {pid_file}"), user=params.storm_user)[1] +pid = get_user_call_output.get_user_call_output(format("! test -f {pid_file} || cat {pid_file}"), user=params.storm_user)[1] Execute(format("{sudo} kill {pid}"), not_if = process_dont_exist)
[3/3] ambari git commit: AMBARI-13627. Security can not be enabled on cluster with MOTD for "su" (aonishuk)
AMBARI-13627. Security can not be enabled on cluster with MOTD for "su" (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f3bbecab Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f3bbecab Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f3bbecab Branch: refs/heads/branch-2.1.2 Commit: f3bbecabbea659731cc261bdb8191825b3f2aed6 Parents: 38f6b04 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Oct 30 15:26:08 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Oct 30 15:26:08 2015 +0200 -- .../common-services/STORM/0.9.1.2.1/package/scripts/service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f3bbecab/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/service.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/service.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/service.py index 3210d8a..256d7cd 100644 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/service.py +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/service.py @@ -76,7 +76,7 @@ def service(name, action = 'start'): elif action == "stop": process_dont_exist = format("! ({no_op_test})") -pid = get_user_call_output.get_user_call_output(format("cat {pid_file}"), user=params.storm_user)[1] +pid = get_user_call_output.get_user_call_output(format("! test -f {pid_file} || cat {pid_file}"), user=params.storm_user)[1] Execute(format("{sudo} kill {pid}"), not_if = process_dont_exist)
ambari git commit: AMBARI-13717. Couldn`t start the most of services after upgrade from 2.1.2 to 2.1.3.0 (Debian7) (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 409ea0131 -> b90a7e33c AMBARI-13717. Couldn`t start the most of services after upgrade from 2.1.2 to 2.1.3.0 (Debian7) (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b90a7e33 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b90a7e33 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b90a7e33 Branch: refs/heads/branch-2.1 Commit: b90a7e33c74c86d7263cc6059f466378fb2f6329 Parents: 409ea01 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Wed Nov 4 21:52:54 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Wed Nov 4 21:52:54 2015 +0200 -- .../java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b90a7e33/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java index 5d1e934..09979f2 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java @@ -100,7 +100,7 @@ public class UpgradeCatalog213 extends AbstractUpgradeCatalog { "if [ \"$command\" == \"datanode\" ] && [ \"$EUID\" -eq 0 ] && [ -n \"$HADOOP_SECURE_DN_USER\" ]; then\n" + " ulimit -l {{datanode_max_locked_memory}}\n" + "fi\n" + -"{% endif %};\n"; +"{% endif %}\n"; private static final String DOWNGRADE_ALLOWED_COLUMN = "downgrade_allowed"; private static final String UPGRADE_SKIP_FAILURE_COLUMN = "skip_failures";
ambari git commit: AMBARI-13717. Couldn`t start the most of services after upgrade from 2.1.2 to 2.1.3.0 (Debian7) (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk 03a7b9d0e -> b841e95c4 AMBARI-13717. Couldn`t start the most of services after upgrade from 2.1.2 to 2.1.3.0 (Debian7) (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b841e95c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b841e95c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b841e95c Branch: refs/heads/trunk Commit: b841e95c4b9b656101b659efa5493fd3154208ae Parents: 03a7b9d Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Wed Nov 4 21:51:39 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Wed Nov 4 21:51:39 2015 +0200 -- .../java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b841e95c/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java index 743273f..c72809c 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java @@ -100,7 +100,7 @@ public class UpgradeCatalog213 extends AbstractUpgradeCatalog { "if [ \"$command\" == \"datanode\" ] && [ \"$EUID\" -eq 0 ] && [ -n \"$HADOOP_SECURE_DN_USER\" ]; then\n" + " ulimit -l {{datanode_max_locked_memory}}\n" + "fi\n" + -"{% endif %};\n"; +"{% endif %}\n"; private static final String DOWNGRADE_ALLOWED_COLUMN = "downgrade_allowed"; private static final String UPGRADE_SKIP_FAILURE_COLUMN = "skip_failures";
[1/2] ambari git commit: AMBARI-13672. HistoryServer fails to start due to permissions issue (umask 027) (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 55c394829 -> 5985ef4e4 refs/heads/trunk ca4d5b1d6 -> 0492aa4f2 AMBARI-13672. HistoryServer fails to start due to permissions issue (umask 027) (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0492aa4f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0492aa4f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0492aa4f Branch: refs/heads/trunk Commit: 0492aa4f21d12977b914b81bd3f640eeaad01ddc Parents: ca4d5b1 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Mon Nov 2 11:45:26 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Mon Nov 2 11:45:26 2015 +0200 -- .../libraries/functions/copy_tarball.py | 2 +- .../libraries/functions/get_user_call_output.py | 16 +--- .../0.60.0.2.2/package/scripts/params_linux.py | 2 +- .../SLIDER/0.60.0.2.2/package/scripts/slider.py | 6 +++--- .../python/stacks/2.2/SLIDER/test_slider_client.py | 10 +++--- 5 files changed, 21 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0492aa4f/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 51a6a3c..d442852 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 @@ -35,7 +35,7 @@ STACK_VERSION_PATTERN = "{{ stack_version }}" TARBALL_MAP = { "HDP": { -"slider": ("/usr/hdp/{0}/slider/slider.tar.gz".format(STACK_VERSION_PATTERN), +"slider": ("/usr/hdp/{0}/slider/lib/slider.tar.gz".format(STACK_VERSION_PATTERN), "/hdp/apps/{0}/slider/slider.tar.gz".format(STACK_VERSION_PATTERN)), "tez": ("/usr/hdp/{0}/tez/lib/tez.tar.gz".format(STACK_VERSION_PATTERN), "/hdp/apps/{0}/tez/tez.tar.gz".format(STACK_VERSION_PATTERN)), http://git-wip-us.apache.org/repos/asf/ambari/blob/0492aa4f/ambari-common/src/main/python/resource_management/libraries/functions/get_user_call_output.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/get_user_call_output.py b/ambari-common/src/main/python/resource_management/libraries/functions/get_user_call_output.py index 732cc7f..016161c 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/get_user_call_output.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/get_user_call_output.py @@ -23,6 +23,8 @@ Ambari Agent import os import tempfile from resource_management.core import shell +from resource_management.core.logger import Logger +from resource_management.core.exceptions import Fail def get_user_call_output(command, user, quiet=False, is_checked_call=True, **call_kwargs): """ @@ -45,14 +47,22 @@ def get_user_call_output(command, user, quiet=False, is_checked_call=True, **cal command_string += " 1>" + out_files[0].name command_string += " 2>" + out_files[1].name -func = shell.checked_call if is_checked_call else shell.call -func_result = func(shell.as_user(command_string, user), quiet=quiet, **call_kwargs) +code, _ = shell.call(shell.as_user(command_string, user), quiet=quiet, **call_kwargs) files_output = [] for f in out_files: files_output.append(f.read().strip('\n')) + +if code: + all_output = files_output[1] + '\n' + files_output[0] + err_msg = Logger.filter_text(("Execution of '%s' returned %d. %s") % (command_string, code, all_output)) + + if is_checked_call: +raise Fail(err_msg) + else: +Logger.warning(err_msg) -return func_result[0], files_output[0], files_output[1] +return code, files_output[0], files_output[1] finally: for f in out_files: f.close() http://git-wip-us.apache.org/repos/asf/ambari/blob/0492aa4f/ambari-server/src/main/resources/common-services/SLIDER/0.60.0.2.2/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/SLIDER/0.60.0.2.2/package/scripts/params_linux.py b/ambari-server/s
[2/2] ambari git commit: AMBARI-13672. HistoryServer fails to start due to permissions issue (umask 027) (aonishuk)
AMBARI-13672. HistoryServer fails to start due to permissions issue (umask 027) (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5985ef4e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5985ef4e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5985ef4e Branch: refs/heads/branch-2.1 Commit: 5985ef4e47789402edfbd65e9ddb3981d85dca80 Parents: 55c3948 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Mon Nov 2 11:45:31 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Mon Nov 2 11:45:31 2015 +0200 -- .../libraries/functions/copy_tarball.py | 2 +- .../libraries/functions/get_user_call_output.py | 16 +--- .../0.60.0.2.2/package/scripts/params_linux.py | 2 +- .../SLIDER/0.60.0.2.2/package/scripts/slider.py | 6 +++--- .../python/stacks/2.2/SLIDER/test_slider_client.py | 10 +++--- 5 files changed, 21 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5985ef4e/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 51a6a3c..d442852 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 @@ -35,7 +35,7 @@ STACK_VERSION_PATTERN = "{{ stack_version }}" TARBALL_MAP = { "HDP": { -"slider": ("/usr/hdp/{0}/slider/slider.tar.gz".format(STACK_VERSION_PATTERN), +"slider": ("/usr/hdp/{0}/slider/lib/slider.tar.gz".format(STACK_VERSION_PATTERN), "/hdp/apps/{0}/slider/slider.tar.gz".format(STACK_VERSION_PATTERN)), "tez": ("/usr/hdp/{0}/tez/lib/tez.tar.gz".format(STACK_VERSION_PATTERN), "/hdp/apps/{0}/tez/tez.tar.gz".format(STACK_VERSION_PATTERN)), http://git-wip-us.apache.org/repos/asf/ambari/blob/5985ef4e/ambari-common/src/main/python/resource_management/libraries/functions/get_user_call_output.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/get_user_call_output.py b/ambari-common/src/main/python/resource_management/libraries/functions/get_user_call_output.py index 732cc7f..016161c 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/get_user_call_output.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/get_user_call_output.py @@ -23,6 +23,8 @@ Ambari Agent import os import tempfile from resource_management.core import shell +from resource_management.core.logger import Logger +from resource_management.core.exceptions import Fail def get_user_call_output(command, user, quiet=False, is_checked_call=True, **call_kwargs): """ @@ -45,14 +47,22 @@ def get_user_call_output(command, user, quiet=False, is_checked_call=True, **cal command_string += " 1>" + out_files[0].name command_string += " 2>" + out_files[1].name -func = shell.checked_call if is_checked_call else shell.call -func_result = func(shell.as_user(command_string, user), quiet=quiet, **call_kwargs) +code, _ = shell.call(shell.as_user(command_string, user), quiet=quiet, **call_kwargs) files_output = [] for f in out_files: files_output.append(f.read().strip('\n')) + +if code: + all_output = files_output[1] + '\n' + files_output[0] + err_msg = Logger.filter_text(("Execution of '%s' returned %d. %s") % (command_string, code, all_output)) + + if is_checked_call: +raise Fail(err_msg) + else: +Logger.warning(err_msg) -return func_result[0], files_output[0], files_output[1] +return code, files_output[0], files_output[1] finally: for f in out_files: f.close() http://git-wip-us.apache.org/repos/asf/ambari/blob/5985ef4e/ambari-server/src/main/resources/common-services/SLIDER/0.60.0.2.2/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/SLIDER/0.60.0.2.2/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/SLIDER/0.60.0.2.2/package/scripts/params_linux.py index d7bd296..09b7876 100644 --- a/ambari-se
[2/2] ambari git commit: AMBARI-13761. RU: SUSE new stack install failed (aonishuk)
AMBARI-13761. RU: SUSE new stack install failed (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/44608b29 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/44608b29 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/44608b29 Branch: refs/heads/branch-2.1 Commit: 44608b299cd3541fd6b518789632b2a75318347a Parents: a2a633b Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Nov 6 12:49:20 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Nov 6 12:49:20 2015 +0200 -- .../custom_actions/scripts/install_packages.py | 28 +++- .../configs/install_packages_config.json| 9 +++ 2 files changed, 36 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/44608b29/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py -- diff --git a/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py b/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py index dd43c8f..8fc9ab7 100644 --- a/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py +++ b/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py @@ -300,7 +300,8 @@ class InstallPackages(Script): allInstalledPackages(packages_installed_before) packages_installed_before = [package[0] for package in packages_installed_before] packages_were_checked = True - for package in package_list: + filtered_package_list = self.filter_package_list(package_list) + for package in filtered_package_list: name = self.format_package_name(package['name'], self.repository_version) Package(name, use_repos=list(self.current_repo_files) if OSCheck.is_ubuntu_family() else self.current_repositories, @@ -383,6 +384,31 @@ class InstallPackages(Script): def abort_handler(self, signum, frame): Logger.error("Caught signal {0}, will handle it gracefully. Compute the actual version if possible before exiting.".format(signum)) self.check_partial_install() + + def filter_package_list(self, package_list): +""" +Note: that we have skipUpgrade option in metainfo.xml to filter packages, +so use this method only if, for some reason the metainfo option cannot be used. + +Here we filter packages that are managed with custom logic in package +scripts. Usually this packages come from system repositories, and either + are not available when we restrict repository list, or should not be +installed on host at all. +:param package_list: original list +:return: filtered package_list +""" +filtered_package_list = [] +for package in package_list: + skip_package = False + + # skip upgrade for hadooplzo* versioned package, only if lzo is disabled + io_compression_codecs = default("/configurations/core-site/io.compression.codecs", None) + if not io_compression_codecs or "com.hadoop.compression.lzo" not in io_compression_codecs: +skip_package = package['name'].startswith('hadooplzo') + + if not skip_package: +filtered_package_list.append(package) +return filtered_package_list if __name__ == "__main__": http://git-wip-us.apache.org/repos/asf/ambari/blob/44608b29/ambari-server/src/test/python/custom_actions/configs/install_packages_config.json -- diff --git a/ambari-server/src/test/python/custom_actions/configs/install_packages_config.json b/ambari-server/src/test/python/custom_actions/configs/install_packages_config.json index 6ecf8d8..50e327a 100644 --- a/ambari-server/src/test/python/custom_actions/configs/install_packages_config.json +++ b/ambari-server/src/test/python/custom_actions/configs/install_packages_config.json @@ -82,5 +82,14 @@ "hs_host": [ "0b3.vm" ] +}, +"configurations": { +"cluster-env": { +"repo_suse_rhel_template": "[{{repo_id}}]\nname={{repo_id}}\n{% if mirror_list %}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif %}\n\npath=/\nenabled=1\ngpgcheck=0", +"repo_ubuntu_template": "{{package_type}} {{base_url}} {{components}}" +}, +"core-site": { +"io.compression.codecs": "com.hadoop.compression.lzo" +} } }
[1/2] ambari git commit: AMBARI-13761. RU: SUSE new stack install failed (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 a2a633b39 -> 44608b299 refs/heads/trunk 223feece1 -> 18274ea01 AMBARI-13761. RU: SUSE new stack install failed (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/18274ea0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/18274ea0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/18274ea0 Branch: refs/heads/trunk Commit: 18274ea01379527fceb8ee8fe6120dd262544f44 Parents: 223feec Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Nov 6 12:49:17 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Nov 6 12:49:17 2015 +0200 -- .../custom_actions/scripts/install_packages.py | 28 +++- .../configs/install_packages_config.json| 9 +++ 2 files changed, 36 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/18274ea0/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py -- diff --git a/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py b/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py index bec1c39..1dfaa54 100644 --- a/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py +++ b/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py @@ -291,7 +291,8 @@ class InstallPackages(Script): allInstalledPackages(packages_installed_before) packages_installed_before = [package[0] for package in packages_installed_before] packages_were_checked = True - for package in package_list: + filtered_package_list = self.filter_package_list(package_list) + for package in filtered_package_list: name = self.format_package_name(package['name'], self.repository_version) Package(name, use_repos=list(self.current_repo_files) if OSCheck.is_ubuntu_family() else self.current_repositories, @@ -374,6 +375,31 @@ class InstallPackages(Script): def abort_handler(self, signum, frame): Logger.error("Caught signal {0}, will handle it gracefully. Compute the actual version if possible before exiting.".format(signum)) self.check_partial_install() + + def filter_package_list(self, package_list): +""" +Note: that we have skipUpgrade option in metainfo.xml to filter packages, +so use this method only if, for some reason the metainfo option cannot be used. + +Here we filter packages that are managed with custom logic in package +scripts. Usually this packages come from system repositories, and either + are not available when we restrict repository list, or should not be +installed on host at all. +:param package_list: original list +:return: filtered package_list +""" +filtered_package_list = [] +for package in package_list: + skip_package = False + + # skip upgrade for hadooplzo* versioned package, only if lzo is disabled + io_compression_codecs = default("/configurations/core-site/io.compression.codecs", None) + if not io_compression_codecs or "com.hadoop.compression.lzo" not in io_compression_codecs: +skip_package = package['name'].startswith('hadooplzo') + + if not skip_package: +filtered_package_list.append(package) +return filtered_package_list if __name__ == "__main__": http://git-wip-us.apache.org/repos/asf/ambari/blob/18274ea0/ambari-server/src/test/python/custom_actions/configs/install_packages_config.json -- diff --git a/ambari-server/src/test/python/custom_actions/configs/install_packages_config.json b/ambari-server/src/test/python/custom_actions/configs/install_packages_config.json index 6ecf8d8..50e327a 100644 --- a/ambari-server/src/test/python/custom_actions/configs/install_packages_config.json +++ b/ambari-server/src/test/python/custom_actions/configs/install_packages_config.json @@ -82,5 +82,14 @@ "hs_host": [ "0b3.vm" ] +}, +"configurations": { +"cluster-env": { +"repo_suse_rhel_template": "[{{repo_id}}]\nname={{repo_id}}\n{% if mirror_list %}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif %}\n\npath=/\nenabled=1\ngpgcheck=0", +"repo_ubuntu_template": "{{package_type}} {{base_url}} {{components}}" +}, +"core-site": { +"io.compression.codecs": "com.hadoop.compression.lzo" +} } }
ambari git commit: AMBARI-13603. Alerts: Rename "Ambari Agent Disk Usage" alert (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 2ddd0b453 -> 4813cd34c AMBARI-13603. Alerts: Rename "Ambari Agent Disk Usage" alert (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4813cd34 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4813cd34 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4813cd34 Branch: refs/heads/branch-2.1 Commit: 4813cd34cbe117a784ea9fc102e84a63a12e32b1 Parents: 2ddd0b4 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Nov 3 16:27:45 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Nov 3 16:28:28 2015 +0200 -- ambari-server/docs/api/v1/alerts.md | 4 +- .../server/upgrade/UpgradeCatalog213.java | 28 +++--- ambari-server/src/main/resources/alerts.json| 6 +-- .../server/upgrade/UpgradeCatalog213Test.java | 55 ++-- .../assets/data/alerts/alertDefinitions.json| 4 +- .../app/assets/data/alerts/alert_instances.json | 2 +- .../app/assets/data/alerts/alert_summary.json | 2 +- .../test/mappers/alert_instances_mapper_test.js | 2 +- 8 files changed, 81 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4813cd34/ambari-server/docs/api/v1/alerts.md -- diff --git a/ambari-server/docs/api/v1/alerts.md b/ambari-server/docs/api/v1/alerts.md index f2c50a8..1ee13c5 100644 --- a/ambari-server/docs/api/v1/alerts.md +++ b/ambari-server/docs/api/v1/alerts.md @@ -48,7 +48,7 @@ Current alerts can be exposed on the following resource endpoints: "host_name" : "", "id" : 2, "instance" : null, -"label" : "Ambari Agent Disk Usage", +"label" : "Host Disk Usage", "latest_timestamp" : 1425704842163, "maintenance_state" : "OFF", "original_timestamp" : 1425600467615, @@ -188,4 +188,4 @@ History can be exposed on the following resource endpoints: # All alerting events for HDFS and YARN GET api/v1/clusters/c1/alert_history?(AlertHistory/service_name.in(HDFS,YARN)) - \ No newline at end of file + http://git-wip-us.apache.org/repos/asf/ambari/blob/4813cd34/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java index 2823a07..8f1a481 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java @@ -628,19 +628,31 @@ public class UpgradeCatalog213 extends AbstractUpgradeCatalog { Map<String, Cluster> clusterMap = getCheckedClusterMap(clusters); for (final Cluster cluster : clusterMap.values()) { - final AlertDefinitionEntity alertDefinitionEntity = alertDefinitionDAO.findByName( - cluster.getClusterId(), "journalnode_process"); + long clusterID = cluster.getClusterId(); + final AlertDefinitionEntity journalNodeProcessAlertDefinitionEntity = alertDefinitionDAO.findByName( + clusterID, "journalnode_process"); + final AlertDefinitionEntity hostDiskUsageAlertDefinitionEntity = alertDefinitionDAO.findByName( + clusterID, "ambari_agent_disk_usage"); - if (alertDefinitionEntity != null) { -String source = alertDefinitionEntity.getSource(); + if (journalNodeProcessAlertDefinitionEntity != null) { +String source = journalNodeProcessAlertDefinitionEntity.getSource(); - alertDefinitionEntity.setSource(modifyJournalnodeProcessAlertSource(source)); -alertDefinitionEntity.setSourceType(SourceType.WEB); -alertDefinitionEntity.setHash(UUID.randomUUID().toString()); + journalNodeProcessAlertDefinitionEntity.setSource(modifyJournalnodeProcessAlertSource(source)); +journalNodeProcessAlertDefinitionEntity.setSourceType(SourceType.WEB); + journalNodeProcessAlertDefinitionEntity.setHash(UUID.randomUUID().toString()); -alertDefinitionDAO.merge(alertDefinitionEntity); +alertDefinitionDAO.merge(journalNodeProcessAlertDefinitionEntity); LOG.info("journalnode_process alert definition was updated."); } + + if (hostDiskUsageAlertDefinitionEntity != null) { +hostDiskUsageAl
ambari git commit: AMBARI-13603. Alerts: Rename "Ambari Agent Disk Usage" alert (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk 9ce6311f6 -> f24058f79 AMBARI-13603. Alerts: Rename "Ambari Agent Disk Usage" alert (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f24058f7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f24058f7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f24058f7 Branch: refs/heads/trunk Commit: f24058f79e9b12e8c80aa4c03f6b82b0123ce7c3 Parents: 9ce6311 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Nov 3 16:29:16 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Nov 3 16:29:16 2015 +0200 -- ambari-server/docs/api/v1/alerts.md | 4 +- .../server/upgrade/UpgradeCatalog213.java | 34 ++--- ambari-server/src/main/resources/alerts.json| 6 +- .../server/upgrade/UpgradeCatalog213Test.java | 76 .../assets/data/alerts/alertDefinitions.json| 4 +- .../app/assets/data/alerts/alert_instances.json | 2 +- .../app/assets/data/alerts/alert_summary.json | 2 +- .../test/mappers/alert_instances_mapper_test.js | 2 +- 8 files changed, 95 insertions(+), 35 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f24058f7/ambari-server/docs/api/v1/alerts.md -- diff --git a/ambari-server/docs/api/v1/alerts.md b/ambari-server/docs/api/v1/alerts.md index f2c50a8..1ee13c5 100644 --- a/ambari-server/docs/api/v1/alerts.md +++ b/ambari-server/docs/api/v1/alerts.md @@ -48,7 +48,7 @@ Current alerts can be exposed on the following resource endpoints: "host_name" : "", "id" : 2, "instance" : null, -"label" : "Ambari Agent Disk Usage", +"label" : "Host Disk Usage", "latest_timestamp" : 1425704842163, "maintenance_state" : "OFF", "original_timestamp" : 1425600467615, @@ -188,4 +188,4 @@ History can be exposed on the following resource endpoints: # All alerting events for HDFS and YARN GET api/v1/clusters/c1/alert_history?(AlertHistory/service_name.in(HDFS,YARN)) - \ No newline at end of file + http://git-wip-us.apache.org/repos/asf/ambari/blob/f24058f7/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java index 34072dc..895d24b 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java @@ -202,9 +202,9 @@ public class UpgradeCatalog213 extends AbstractUpgradeCatalog { private void executeBlueprintDDLUpdates() throws AmbariException, SQLException { dbAccessor.addColumn(BLUEPRINT_TABLE, new DBAccessor.DBColumnInfo(SECURITY_TYPE_COLUMN, - String.class, 32, "NONE", false)); +String.class, 32, "NONE", false)); dbAccessor.addColumn(BLUEPRINT_TABLE, new DBAccessor.DBColumnInfo(SECURITY_DESCRIPTOR_REF_COLUMN, - String.class, null, null, true)); +String.class, null, null, true)); } /** @@ -628,19 +628,33 @@ public class UpgradeCatalog213 extends AbstractUpgradeCatalog { Map<String, Cluster> clusterMap = getCheckedClusterMap(clusters); for (final Cluster cluster : clusterMap.values()) { - final AlertDefinitionEntity alertDefinitionEntity = alertDefinitionDAO.findByName( -cluster.getClusterId(), "journalnode_process"); + long clusterID = cluster.getClusterId(); - if (alertDefinitionEntity != null) { -String source = alertDefinitionEntity.getSource(); + final AlertDefinitionEntity journalNodeProcessAlertDefinitionEntity = alertDefinitionDAO.findByName( + clusterID, "journalnode_process"); + final AlertDefinitionEntity hostDiskUsageAlertDefinitionEntity = alertDefinitionDAO.findByName( + clusterID, "ambari_agent_disk_usage"); - alertDefinitionEntity.setSource(modifyJournalnodeProcessAlertSource(source)); -alertDefinitionEntity.setSourceType(SourceType.WEB); -alertDefinitionEntity.setHash(UUID.randomUUID().toString()); + if (journalNodeProcessAlertDefinitionEntity != null) { +String source = journalNodeProcessAlertDefinitionEntity.getSource(); -alertDefinitionD
ambari git commit: AMBARI-13676. Unit tests are consistently failing on builds.apache.org (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 16fccc48a -> e596d775a AMBARI-13676. Unit tests are consistently failing on builds.apache.org (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e596d775 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e596d775 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e596d775 Branch: refs/heads/branch-2.1 Commit: e596d775a6076920a866b20c2c693428256d0ee6 Parents: 16fccc4 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Nov 3 12:15:49 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Nov 3 12:15:49 2015 +0200 -- .../metrics/timeline/TestClusterSuite.java | 2 -- 1 file changed, 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e596d775/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestClusterSuite.java -- diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestClusterSuite.java b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestClusterSuite.java index 8405b49..640604d 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestClusterSuite.java +++ b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestClusterSuite.java @@ -18,13 +18,11 @@ package org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline; -import org.junit.Ignore; import org.junit.runner.RunWith; import org.junit.runners.Suite; import static org.junit.runners.Suite.SuiteClasses; -@Ignore @RunWith(Suite.class) @SuiteClasses({ITMetricAggregator.class, ITClusterAggregator.class, ITPhoenixHBaseAccessor.class}) public class TestClusterSuite {
ambari git commit: AMBARI-13676. Unit tests are consistently failing on builds.apache.org (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk a2062703c -> dc0ac133d AMBARI-13676. Unit tests are consistently failing on builds.apache.org (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dc0ac133 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dc0ac133 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dc0ac133 Branch: refs/heads/trunk Commit: dc0ac133dedef8a59550cb060e6afe9a225542ec Parents: a206270 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Nov 3 12:14:37 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Nov 3 12:15:02 2015 +0200 -- .../metrics/timeline/TestClusterSuite.java | 2 -- 1 file changed, 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/dc0ac133/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestClusterSuite.java -- diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestClusterSuite.java b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestClusterSuite.java index 8405b49..640604d 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestClusterSuite.java +++ b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestClusterSuite.java @@ -18,13 +18,11 @@ package org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline; -import org.junit.Ignore; import org.junit.runner.RunWith; import org.junit.runners.Suite; import static org.junit.runners.Suite.SuiteClasses; -@Ignore @RunWith(Suite.class) @SuiteClasses({ITMetricAggregator.class, ITClusterAggregator.class, ITPhoenixHBaseAccessor.class}) public class TestClusterSuite {
[2/2] ambari git commit: AMBARI-13467. ACCUMULO_MASTER start is failing (Josh Elser via aonishuk)
AMBARI-13467. ACCUMULO_MASTER start is failing (Josh Elser via aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c308ea51 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c308ea51 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c308ea51 Branch: refs/heads/branch-2.1 Commit: c308ea513a4a592d7335e9a9a3c23469989b9e6e Parents: 66de959 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Mon Oct 19 14:25:33 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Mon Oct 19 14:25:33 2015 +0300 -- .../ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c308ea51/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py -- diff --git a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py index 6b3aae1..a4e9c54 100644 --- a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py +++ b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py @@ -37,7 +37,7 @@ def accumulo_service( name, ignore_failures=True) if name != 'tserver': Execute(format("{daemon_script} org.apache.accumulo.master.state.SetGoalState NORMAL"), -not_if=pid_exists, +not_if=as_user(pid_exists, params.accumulo_user), user=params.accumulo_user ) address = params.hostname @@ -45,7 +45,7 @@ def accumulo_service( name, address = '0.0.0.0' daemon_cmd = format("{daemon_script} {role} --address {address} > {log_dir}/accumulo-{role}.out 2>{log_dir}/accumulo-{role}.err & echo $! > {pid_file}") Execute ( daemon_cmd, -not_if=pid_exists, +not_if=as_user(pid_exists, params.accumulo_user), user=params.accumulo_user ) @@ -54,11 +54,11 @@ def accumulo_service( name, pid = format("`cat {pid_file}` >/dev/null 2>&1") Execute(format("kill {pid}"), -not_if=no_pid_exists, +not_if=as_user(no_pid_exists, params.accumulo_user), user=params.accumulo_user ) Execute(format("kill -9 {pid}"), -not_if=format("sleep 2; {no_pid_exists} || sleep 20; {no_pid_exists}"), +not_if=as_user(format("sleep 2; {no_pid_exists} || sleep 20; {no_pid_exists}"), params.accumulo_user), ignore_failures=True, user=params.accumulo_user )
[1/2] ambari git commit: AMBARI-13467. ACCUMULO_MASTER start is failing (Josh Elser via aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 66de959d8 -> c308ea513 refs/heads/trunk 0ccc873e8 -> 87999547f AMBARI-13467. ACCUMULO_MASTER start is failing (Josh Elser via aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/87999547 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/87999547 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/87999547 Branch: refs/heads/trunk Commit: 87999547f18c560744a2296853e9106ca377ad5a Parents: 0ccc873 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Mon Oct 19 14:25:30 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Mon Oct 19 14:25:30 2015 +0300 -- .../ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/87999547/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py -- diff --git a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py index 6b3aae1..a4e9c54 100644 --- a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py +++ b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_service.py @@ -37,7 +37,7 @@ def accumulo_service( name, ignore_failures=True) if name != 'tserver': Execute(format("{daemon_script} org.apache.accumulo.master.state.SetGoalState NORMAL"), -not_if=pid_exists, +not_if=as_user(pid_exists, params.accumulo_user), user=params.accumulo_user ) address = params.hostname @@ -45,7 +45,7 @@ def accumulo_service( name, address = '0.0.0.0' daemon_cmd = format("{daemon_script} {role} --address {address} > {log_dir}/accumulo-{role}.out 2>{log_dir}/accumulo-{role}.err & echo $! > {pid_file}") Execute ( daemon_cmd, -not_if=pid_exists, +not_if=as_user(pid_exists, params.accumulo_user), user=params.accumulo_user ) @@ -54,11 +54,11 @@ def accumulo_service( name, pid = format("`cat {pid_file}` >/dev/null 2>&1") Execute(format("kill {pid}"), -not_if=no_pid_exists, +not_if=as_user(no_pid_exists, params.accumulo_user), user=params.accumulo_user ) Execute(format("kill -9 {pid}"), -not_if=format("sleep 2; {no_pid_exists} || sleep 20; {no_pid_exists}"), +not_if=as_user(format("sleep 2; {no_pid_exists} || sleep 20; {no_pid_exists}"), params.accumulo_user), ignore_failures=True, user=params.accumulo_user )
[1/2] ambari git commit: Revert "Revert "AMBARI-13307. Agent instance memory footprint likely gradually growing (aonishuk)""
Repository: ambari Updated Branches: refs/heads/branch-2.1 7ac3e529f -> 8ef722dc3 Revert "Revert "AMBARI-13307. Agent instance memory footprint likely gradually growing (aonishuk)"" This reverts commit 68395ded0d2f6174b9f13a6b6ad0c800308b7d74. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dee7089b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dee7089b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dee7089b Branch: refs/heads/branch-2.1 Commit: dee7089b1cbec527c56bdd8925fae9e421ef7b10 Parents: 7ac3e52 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Thu Oct 8 11:58:20 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Thu Oct 8 11:58:20 2015 +0300 -- ambari-common/src/main/python/resource_management/core/logger.py | 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/dee7089b/ambari-common/src/main/python/resource_management/core/logger.py -- diff --git a/ambari-common/src/main/python/resource_management/core/logger.py b/ambari-common/src/main/python/resource_management/core/logger.py index 7642c6d..0ea34ff 100644 --- a/ambari-common/src/main/python/resource_management/core/logger.py +++ b/ambari-common/src/main/python/resource_management/core/logger.py @@ -37,6 +37,10 @@ class Logger: @staticmethod def initialize_logger(name='resource_management', logging_level=logging.INFO, format='%(asctime)s - %(message)s'): # set up logging (two separate loggers for stderr and stdout with different loglevels) + +if Logger.logger: + return + logger = logging.getLogger(name) logger.setLevel(logging_level) formatter = logging.Formatter(format)
[2/2] ambari git commit: AMBARI-13352. JobHistoryServer start fails with bad permissions on state directory. (aonishuk)
AMBARI-13352. JobHistoryServer start fails with bad permissions on state directory. (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d685062f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d685062f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d685062f Branch: refs/heads/branch-2.1 Commit: d685062f9084614b17d29fccc624181320a465c1 Parents: 8ef722d Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Thu Oct 8 13:11:26 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Thu Oct 8 13:11:26 2015 +0300 -- .../common-services/YARN/2.1.0.2.0/package/scripts/yarn.py | 3 +++ .../src/test/python/stacks/2.0.6/YARN/test_historyserver.py| 6 ++ 2 files changed, 9 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d685062f/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py index 542a5fe..b1b8ded 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py @@ -96,6 +96,9 @@ def yarn(name = None): recursive=True, cd_access="a", ) +Execute(("chown", "-R", format("{mapred_user}:{user_group}"), params.jhs_leveldb_state_store_dir), +sudo = True, +) if name == "nodemanager": http://git-wip-us.apache.org/repos/asf/ambari/blob/d685062f/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py index 45c7978..6901f62 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py +++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py @@ -253,6 +253,9 @@ class TestHistoryServer(RMFTestCase): recursive = True, cd_access = 'a', ) +self.assertResourceCalled('Execute', ('chown', '-R', u'mapred:hadoop', '/hadoop/mapreduce/jhs'), +sudo = True, +) self.assertResourceCalled('Directory', '/var/run/hadoop-yarn', owner = 'yarn', group = 'hadoop', @@ -476,6 +479,9 @@ class TestHistoryServer(RMFTestCase): recursive = True, cd_access = 'a', ) +self.assertResourceCalled('Execute', ('chown', '-R', u'mapred:hadoop', '/hadoop/mapreduce/jhs'), +sudo = True, +) self.assertResourceCalled('Directory', '/var/run/hadoop-yarn', owner = 'yarn', group = 'hadoop',
ambari git commit: AMBARI-13307. Agent instance memory footprint likely gradually growing (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk e9389246d -> c6303b67b AMBARI-13307. Agent instance memory footprint likely gradually growing (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c6303b67 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c6303b67 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c6303b67 Branch: refs/heads/trunk Commit: c6303b67b363790128eea12f99e7d8ad14ecb6d7 Parents: e938924 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Thu Oct 8 13:08:54 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Thu Oct 8 13:08:54 2015 +0300 -- .../main/python/resource_management/core/logger.py | 4 ++-- .../resource_management/libraries/script/script.py | 15 +-- 2 files changed, 7 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c6303b67/ambari-common/src/main/python/resource_management/core/logger.py -- diff --git a/ambari-common/src/main/python/resource_management/core/logger.py b/ambari-common/src/main/python/resource_management/core/logger.py index 7642c6d..f126f1e 100644 --- a/ambari-common/src/main/python/resource_management/core/logger.py +++ b/ambari-common/src/main/python/resource_management/core/logger.py @@ -36,6 +36,8 @@ class Logger: @staticmethod def initialize_logger(name='resource_management', logging_level=logging.INFO, format='%(asctime)s - %(message)s'): +if Logger.logger: + return # set up logging (two separate loggers for stderr and stdout with different loglevels) logger = logging.getLogger(name) logger.setLevel(logging_level) @@ -51,8 +53,6 @@ class Logger: logger.addHandler(chout) Logger.logger = logger - -return logger, chout, cherr @staticmethod def error(text): http://git-wip-us.apache.org/repos/asf/ambari/blob/c6303b67/ambari-common/src/main/python/resource_management/libraries/script/script.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/script/script.py b/ambari-common/src/main/python/resource_management/libraries/script/script.py index fc0428d..3e15898 100644 --- a/ambari-common/src/main/python/resource_management/libraries/script/script.py +++ b/ambari-common/src/main/python/resource_management/libraries/script/script.py @@ -96,7 +96,6 @@ class Script(object): basedir = "" stroutfile = "" logging_level = "" - logger = None # Class variable tmp_dir = "" @@ -117,7 +116,7 @@ class Script(object): Script.structuredOut = json.load(fp) except Exception: errMsg = 'Unable to read structured output from ' + self.stroutfile -self.logger.warn(errMsg) +Logging.logger.exception(errMsg) pass # version is only set in a specific way and should not be carried @@ -178,15 +177,12 @@ class Script(object): Sets up logging; Parses command parameters and executes method relevant to command type """ -logger, chout, cherr = Logger.initialize_logger(__name__) - # parse arguments if len(sys.argv) < 7: - logger.error("Script expects at least 6 arguments") + print "Script expects at least 6 arguments" print USAGE.format(os.path.basename(sys.argv[0])) # print to stdout sys.exit(1) - -self.logger = logger + self.command_name = str.lower(sys.argv[1]) self.command_data_file = sys.argv[2] self.basedir = sys.argv[3] @@ -196,8 +192,7 @@ class Script(object): Script.tmp_dir = sys.argv[6] logging_level_str = logging._levelNames[self.logging_level] -chout.setLevel(logging_level_str) -logger.setLevel(logging_level_str) +Logger.initialize_logger(__name__, logging_level=logging_level_str) # on windows we need to reload some of env variables manually because there is no default paths for configs(like # /etc/something/conf on linux. When this env vars created by one of the Script execution, they can not be updated @@ -216,7 +211,7 @@ class Script(object): Script.passwords[get_path_from_configuration(k, Script.config)] = get_path_from_configuration(v, Script.config) except IOError: - logger.exception("Can not read json file with command parameters: ") + Logging.logger.exception("Can not read json file with command parameters: ") sys.exit(1) # Run class method depending on a command type
ambari git commit: AMBARI-13307. Agent instance memory footprint likely gradually growing (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk 361f0a49d -> 664bde1c6 AMBARI-13307. Agent instance memory footprint likely gradually growing (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/664bde1c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/664bde1c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/664bde1c Branch: refs/heads/trunk Commit: 664bde1c6e15961b39eb673b337be9f7bc6a50d2 Parents: 361f0a4 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Thu Oct 8 18:22:20 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Thu Oct 8 18:22:20 2015 +0300 -- .../python/resource_management/libraries/script/script.py| 4 ++-- .../src/test/python/stacks/2.0.6/FLUME/test_flume.py | 8 +++- 2 files changed, 5 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/664bde1c/ambari-common/src/main/python/resource_management/libraries/script/script.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/script/script.py b/ambari-common/src/main/python/resource_management/libraries/script/script.py index 3e15898..e647c11 100644 --- a/ambari-common/src/main/python/resource_management/libraries/script/script.py +++ b/ambari-common/src/main/python/resource_management/libraries/script/script.py @@ -116,7 +116,7 @@ class Script(object): Script.structuredOut = json.load(fp) except Exception: errMsg = 'Unable to read structured output from ' + self.stroutfile -Logging.logger.exception(errMsg) +Logger.logger.exception(errMsg) pass # version is only set in a specific way and should not be carried @@ -211,7 +211,7 @@ class Script(object): Script.passwords[get_path_from_configuration(k, Script.config)] = get_path_from_configuration(v, Script.config) except IOError: - Logging.logger.exception("Can not read json file with command parameters: ") + Logger.logger.exception("Can not read json file with command parameters: ") sys.exit(1) # Run class method depending on a command type http://git-wip-us.apache.org/repos/asf/ambari/blob/664bde1c/ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py b/ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py index 28b0802..6642603 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py +++ b/ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py @@ -163,20 +163,18 @@ class TestFlumeHandler(RMFTestCase): self.assertFalse("version" in script.structuredOut) - @patch("resource_management.libraries.script.Script.logger", autospec = True) - def test_bad_struct_out(self, logger_mock): + def test_bad_struct_out(self): from resource_management.libraries.script import Script - - logger_mock.warn = MagicMock() + from resource_management.core.logger import Logger configs_path = os.path.join(RMFTestCase.get_src_folder(), "test/python/stacks", self.STACK_VERSION, "configs") + Logger.initialize_logger() script = Script() script.stroutfile = os.path.join(configs_path, "structured-out-status-bad.json") script.load_structured_out() - self.assertTrue(logger_mock.warn.called) self.assertTrue(script.structuredOut == {}) @patch("resource_management.libraries.script.Script.put_structured_out")
[2/2] ambari git commit: AMBARI-13434. Expose Alert Grace Period Setting in Agents (aonishuk)
AMBARI-13434. Expose Alert Grace Period Setting in Agents (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/86431d52 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/86431d52 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/86431d52 Branch: refs/heads/branch-2.1 Commit: 86431d5215a3441e8bdbadaca4d360d88ed2d3dc Parents: 119a50f Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Oct 16 13:07:44 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Oct 16 13:07:44 2015 +0300 -- ambari-agent/conf/unix/ambari-agent.ini | 1 + ambari-agent/conf/windows/ambari-agent.ini | 1 + .../ambari_agent/AlertSchedulerHandler.py | 21 ++- .../src/main/python/ambari_agent/Controller.py | 4 +++- .../ambari_agent/TestAlertSchedulerHandler.py | 22 ++-- .../src/test/python/ambari_agent/TestAlerts.py | 8 +++ 6 files changed, 31 insertions(+), 26 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/86431d52/ambari-agent/conf/unix/ambari-agent.ini -- diff --git a/ambari-agent/conf/unix/ambari-agent.ini b/ambari-agent/conf/unix/ambari-agent.ini index 3b7631c..80afdb2 100644 --- a/ambari-agent/conf/unix/ambari-agent.ini +++ b/ambari-agent/conf/unix/ambari-agent.ini @@ -29,6 +29,7 @@ cache_dir=/var/lib/ambari-agent/cache tolerate_download_failures=true run_as_user=root parallel_execution=0 +alert_grace_period=5 [security] keysdir=/var/lib/ambari-agent/keys http://git-wip-us.apache.org/repos/asf/ambari/blob/86431d52/ambari-agent/conf/windows/ambari-agent.ini -- diff --git a/ambari-agent/conf/windows/ambari-agent.ini b/ambari-agent/conf/windows/ambari-agent.ini index 972e11e..1b24f25 100644 --- a/ambari-agent/conf/windows/ambari-agent.ini +++ b/ambari-agent/conf/windows/ambari-agent.ini @@ -29,6 +29,7 @@ ping_port=8670 cache_dir=cache tolerate_download_failures=true parallel_execution=0 +alert_grace_period=5 [security] keysdir=keys http://git-wip-us.apache.org/repos/asf/ambari/blob/86431d52/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py b/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py index cddee57..d3aab87 100644 --- a/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py +++ b/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py @@ -43,14 +43,8 @@ class AlertSchedulerHandler(): TYPE_SCRIPT = 'SCRIPT' TYPE_WEB = 'WEB' - APS_CONFIG = { -'threadpool.core_threads': 3, -'coalesce': True, -'standalone': False - } - def __init__(self, cachedir, stacks_dir, common_services_dir, host_scripts_dir, - cluster_configuration, config, in_minutes=True): + alert_grace_period, cluster_configuration, config, in_minutes=True): self.cachedir = cachedir self.stacks_dir = stacks_dir @@ -65,8 +59,15 @@ class AlertSchedulerHandler(): except: logger.critical("[AlertScheduler] Could not create the cache directory {0}".format(cachedir)) +self.APS_CONFIG = { + 'apscheduler.threadpool.core_threads': 3, + 'apscheduler.coalesce': True, + 'apscheduler.standalone': False, + 'apscheduler.misfire_grace_time': alert_grace_period +} + self._collector = AlertCollector() -self.__scheduler = Scheduler(AlertSchedulerHandler.APS_CONFIG) +self.__scheduler = Scheduler(self.APS_CONFIG) self.__in_minutes = in_minutes self.config = config @@ -122,7 +123,7 @@ class AlertSchedulerHandler(): if self.__scheduler.running: self.__scheduler.shutdown(wait=False) - self.__scheduler = Scheduler(AlertSchedulerHandler.APS_CONFIG) + self.__scheduler = Scheduler(self.APS_CONFIG) alert_callables = self.__load_definitions() @@ -139,7 +140,7 @@ class AlertSchedulerHandler(): def stop(self): if not self.__scheduler is None: self.__scheduler.shutdown(wait=False) - self.__scheduler = Scheduler(AlertSchedulerHandler.APS_CONFIG) + self.__scheduler = Scheduler(self.APS_CONFIG) logger.info("[AlertScheduler] Stopped the alert scheduler.") http://git-wip-us.apache.org/repos/asf/ambari/blob/86431d52/ambari-agent/src/main/python/ambari_agent/Controller.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/Controller.py b/ambari-agent/src/main/python/ambari_agent/Controller.py index 74a8eac..4ba5c
[1/2] ambari git commit: AMBARI-13434. Expose Alert Grace Period Setting in Agents (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 119a50fcf -> 86431d521 refs/heads/trunk 082db1cc2 -> a509510ee AMBARI-13434. Expose Alert Grace Period Setting in Agents (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a509510e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a509510e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a509510e Branch: refs/heads/trunk Commit: a509510ee7fca526178afbed93847112b510b59d Parents: 082db1c Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Oct 16 13:07:42 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Oct 16 13:07:42 2015 +0300 -- ambari-agent/conf/unix/ambari-agent.ini | 1 + ambari-agent/conf/windows/ambari-agent.ini | 1 + .../ambari_agent/AlertSchedulerHandler.py | 21 ++- .../src/main/python/ambari_agent/Controller.py | 4 +++- .../ambari_agent/TestAlertSchedulerHandler.py | 22 ++-- .../src/test/python/ambari_agent/TestAlerts.py | 8 +++ 6 files changed, 31 insertions(+), 26 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a509510e/ambari-agent/conf/unix/ambari-agent.ini -- diff --git a/ambari-agent/conf/unix/ambari-agent.ini b/ambari-agent/conf/unix/ambari-agent.ini index 3b7631c..80afdb2 100644 --- a/ambari-agent/conf/unix/ambari-agent.ini +++ b/ambari-agent/conf/unix/ambari-agent.ini @@ -29,6 +29,7 @@ cache_dir=/var/lib/ambari-agent/cache tolerate_download_failures=true run_as_user=root parallel_execution=0 +alert_grace_period=5 [security] keysdir=/var/lib/ambari-agent/keys http://git-wip-us.apache.org/repos/asf/ambari/blob/a509510e/ambari-agent/conf/windows/ambari-agent.ini -- diff --git a/ambari-agent/conf/windows/ambari-agent.ini b/ambari-agent/conf/windows/ambari-agent.ini index 972e11e..1b24f25 100644 --- a/ambari-agent/conf/windows/ambari-agent.ini +++ b/ambari-agent/conf/windows/ambari-agent.ini @@ -29,6 +29,7 @@ ping_port=8670 cache_dir=cache tolerate_download_failures=true parallel_execution=0 +alert_grace_period=5 [security] keysdir=keys http://git-wip-us.apache.org/repos/asf/ambari/blob/a509510e/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py b/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py index cddee57..d3aab87 100644 --- a/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py +++ b/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py @@ -43,14 +43,8 @@ class AlertSchedulerHandler(): TYPE_SCRIPT = 'SCRIPT' TYPE_WEB = 'WEB' - APS_CONFIG = { -'threadpool.core_threads': 3, -'coalesce': True, -'standalone': False - } - def __init__(self, cachedir, stacks_dir, common_services_dir, host_scripts_dir, - cluster_configuration, config, in_minutes=True): + alert_grace_period, cluster_configuration, config, in_minutes=True): self.cachedir = cachedir self.stacks_dir = stacks_dir @@ -65,8 +59,15 @@ class AlertSchedulerHandler(): except: logger.critical("[AlertScheduler] Could not create the cache directory {0}".format(cachedir)) +self.APS_CONFIG = { + 'apscheduler.threadpool.core_threads': 3, + 'apscheduler.coalesce': True, + 'apscheduler.standalone': False, + 'apscheduler.misfire_grace_time': alert_grace_period +} + self._collector = AlertCollector() -self.__scheduler = Scheduler(AlertSchedulerHandler.APS_CONFIG) +self.__scheduler = Scheduler(self.APS_CONFIG) self.__in_minutes = in_minutes self.config = config @@ -122,7 +123,7 @@ class AlertSchedulerHandler(): if self.__scheduler.running: self.__scheduler.shutdown(wait=False) - self.__scheduler = Scheduler(AlertSchedulerHandler.APS_CONFIG) + self.__scheduler = Scheduler(self.APS_CONFIG) alert_callables = self.__load_definitions() @@ -139,7 +140,7 @@ class AlertSchedulerHandler(): def stop(self): if not self.__scheduler is None: self.__scheduler.shutdown(wait=False) - self.__scheduler = Scheduler(AlertSchedulerHandler.APS_CONFIG) + self.__scheduler = Scheduler(self.APS_CONFIG) logger.info("[AlertScheduler] Stopped the alert scheduler.") http://git-wip-us.apache.org/repos/asf/ambari/blob/a509510e/ambari-agent/src/main/python/ambari_agent/Controller.py -- diff --git a/amb
[1/2] ambari git commit: AMBARI-13452. RegionServer Upgrade verification is not case sensitive (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 d1361f716 -> 66251218c refs/heads/trunk 34082a5a7 -> 8bb2b14fb AMBARI-13452. RegionServer Upgrade verification is not case sensitive (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8bb2b14f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8bb2b14f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8bb2b14f Branch: refs/heads/trunk Commit: 8bb2b14fb3ac7d80031d618767e3b43972ad0f0f Parents: 34082a5 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Oct 16 16:01:05 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Oct 16 16:01:05 2015 +0300 -- .../common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8bb2b14f/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py -- diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py index 44bf958..a9ccede 100644 --- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py +++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py @@ -40,8 +40,7 @@ def post_regionserver(env): check_cmd = "echo 'status \"simple\"' | {0} shell".format(params.hbase_cmd) exec_cmd = "{0} {1}".format(params.kinit_cmd, check_cmd) - call_and_match(exec_cmd, params.hbase_user, params.hostname.lower() + ":") - + call_and_match(exec_cmd, params.hbase_user, params.hostname + ":") @retry(times=15, sleep_time=2, err_class=Fail) def call_and_match(cmd, user, regex):
[2/2] ambari git commit: AMBARI-13452. RegionServer Upgrade verification is not case sensitive (aonishuk)
AMBARI-13452. RegionServer Upgrade verification is not case sensitive (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/66251218 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/66251218 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/66251218 Branch: refs/heads/branch-2.1 Commit: 66251218c7fcbcde3cbef781f5cfebeec8f8ba32 Parents: d1361f7 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Oct 16 16:01:12 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Oct 16 16:01:12 2015 +0300 -- .../common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/66251218/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py -- diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py index 44bf958..a9ccede 100644 --- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py +++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py @@ -40,8 +40,7 @@ def post_regionserver(env): check_cmd = "echo 'status \"simple\"' | {0} shell".format(params.hbase_cmd) exec_cmd = "{0} {1}".format(params.kinit_cmd, check_cmd) - call_and_match(exec_cmd, params.hbase_user, params.hostname.lower() + ":") - + call_and_match(exec_cmd, params.hbase_user, params.hostname + ":") @retry(times=15, sleep_time=2, err_class=Fail) def call_and_match(cmd, user, regex):
ambari git commit: AMBARI-13437. HDFS File caching does not work because of ulimit not being passed into the start command for datanode. (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 8738b7ee6 -> 70c8adac7 AMBARI-13437. HDFS File caching does not work because of ulimit not being passed into the start command for datanode. (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/70c8adac Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/70c8adac Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/70c8adac Branch: refs/heads/branch-2.1 Commit: 70c8adac7d1e6cd6592f0dc0da66a9b4eff0256e Parents: 8738b7e Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Thu Oct 15 20:01:42 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Thu Oct 15 20:01:42 2015 +0300 -- .../server/upgrade/UpgradeCatalog213.java | 25 .../HDFS/2.1.0.2.0/configuration/hadoop-env.xml | 8 +++ .../2.0.6/hooks/before-ANY/scripts/params.py| 3 +++ .../services/HDFS/configuration/hadoop-env.xml | 8 +++ .../services/HDFS/configuration/hadoop-env.xml | 8 +++ .../server/upgrade/UpgradeCatalog213Test.java | 4 6 files changed, 56 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/70c8adac/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java index 7a42b3b..a94723f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java @@ -83,7 +83,15 @@ public class UpgradeCatalog213 extends AbstractUpgradeCatalog { private static final String AMS_ENV = "ams-env"; private static final String AMS_HBASE_ENV = "ams-hbase-env"; private static final String HBASE_ENV_CONFIG = "hbase-env"; + private static final String HADOOP_ENV_CONFIG = "hadoop-env"; private static final String CONTENT_PROPERTY = "content"; + private static final String HADOOP_ENV_CONTENT_TO_APPEND = "\n{% if is_datanode_max_locked_memory_set %}\n" + +"# Fix temporary bug, when ulimit from conf files is not picked up, without full relogin. \n" + +"# Makes sense to fix only when runing DN as root \n" + +"if [ \"$command\" == \"datanode\" ] && [ \"$EUID\" -eq 0 ] && [ -n \"$HADOOP_SECURE_DN_USER\" ]; then\n" + +" ulimit -l {{datanode_max_locked_memory}}\n" + +"fi\n" + +"{% endif %};\n"; public static final String UPGRADE_PACKAGE_COL = "upgrade_package"; public static final String UPGRADE_TYPE_COL = "upgrade_type"; @@ -174,6 +182,7 @@ public class UpgradeCatalog213 extends AbstractUpgradeCatalog { bootstrapRepoVersionForHDP21(); addNewConfigurationsFromXml(); +updateHadoopEnv(); updateStormConfigs(); updateAMSConfigs(); updateHDFSConfigs(); @@ -575,6 +584,22 @@ public class UpgradeCatalog213 extends AbstractUpgradeCatalog { return rootJson.toString(); } + + protected void updateHadoopEnv() throws AmbariException { +AmbariManagementController ambariManagementController = injector.getInstance(AmbariManagementController.class); + +for (final Cluster cluster : getCheckedClusterMap(ambariManagementController.getClusters()).values()) { + Config hadoopEnvConfig = cluster.getDesiredConfigByType(HADOOP_ENV_CONFIG); + if (hadoopEnvConfig != null) { +String content = hadoopEnvConfig.getProperties().get(CONTENT_PROPERTY); +if (content != null) { + content += HADOOP_ENV_CONTENT_TO_APPEND; + Map<String, String> updates = Collections.singletonMap(CONTENT_PROPERTY, content); + updateConfigurationPropertiesForCluster(cluster, HADOOP_ENV_CONFIG, updates, true, false); +} + } +} + } protected void updateHDFSConfigs() throws AmbariException { AmbariManagementController ambariManagementController = injector.getInstance( http://git-wip-us.apache.org/repos/asf/ambari/blob/70c8adac/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/
ambari git commit: AMBARI-13437. HDFS File caching does not work because of ulimit not being passed into the start command for datanode. (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk 81280ea39 -> 52083d1ff AMBARI-13437. HDFS File caching does not work because of ulimit not being passed into the start command for datanode. (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/52083d1f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/52083d1f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/52083d1f Branch: refs/heads/trunk Commit: 52083d1ff8425948485149cd1c862ba9ddcb58db Parents: 81280ea Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Thu Oct 15 19:58:01 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Thu Oct 15 19:58:27 2015 +0300 -- .../server/upgrade/UpgradeCatalog213.java | 25 .../HDFS/2.1.0.2.0/configuration/hadoop-env.xml | 8 +++ .../2.0.6/hooks/before-ANY/scripts/params.py| 3 +++ .../services/HDFS/configuration/hadoop-env.xml | 8 +++ .../services/HDFS/configuration/hadoop-env.xml | 8 +++ .../server/upgrade/UpgradeCatalog213Test.java | 4 6 files changed, 56 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/52083d1f/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java index 90a75be..803e5f4 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java @@ -58,7 +58,15 @@ public class UpgradeCatalog213 extends AbstractUpgradeCatalog { private static final String AMS_ENV = "ams-env"; private static final String AMS_HBASE_ENV = "ams-hbase-env"; private static final String HBASE_ENV_CONFIG = "hbase-env"; + private static final String HADOOP_ENV_CONFIG = "hadoop-env"; private static final String CONTENT_PROPERTY = "content"; + private static final String HADOOP_ENV_CONTENT_TO_APPEND = "\n{% if is_datanode_max_locked_memory_set %}\n" + +"# Fix temporary bug, when ulimit from conf files is not picked up, without full relogin. \n" + +"# Makes sense to fix only when runing DN as root \n" + +"if [ \"$command\" == \"datanode\" ] && [ \"$EUID\" -eq 0 ] && [ -n \"$HADOOP_SECURE_DN_USER\" ]; then\n" + +" ulimit -l {{datanode_max_locked_memory}}\n" + +"fi\n" + +"{% endif %};\n"; private static final String KERBEROS_DESCRIPTOR_TABLE = "kerberos_descriptor"; private static final String KERBEROS_DESCRIPTOR_NAME_COLUMN = "kerberos_descriptor_name"; @@ -141,6 +149,7 @@ public class UpgradeCatalog213 extends AbstractUpgradeCatalog { updateAMSConfigs(); updateHDFSConfigs(); updateHbaseEnvConfig(); +updateHadoopEnv(); updateKafkaConfigs(); } @@ -212,6 +221,22 @@ public class UpgradeCatalog213 extends AbstractUpgradeCatalog { return rootJson.toString(); } + + protected void updateHadoopEnv() throws AmbariException { +AmbariManagementController ambariManagementController = injector.getInstance(AmbariManagementController.class); + +for (final Cluster cluster : getCheckedClusterMap(ambariManagementController.getClusters()).values()) { + Config hadoopEnvConfig = cluster.getDesiredConfigByType(HADOOP_ENV_CONFIG); + if (hadoopEnvConfig != null) { +String content = hadoopEnvConfig.getProperties().get(CONTENT_PROPERTY); +if (content != null) { + content += HADOOP_ENV_CONTENT_TO_APPEND; + Map<String, String> updates = Collections.singletonMap(CONTENT_PROPERTY, content); + updateConfigurationPropertiesForCluster(cluster, HADOOP_ENV_CONFIG, updates, true, false); +} + } +} + } protected void updateHDFSConfigs() throws AmbariException { AmbariManagementController ambariManagementController = injector.getInstance( http://git-wip-us.apache.org/repos/asf/ambari/blob/52083d1f/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0
[1/2] ambari git commit: AMBARI-13454. Make HDP 2.0 stack inactive for Ambari 2.1.3 (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 05c000b8c -> ce74af8aa refs/heads/trunk 88175691e -> e3958e2da AMBARI-13454. Make HDP 2.0 stack inactive for Ambari 2.1.3 (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e3958e2d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e3958e2d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e3958e2d Branch: refs/heads/trunk Commit: e3958e2da099f783ce637a57d752353fafd3f5b9 Parents: 8817569 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Oct 16 17:25:05 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Oct 16 17:25:05 2015 +0300 -- .../2.1.0.2.0/package/scripts/params_linux.py | 7 +- .../0.12.0.2.0/package/scripts/params_linux.py | 20 +--- .../4.0.0.2.0/package/scripts/params_linux.py | 2 +- .../2.0.6/hooks/after-INSTALL/scripts/params.py | 6 + .../2.0.6/hooks/before-ANY/scripts/params.py| 6 + .../2.0.6/hooks/before-START/scripts/params.py | 6 + .../main/resources/stacks/HDP/2.0/metainfo.xml | 2 +- .../stacks/2.0.6/HIVE/test_hcat_client.py | 8 +++ .../stacks/2.0.6/HIVE/test_hive_metastore.py| 8 +++ .../stacks/2.0.6/HIVE/test_webhcat_server.py| 24 ++-- 10 files changed, 36 insertions(+), 53 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e3958e2d/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py index 38eac2e..4cbce34 100644 --- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py @@ -106,12 +106,7 @@ hdfs_user_nofile_limit = default("/configurations/hadoop-env/hdfs_user_nofile_li hdfs_user_nproc_limit = default("/configurations/hadoop-env/hdfs_user_nproc_limit", "65536") create_lib_snappy_symlinks = not Script.is_hdp_stack_greater_or_equal("2.2") - -if Script.is_hdp_stack_greater_or_equal("2.0") and Script.is_hdp_stack_less_than("2.1") and not OSCheck.is_suse_family(): - # deprecated rhel jsvc_path - jsvc_path = "/usr/libexec/bigtop-utils" -else: - jsvc_path = "/usr/lib/bigtop-utils" +jsvc_path = "/usr/lib/bigtop-utils" execute_path = os.environ['PATH'] + os.pathsep + hadoop_bin_dir ulimit_cmd = "ulimit -c unlimited ; " http://git-wip-us.apache.org/repos/asf/ambari/blob/e3958e2d/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py index e16df78..14cf1ac 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py @@ -49,7 +49,7 @@ hostname = config["hostname"] # This is expected to be of the form #.#.#.# stack_version_unformatted = str(config['hostLevelParams']['stack_version']) hdp_stack_version_major = format_hdp_stack_version(stack_version_unformatted) -stack_is_hdp21 = Script.is_hdp_stack_greater_or_equal("2.0") and Script.is_hdp_stack_less_than("2.2") +stack_is_hdp21 = Script.is_hdp_stack_less_than("2.2") # this is not available on INSTALL action because hdp-select is not available hdp_stack_version = functions.get_hdp_version('hive-server2') @@ -83,10 +83,6 @@ sqoop_tar_file = '/usr/share/HDP-webhcat/sqoop*.tar.gz' hive_specific_configs_supported = False hive_etc_dir_prefix = "/etc/hive" limits_conf_dir = "/etc/security/limits.d" -hcat_conf_dir = '/etc/hcatalog/conf' -config_dir = '/etc/hcatalog/conf' -hcat_lib = '/usr/lib/hcatalog/share/hcatalog' -webhcat_bin_dir = '/usr/lib/hcatalog/sbin' hive_user_nofile_limit = default("/configurations/hive-env/hive_user_nofile_limit", "32000") hive_user_nproc_limit = default("/configurations/hive-env/hive_user_nproc_limit", "16000") @@ -101,11 +97,10 @@ hive_config_dir = status_params.hive_config_dir hive_client_conf_dir = sta
[1/2] ambari git commit: AMBARI-13452. RegionServer Upgrade verification is not case sensitive (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 ce74af8aa -> 60ae0778c refs/heads/trunk e3958e2da -> e89a0036a AMBARI-13452. RegionServer Upgrade verification is not case sensitive (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e89a0036 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e89a0036 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e89a0036 Branch: refs/heads/trunk Commit: e89a0036a4155e40ee53c3efa6b77defcbd2aece Parents: e3958e2 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Oct 16 17:59:01 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Oct 16 17:59:01 2015 +0300 -- .../HBASE/0.96.0.2.0/package/scripts/upgrade.py| 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e89a0036/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py -- diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py index a9ccede..00040fa 100644 --- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py +++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py @@ -40,12 +40,12 @@ def post_regionserver(env): check_cmd = "echo 'status \"simple\"' | {0} shell".format(params.hbase_cmd) exec_cmd = "{0} {1}".format(params.kinit_cmd, check_cmd) - call_and_match(exec_cmd, params.hbase_user, params.hostname + ":") + call_and_match(exec_cmd, params.hbase_user, params.hostname + ":", re.IGNORECASE) @retry(times=15, sleep_time=2, err_class=Fail) -def call_and_match(cmd, user, regex): +def call_and_match(cmd, user, regex, regex_search_flags): code, out = shell.call(cmd, user=user) - if not (out and re.search(regex, out)): + if not (out and re.search(regex, out, regex_search_flags)): raise Fail("Could not verify RS available")
[2/2] ambari git commit: AMBARI-13452. RegionServer Upgrade verification is not case sensitive (aonishuk)
AMBARI-13452. RegionServer Upgrade verification is not case sensitive (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/60ae0778 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/60ae0778 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/60ae0778 Branch: refs/heads/branch-2.1 Commit: 60ae0778c6e165a3b4ecc23f76f66c20893e3b59 Parents: ce74af8 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Oct 16 17:59:03 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Oct 16 17:59:03 2015 +0300 -- .../HBASE/0.96.0.2.0/package/scripts/upgrade.py| 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/60ae0778/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py -- diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py index a9ccede..00040fa 100644 --- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py +++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/upgrade.py @@ -40,12 +40,12 @@ def post_regionserver(env): check_cmd = "echo 'status \"simple\"' | {0} shell".format(params.hbase_cmd) exec_cmd = "{0} {1}".format(params.kinit_cmd, check_cmd) - call_and_match(exec_cmd, params.hbase_user, params.hostname + ":") + call_and_match(exec_cmd, params.hbase_user, params.hostname + ":", re.IGNORECASE) @retry(times=15, sleep_time=2, err_class=Fail) -def call_and_match(cmd, user, regex): +def call_and_match(cmd, user, regex, regex_search_flags): code, out = shell.call(cmd, user=user) - if not (out and re.search(regex, out)): + if not (out and re.search(regex, out, regex_search_flags)): raise Fail("Could not verify RS available")
[1/2] ambari git commit: AMBARI-13490. If there are more than one ambari-server*jar in classpath we should fail to start (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 466833dc9 -> 8bc1a98a5 refs/heads/trunk 99de0edb7 -> 1cd72bddd AMBARI-13490. If there are more than one ambari-server*jar in classpath we should fail to start (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1cd72bdd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1cd72bdd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1cd72bdd Branch: refs/heads/trunk Commit: 1cd72bddd362dbc8916759ef4f0e5b7b5531b0bd Parents: 99de0ed Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Oct 20 17:19:54 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Oct 20 17:19:54 2015 +0300 -- .../ambari/server/controller/AmbariServer.java | 26 1 file changed, 26 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1cd72bdd/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java index 8f3869f..5bc0962 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java @@ -20,10 +20,13 @@ package org.apache.ambari.server.controller; import java.io.File; +import java.io.IOException; import java.net.Authenticator; import java.net.BindException; import java.net.PasswordAuthentication; +import java.net.URL; import java.util.EnumSet; +import java.util.Enumeration; import java.util.Map; import javax.crypto.BadPaddingException; @@ -150,6 +153,29 @@ public class AmbariServer { static { Velocity.setProperty("runtime.log.logsystem.log4j.logger", VELOCITY_LOG_CATEGORY); } + + private static final String CLASSPATH_CHECK_CLASS = "org/apache/ambari/server/controller/AmbariServer.class"; + private static final String CLASSPATH_SANITY_CHECK_FAILURE_MESSAGE = "%s class is found in multiple jar files. Possible reasons include multiple ambari server jar files in the ambari classpath.\n" + + "Check for additional ambari server jar files and check that /usr/lib/ambari-server/ambari-server*.jar matches only one file."; + + static { +Enumeration ambariServerClassUrls; +try { + ambariServerClassUrls = AmbariServer.class.getClassLoader().getResources(CLASSPATH_CHECK_CLASS); + + int ambariServerClassUrlsSize = 0; + while(ambariServerClassUrls.hasMoreElements()){ +ambariServerClassUrlsSize++; +URL url = ambariServerClassUrls.nextElement(); +LOG.info(String.format("Found %s class in %s", CLASSPATH_CHECK_CLASS, url.getPath())); + } + if(ambariServerClassUrlsSize>1) { +throw new RuntimeException(String.format(CLASSPATH_SANITY_CHECK_FAILURE_MESSAGE, CLASSPATH_CHECK_CLASS)); + } +} catch (IOException e) { +e.printStackTrace(); +} + } private Server server = null;
[2/2] ambari git commit: AMBARI-13490. If there are more than one ambari-server*jar in classpath we should fail to start (aonishuk)
AMBARI-13490. If there are more than one ambari-server*jar in classpath we should fail to start (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8bc1a98a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8bc1a98a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8bc1a98a Branch: refs/heads/branch-2.1 Commit: 8bc1a98a5d50c78d9adb0f350d3dedaa9d723548 Parents: 466833d Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Oct 20 17:19:59 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Oct 20 17:19:59 2015 +0300 -- .../ambari/server/controller/AmbariServer.java | 26 1 file changed, 26 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8bc1a98a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java index d1444d4..6a7fd6a 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java @@ -20,10 +20,13 @@ package org.apache.ambari.server.controller; import java.io.File; +import java.io.IOException; import java.net.Authenticator; import java.net.BindException; import java.net.PasswordAuthentication; +import java.net.URL; import java.util.EnumSet; +import java.util.Enumeration; import java.util.Map; import javax.crypto.BadPaddingException; @@ -151,6 +154,29 @@ public class AmbariServer { static { Velocity.setProperty("runtime.log.logsystem.log4j.logger", VELOCITY_LOG_CATEGORY); } + + private static final String CLASSPATH_CHECK_CLASS = "org/apache/ambari/server/controller/AmbariServer.class"; + private static final String CLASSPATH_SANITY_CHECK_FAILURE_MESSAGE = "%s class is found in multiple jar files. Possible reasons include multiple ambari server jar files in the ambari classpath.\n" + + "Check for additional ambari server jar files and check that /usr/lib/ambari-server/ambari-server*.jar matches only one file."; + + static { +Enumeration ambariServerClassUrls; +try { + ambariServerClassUrls = AmbariServer.class.getClassLoader().getResources(CLASSPATH_CHECK_CLASS); + + int ambariServerClassUrlsSize = 0; + while(ambariServerClassUrls.hasMoreElements()){ +ambariServerClassUrlsSize++; +URL url = ambariServerClassUrls.nextElement(); +LOG.info(String.format("Found %s class in %s", CLASSPATH_CHECK_CLASS, url.getPath())); + } + if(ambariServerClassUrlsSize>1) { +throw new RuntimeException(String.format(CLASSPATH_SANITY_CHECK_FAILURE_MESSAGE, CLASSPATH_CHECK_CLASS)); + } +} catch (IOException e) { +e.printStackTrace(); +} + } private Server server = null;
ambari git commit: AMBARI-13383. Ambari to install/manage Slider tarball to HDFS (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 8bc1a98a5 -> fc4787530 AMBARI-13383. Ambari to install/manage Slider tarball to HDFS (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fc478753 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fc478753 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fc478753 Branch: refs/heads/branch-2.1 Commit: fc4787530356814bcd65dc1dcbe558488d15603d Parents: 8bc1a98 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Oct 20 20:00:18 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Oct 20 20:00:18 2015 +0300 -- .../libraries/functions/copy_tarball.py | 2 + .../0.60.0.2.2/package/scripts/params_linux.py | 50 ++-- .../0.60.0.2.2/package/scripts/service_check.py | 5 ++ .../SLIDER/0.60.0.2.2/package/scripts/slider.py | 5 ++ .../2.1.0.2.0/package/scripts/historyserver.py | 6 +++ .../stacks/HDP/2.3/upgrades/upgrade-2.3.xml | 16 +++ .../stacks/2.0.6/YARN/test_historyserver.py | 5 +- .../stacks/2.2/SLIDER/test_slider_client.py | 8 8 files changed, 84 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fc478753/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 badf2fe..51a6a3c 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 @@ -35,6 +35,8 @@ STACK_VERSION_PATTERN = "{{ stack_version }}" TARBALL_MAP = { "HDP": { +"slider": ("/usr/hdp/{0}/slider/slider.tar.gz".format(STACK_VERSION_PATTERN), + "/hdp/apps/{0}/slider/slider.tar.gz".format(STACK_VERSION_PATTERN)), "tez": ("/usr/hdp/{0}/tez/lib/tez.tar.gz".format(STACK_VERSION_PATTERN), "/hdp/apps/{0}/tez/tez.tar.gz".format(STACK_VERSION_PATTERN)), http://git-wip-us.apache.org/repos/asf/ambari/blob/fc478753/ambari-server/src/main/resources/common-services/SLIDER/0.60.0.2.2/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/SLIDER/0.60.0.2.2/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/SLIDER/0.60.0.2.2/package/scripts/params_linux.py index 5d60e21..d7bd296 100644 --- a/ambari-server/src/main/resources/common-services/SLIDER/0.60.0.2.2/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/SLIDER/0.60.0.2.2/package/scripts/params_linux.py @@ -16,16 +16,60 @@ See the License for the specific language governing permissions and limitations under the License. """ +from resource_management.libraries.resources import HdfsResource +from resource_management.libraries.functions import conf_select +from resource_management.libraries.functions import hdp_select from resource_management.libraries.script.script import Script +from resource_management.libraries.functions.format import format +from resource_management.libraries.functions.default import default +from resource_management.libraries.functions import get_kinit_path # server configurations config = Script.get_config() +slider_home_dir = '/usr/hdp/current/slider-client' + #hadoop params slider_bin_dir = "/usr/lib/slider/bin" if Script.is_hdp_stack_greater_or_equal("2.2"): -slider_bin_dir = '/usr/hdp/current/slider-client/bin' +slider_bin_dir = format('{slider_home_dir}/bin') -slider_conf_dir = "/usr/hdp/current/slider-client/conf" +slider_conf_dir = format("{slider_home_dir}/conf") storm_slider_conf_dir = '/usr/hdp/current/storm-slider-client/conf' -slider_home_dir = '/usr/hdp/current/slider-client' + +slider_tar_gz = format('{slider_home_dir}/slider.tar.gz') +slider_lib_dir = format('{slider_home_dir}/lib') + +user_group = config['configurations']['cluster-env']['user_group'] +hdfs_user = config['configurations']['hadoop-env']['hdfs_user'] + +host_sys_prepped = default("/hostLevelParams/host_sys_prepped", False) + + +kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None)) +security_enabled = config['configurations']['cluster-env']['security_enabled'] +hdfs_user = conf
ambari git commit: AMBARI-13383. Ambari to install/manage Slider tarball to HDFS (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk 1cd72bddd -> f1e9e3460 AMBARI-13383. Ambari to install/manage Slider tarball to HDFS (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f1e9e346 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f1e9e346 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f1e9e346 Branch: refs/heads/trunk Commit: f1e9e3460ea4c50154a91c0aaa8c827bc39f3fde Parents: 1cd72bd Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Oct 20 19:58:53 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Oct 20 19:58:53 2015 +0300 -- .../libraries/functions/copy_tarball.py | 2 + .../0.60.0.2.2/package/scripts/params_linux.py | 50 ++-- .../0.60.0.2.2/package/scripts/service_check.py | 5 ++ .../SLIDER/0.60.0.2.2/package/scripts/slider.py | 5 ++ .../2.1.0.2.0/package/scripts/historyserver.py | 6 +++ .../stacks/HDP/2.3/upgrades/upgrade-2.3.xml | 16 +++ .../stacks/2.0.6/YARN/test_historyserver.py | 6 ++- .../stacks/2.2/SLIDER/test_slider_client.py | 8 8 files changed, 85 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f1e9e346/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 badf2fe..51a6a3c 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 @@ -35,6 +35,8 @@ STACK_VERSION_PATTERN = "{{ stack_version }}" TARBALL_MAP = { "HDP": { +"slider": ("/usr/hdp/{0}/slider/slider.tar.gz".format(STACK_VERSION_PATTERN), + "/hdp/apps/{0}/slider/slider.tar.gz".format(STACK_VERSION_PATTERN)), "tez": ("/usr/hdp/{0}/tez/lib/tez.tar.gz".format(STACK_VERSION_PATTERN), "/hdp/apps/{0}/tez/tez.tar.gz".format(STACK_VERSION_PATTERN)), http://git-wip-us.apache.org/repos/asf/ambari/blob/f1e9e346/ambari-server/src/main/resources/common-services/SLIDER/0.60.0.2.2/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/SLIDER/0.60.0.2.2/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/SLIDER/0.60.0.2.2/package/scripts/params_linux.py index 5d60e21..d7bd296 100644 --- a/ambari-server/src/main/resources/common-services/SLIDER/0.60.0.2.2/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/SLIDER/0.60.0.2.2/package/scripts/params_linux.py @@ -16,16 +16,60 @@ See the License for the specific language governing permissions and limitations under the License. """ +from resource_management.libraries.resources import HdfsResource +from resource_management.libraries.functions import conf_select +from resource_management.libraries.functions import hdp_select from resource_management.libraries.script.script import Script +from resource_management.libraries.functions.format import format +from resource_management.libraries.functions.default import default +from resource_management.libraries.functions import get_kinit_path # server configurations config = Script.get_config() +slider_home_dir = '/usr/hdp/current/slider-client' + #hadoop params slider_bin_dir = "/usr/lib/slider/bin" if Script.is_hdp_stack_greater_or_equal("2.2"): -slider_bin_dir = '/usr/hdp/current/slider-client/bin' +slider_bin_dir = format('{slider_home_dir}/bin') -slider_conf_dir = "/usr/hdp/current/slider-client/conf" +slider_conf_dir = format("{slider_home_dir}/conf") storm_slider_conf_dir = '/usr/hdp/current/storm-slider-client/conf' -slider_home_dir = '/usr/hdp/current/slider-client' + +slider_tar_gz = format('{slider_home_dir}/slider.tar.gz') +slider_lib_dir = format('{slider_home_dir}/lib') + +user_group = config['configurations']['cluster-env']['user_group'] +hdfs_user = config['configurations']['hadoop-env']['hdfs_user'] + +host_sys_prepped = default("/hostLevelParams/host_sys_prepped", False) + + +kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None)) +security_enabled = config['configurations']['cluster-env']['security_enabled'] +hdfs_user = config['configuratio
[2/2] ambari git commit: AMBARI-13368. 'chmod -R 755' should be executed against Nodemanager local dirs (aonishuk)
AMBARI-13368. 'chmod -R 755' should be executed against Nodemanager local dirs (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4dadeb9f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4dadeb9f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4dadeb9f Branch: refs/heads/branch-2.1 Commit: 4dadeb9fe1c341cec8743cb448289318b74ab009 Parents: d664579 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Oct 9 12:20:41 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Oct 9 12:20:41 2015 +0300 -- .../YARN/2.1.0.2.0/package/scripts/params_linux.py| 3 +++ .../common-services/YARN/2.1.0.2.0/package/scripts/yarn.py| 7 +-- .../src/test/python/stacks/2.0.6/YARN/test_nodemanager.py | 7 ++- 3 files changed, 14 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4dadeb9f/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py index 9b242ea..c39e4c4 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py @@ -171,6 +171,9 @@ if hostname and nm_address and nm_address.startswith("0.0.0.0:"): nm_local_dirs = config['configurations']['yarn-site']['yarn.nodemanager.local-dirs'] nm_log_dirs = config['configurations']['yarn-site']['yarn.nodemanager.log-dirs'] +nm_local_dirs_list = nm_local_dirs.split(',') +nm_log_dirs_list = nm_log_dirs.split(',') + distrAppJarName = "hadoop-yarn-applications-distributedshell-2.*.jar" hadoopMapredExamplesJarName = "hadoop-mapreduce-examples-2.*.jar" http://git-wip-us.apache.org/repos/asf/ambari/blob/4dadeb9f/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py index b1b8ded..4307e1d 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py @@ -104,7 +104,7 @@ def yarn(name = None): # First start after enabling/disabling security if params.toggle_nm_security: - Directory(params.nm_local_dirs.split(',') + params.nm_log_dirs.split(','), + Directory(params.nm_local_dirs_list + params.nm_log_dirs_list, action='delete' ) @@ -125,7 +125,7 @@ def yarn(name = None): if not params.security_enabled or params.toggle_nm_security: - Directory(params.nm_local_dirs.split(',') + params.nm_log_dirs.split(','), + Directory(params.nm_local_dirs_list + params.nm_log_dirs_list, owner=params.yarn_user, group=params.user_group, recursive=True, @@ -133,6 +133,9 @@ def yarn(name = None): ignore_failures=True, mode=0775 ) + Execute(("chmod", "-R", "755") + tuple(params.nm_local_dirs_list), +sudo=True, + ) if params.yarn_nodemanager_recovery_dir: Directory(InlineTemplate(params.yarn_nodemanager_recovery_dir).get_content(), http://git-wip-us.apache.org/repos/asf/ambari/blob/4dadeb9f/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py index 2692420..042797b 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py +++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py @@ -167,6 +167,9 @@ class TestNodeManager(RMFTestCase): mode = 0775, cd_access='a' ) +self.assertResourceCalled('Execute', ('chmod', '-R', '755', u'/hadoop/yarn/local', u'/hadoop/yarn/local1'), +sudo = True, +) self.assertResourceCalled('Directory', '/var/run/hadoop-yarn', owner = 'yarn', group = 'hadoop', @@ -349,7 +352,9 @@
[1/2] ambari git commit: AMBARI-13368. 'chmod -R 755' should be executed against Nodemanager local dirs (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 d6645794e -> 4dadeb9fe refs/heads/trunk a6c6faf2b -> 6eb636211 AMBARI-13368. 'chmod -R 755' should be executed against Nodemanager local dirs (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6eb63621 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6eb63621 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6eb63621 Branch: refs/heads/trunk Commit: 6eb63621183a45e084fee458e431644967dd5c2d Parents: a6c6faf Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Oct 9 12:20:38 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Oct 9 12:20:38 2015 +0300 -- .../YARN/2.1.0.2.0/package/scripts/params_linux.py| 3 +++ .../common-services/YARN/2.1.0.2.0/package/scripts/yarn.py| 7 +-- .../src/test/python/stacks/2.0.6/YARN/test_nodemanager.py | 7 ++- 3 files changed, 14 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6eb63621/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py index 6905587..ba65fbc 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py @@ -170,6 +170,9 @@ if hostname and nm_address and nm_address.startswith("0.0.0.0:"): nm_local_dirs = config['configurations']['yarn-site']['yarn.nodemanager.local-dirs'] nm_log_dirs = config['configurations']['yarn-site']['yarn.nodemanager.log-dirs'] +nm_local_dirs_list = nm_local_dirs.split(',') +nm_log_dirs_list = nm_log_dirs.split(',') + distrAppJarName = "hadoop-yarn-applications-distributedshell-2.*.jar" hadoopMapredExamplesJarName = "hadoop-mapreduce-examples-2.*.jar" http://git-wip-us.apache.org/repos/asf/ambari/blob/6eb63621/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py index a00378b..4d5cb9b 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py @@ -104,7 +104,7 @@ def yarn(name = None): # First start after enabling/disabling security if params.toggle_nm_security: - Directory(params.nm_local_dirs.split(',') + params.nm_log_dirs.split(','), + Directory(params.nm_local_dirs_list + params.nm_log_dirs_list, action='delete' ) @@ -125,7 +125,7 @@ def yarn(name = None): if not params.security_enabled or params.toggle_nm_security: - Directory(params.nm_local_dirs.split(',') + params.nm_log_dirs.split(','), + Directory(params.nm_local_dirs_list + params.nm_log_dirs_list, owner=params.yarn_user, group=params.user_group, recursive=True, @@ -133,6 +133,9 @@ def yarn(name = None): ignore_failures=True, mode=0775 ) + Execute(("chmod", "-R", "755") + tuple(params.nm_local_dirs_list), +sudo=True, + ) if params.yarn_nodemanager_recovery_dir: Directory(InlineTemplate(params.yarn_nodemanager_recovery_dir).get_content(), http://git-wip-us.apache.org/repos/asf/ambari/blob/6eb63621/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py index 0542dea..e7da747 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py +++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py @@ -167,6 +167,9 @@ class TestNodeManager(RMFTestCase): mode = 0775, cd_access='a' ) +self.assertResourceCalled('Execute', ('chmod', '-R', '755', u'/hadoop/yarn/local', u'/hadoop/yarn/local1'), +sudo = True, +) self.
[1/2] ambari git commit: AMBARI-13361. Ambari does not install phoenix if one enables phoenix after cluster install is done (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 f0fec9578 -> e181ea001 refs/heads/trunk 9b0c24687 -> 62b9f9551 AMBARI-13361. Ambari does not install phoenix if one enables phoenix after cluster install is done (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/62b9f955 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/62b9f955 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/62b9f955 Branch: refs/heads/trunk Commit: 62b9f9551b596d5abd114492ea0c6c976a0e6cea Parents: 9b0c246 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Mon Oct 12 18:48:24 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Mon Oct 12 18:48:24 2015 +0300 -- .../HBASE/0.96.0.2.0/package/scripts/hbase.py | 3 + .../0.96.0.2.0/package/scripts/params_linux.py | 8 + .../2.0.6/HBASE/test_hbase_regionserver.py | 110 +++ .../2.0.6/configs/hbase-rs-2.2-phoenix.json | 754 +++ 4 files changed, 875 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/62b9f955/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase.py -- diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase.py index 6b5369e..e0be080 100644 --- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase.py +++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase.py @@ -182,6 +182,9 @@ def hbase(name=None): ) params.HdfsResource(None, action="execute") + if params.phoenix_enabled: +Package(params.phoenix_package) + def hbase_TemplateConfig(name, tag=None): import params http://git-wip-us.apache.org/repos/asf/ambari/blob/62b9f955/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py index 5bfdd5d..f7ff2d5 100644 --- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py @@ -23,6 +23,7 @@ import ambari_simplejson as json # simplejson is much faster comparing to Python from functions import calc_xmn_from_xms, ensure_unit_for_memory from ambari_commons.constants import AMBARI_SUDO_BINARY +from ambari_commons.os_check import OSCheck from resource_management.libraries.resources.hdfs_resource import HdfsResource from resource_management.libraries.functions import conf_select @@ -118,6 +119,13 @@ if not has_phoenix and not phoenix_enabled: else: exclude_packages = [] +underscored_version = stack_version_unformatted.replace('.', '_') +dashed_version = stack_version_unformatted.replace('.', '-') +if OSCheck.is_redhat_family() or OSCheck.is_suse_family(): + phoenix_package = format("phoenix_{underscored_version}_*") +elif OSCheck.is_ubuntu_family(): + phoenix_package = format("phoenix-{dashed_version}-.*") + pid_dir = status_params.pid_dir tmp_dir = config['configurations']['hbase-site']['hbase.tmp.dir'] local_dir = config['configurations']['hbase-site']['hbase.local.dir'] http://git-wip-us.apache.org/repos/asf/ambari/blob/62b9f955/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py index e22584a..add21c4 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py +++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py @@ -408,6 +408,116 @@ class TestHbaseRegionServer(RMFTestCase): self.assertNoMoreResources() + def test_start_default_22_with_phoenix_enabled(self): +self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/hbase_regionserver.py", + classname = "HbaseRegionServer", + command = "start", + config_file="hbase-rs-2.2-phoenix.json", + hdp_stack_version = self.STACK_VERSION, + target = RMFTestCase.TARGET_COMMON_
ambari git commit: AMBARI-13358. Ambari throwing ganglia errors after upgrade (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1.2 39b964a7d -> afe7fa365 AMBARI-13358. Ambari throwing ganglia errors after upgrade (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/afe7fa36 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/afe7fa36 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/afe7fa36 Branch: refs/heads/branch-2.1.2 Commit: afe7fa3653c79b3630c5317f17cc7e9c62b04399 Parents: 39b964a Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Oct 9 16:51:30 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Oct 9 16:51:30 2015 +0300 -- .../ambari/server/orm/dao/ClusterDAO.java | 24 .../apache/ambari/server/state/ServiceImpl.java | 19 +++- 2 files changed, 42 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/afe7fa36/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java index 6e55128..6ab3b4f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java @@ -18,6 +18,7 @@ package org.apache.ambari.server.orm.dao; +import java.util.Collections; import java.util.List; import javax.persistence.EntityManager; @@ -234,6 +235,29 @@ public class ClusterDAO { public void removeConfigMapping(ClusterConfigMappingEntity entity) { entityManagerProvider.get().remove(entity); } + + + /** + * Sets selected = 0, for clusterConfigEntities which has type_name which is in the given types list + * + * @param clusterId + * the cluster that the service is a part of. + * @param types + * the names of the configuration types. + */ +@Transactional +public void removeClusterConfigMappingEntityByTypes(Long clusterId, List types) { + if(types.isEmpty()) { +return; + } + + TypedQuery query = entityManagerProvider.get().createQuery + ("DELETE FROM ClusterConfigMappingEntity configs WHERE configs" + +".clusterId=?1 AND configs.typeName IN ?2", Long.class); + + daoUtils.executeUpdate(query, clusterId, types); +} + /** * Retrieve entity data from DB http://git-wip-us.apache.org/repos/asf/ambari/blob/afe7fa36/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java index c210557..bbe2f62 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java @@ -18,6 +18,7 @@ package org.apache.ambari.server.state; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -37,6 +38,8 @@ import org.apache.ambari.server.orm.dao.ClusterServiceDAO; import org.apache.ambari.server.orm.dao.ServiceConfigDAO; import org.apache.ambari.server.orm.dao.ServiceDesiredStateDAO; import org.apache.ambari.server.orm.dao.StackDAO; +import org.apache.ambari.server.orm.entities.ClusterConfigEntity; +import org.apache.ambari.server.orm.entities.ClusterConfigMappingEntity; import org.apache.ambari.server.orm.entities.ClusterEntity; import org.apache.ambari.server.orm.entities.ClusterServiceEntity; import org.apache.ambari.server.orm.entities.ClusterServiceEntityPK; @@ -550,10 +553,24 @@ public class ServiceImpl implements Service { List serviceConfigEntities = serviceConfigDAO.findByService(cluster.getClusterId(), getName()); +Long maxServiceConfigEntityId = -1L; +ServiceConfigEntity lastServiceConfigEntity = null; // last service config by id, should have all needed clusterConfigEntities + for (ServiceConfigEntity serviceConfigEntity : serviceConfigEntities) { + if(serviceConfigEntity.getServiceConfigId() > maxServiceConfigEntityId) { +maxServiceConfigEntityId = serviceConfigEntity.getServiceConfigId(); +lastServiceConfigEntity = serviceConfigEntity; + } serviceConfigDAO.remove(serviceConfigEntity); } - + +if(lastServiceConfigEntity != null) { + List configTypesToDisable = new ArrayList(); + for(ClusterConfigEntity clusterConfigEntity:lastServic
ambari git commit: AMBARI-13355. Journal node went in critical state on Ambari : message on UI : Connection failed: [Errno 111] Connection refused to 0.0.0.0:8480 (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 7ba85ef21 -> f0fec9578 AMBARI-13355. Journal node went in critical state on Ambari : message on UI : Connection failed: [Errno 111] Connection refused to 0.0.0.0:8480 (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f0fec957 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f0fec957 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f0fec957 Branch: refs/heads/branch-2.1 Commit: f0fec9578b0aed69f8426b01aa32c5a586360563 Parents: 7ba85ef Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Mon Oct 12 17:46:18 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Mon Oct 12 17:47:06 2015 +0300 -- .../server/upgrade/AbstractUpgradeCatalog.java | 14 ++ .../server/upgrade/SchemaUpgradeHelper.java | 3 + .../server/upgrade/UpgradeCatalog213.java | 80 ++- .../server/utils/EventBusSynchronizer.java | 139 +++ .../common-services/HDFS/2.1.0.2.0/alerts.json | 25 ++-- .../server/upgrade/UpgradeCatalog213Test.java | 23 +++ .../server/utils/EventBusSynchronizer.java | 139 --- 7 files changed, 273 insertions(+), 150 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f0fec957/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 62cd868..ed68313 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 @@ -341,6 +341,20 @@ public abstract class AbstractUpgradeCatalog implements UpgradeCatalog { } /** + * This method returns Map of clusters. + * Map can be empty or with some objects, but never be null. + */ + protected Map<String, Cluster> getCheckedClusterMap(Clusters clusters) { +if (clusters != null) { + Map<String, Cluster> clusterMap = clusters.getClusters(); + if (clusterMap != null) { +return clusterMap; + } +} +return new HashMap<>(); + } + + /** * Create a new cluster scoped configuration with the new properties added * with the values from the coresponding xml files. * http://git-wip-us.apache.org/repos/asf/ambari/blob/f0fec957/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java index cd57df1..7453d4b 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java @@ -30,6 +30,7 @@ import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.configuration.Configuration; import org.apache.ambari.server.controller.ControllerModule; import org.apache.ambari.server.orm.DBAccessor; +import org.apache.ambari.server.utils.EventBusSynchronizer; import org.apache.ambari.server.utils.VersionUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -181,6 +182,8 @@ public class SchemaUpgradeHelper { catalogBinder.addBinding().to(UpgradeCatalog212.class); catalogBinder.addBinding().to(UpgradeCatalog213.class); catalogBinder.addBinding().to(FinalUpgradeCatalog.class); + + EventBusSynchronizer.synchronizeAmbariEventPublisher(binder()); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/f0fec957/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java index dcdbb85..2c152e4 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java @@ -18,20 +18,28 @@ package org.apache.ambari.server.upgrade; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; import com.google.inject.Inject; import com.google.inject.Injector; import org.apache.ambar
ambari git commit: AMBARI-13355. Journal node went in critical state on Ambari : message on UI : Connection failed: [Errno 111] Connection refused to 0.0.0.0:8480 (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk e8dbb1327 -> 9b0c24687 AMBARI-13355. Journal node went in critical state on Ambari : message on UI : Connection failed: [Errno 111] Connection refused to 0.0.0.0:8480 (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9b0c2468 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9b0c2468 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9b0c2468 Branch: refs/heads/trunk Commit: 9b0c24687fe47624e8284daf3609b1134e330323 Parents: e8dbb13 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Mon Oct 12 17:47:33 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Mon Oct 12 17:48:05 2015 +0300 -- .../server/upgrade/AbstractUpgradeCatalog.java | 14 ++ .../server/upgrade/SchemaUpgradeHelper.java | 3 + .../server/upgrade/UpgradeCatalog213.java | 80 ++- .../server/utils/EventBusSynchronizer.java | 139 +++ .../common-services/HDFS/2.1.0.2.0/alerts.json | 25 ++-- .../server/upgrade/UpgradeCatalog213Test.java | 25 +++- .../server/utils/EventBusSynchronizer.java | 139 --- 7 files changed, 274 insertions(+), 151 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9b0c2468/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 62cd868..ed68313 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 @@ -341,6 +341,20 @@ public abstract class AbstractUpgradeCatalog implements UpgradeCatalog { } /** + * This method returns Map of clusters. + * Map can be empty or with some objects, but never be null. + */ + protected Map<String, Cluster> getCheckedClusterMap(Clusters clusters) { +if (clusters != null) { + Map<String, Cluster> clusterMap = clusters.getClusters(); + if (clusterMap != null) { +return clusterMap; + } +} +return new HashMap<>(); + } + + /** * Create a new cluster scoped configuration with the new properties added * with the values from the coresponding xml files. * http://git-wip-us.apache.org/repos/asf/ambari/blob/9b0c2468/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java index ca7707b..c77b724 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java @@ -30,6 +30,7 @@ import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.configuration.Configuration; import org.apache.ambari.server.controller.ControllerModule; import org.apache.ambari.server.orm.DBAccessor; +import org.apache.ambari.server.utils.EventBusSynchronizer; import org.apache.ambari.server.utils.VersionUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -182,6 +183,8 @@ public class SchemaUpgradeHelper { catalogBinder.addBinding().to(UpgradeCatalog213.class); catalogBinder.addBinding().to(UpgradeCatalog220.class); catalogBinder.addBinding().to(FinalUpgradeCatalog.class); + + EventBusSynchronizer.synchronizeAmbariEventPublisher(binder()); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/9b0c2468/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java index dcdbb85..2c152e4 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog213.java @@ -18,20 +18,28 @@ package org.apache.ambari.server.upgrade; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; import com.google.inject.Inject; import com.google.inject.Injector; import org.apache.ambar
ambari git commit: AMBARI-13307. Agent instance memory footprint likely gradually growing (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 00aabde5e -> 32a5c51c9 AMBARI-13307. Agent instance memory footprint likely gradually growing (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/32a5c51c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/32a5c51c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/32a5c51c Branch: refs/heads/branch-2.1 Commit: 32a5c51c90b0c522be2ea640d34e38b11849550a Parents: 00aabde Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Oct 6 18:01:33 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Oct 6 18:01:33 2015 +0300 -- .../src/main/python/resource_management/core/logger.py | 6 +- .../python/resource_management/libraries/script/script.py | 9 +++-- 2 files changed, 4 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/32a5c51c/ambari-common/src/main/python/resource_management/core/logger.py -- diff --git a/ambari-common/src/main/python/resource_management/core/logger.py b/ambari-common/src/main/python/resource_management/core/logger.py index 0ea34ff..f126f1e 100644 --- a/ambari-common/src/main/python/resource_management/core/logger.py +++ b/ambari-common/src/main/python/resource_management/core/logger.py @@ -36,11 +36,9 @@ class Logger: @staticmethod def initialize_logger(name='resource_management', logging_level=logging.INFO, format='%(asctime)s - %(message)s'): -# set up logging (two separate loggers for stderr and stdout with different loglevels) - if Logger.logger: return - +# set up logging (two separate loggers for stderr and stdout with different loglevels) logger = logging.getLogger(name) logger.setLevel(logging_level) formatter = logging.Formatter(format) @@ -55,8 +53,6 @@ class Logger: logger.addHandler(chout) Logger.logger = logger - -return logger, chout, cherr @staticmethod def error(text): http://git-wip-us.apache.org/repos/asf/ambari/blob/32a5c51c/ambari-common/src/main/python/resource_management/libraries/script/script.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/script/script.py b/ambari-common/src/main/python/resource_management/libraries/script/script.py index f43c414..efd34e3 100644 --- a/ambari-common/src/main/python/resource_management/libraries/script/script.py +++ b/ambari-common/src/main/python/resource_management/libraries/script/script.py @@ -171,11 +171,9 @@ class Script(object): Sets up logging; Parses command parameters and executes method relevant to command type """ -logger, chout, cherr = Logger.initialize_logger(__name__) - # parse arguments if len(sys.argv) < 7: - logger.error("Script expects at least 6 arguments") + print "Script expects at least 6 arguments" print USAGE.format(os.path.basename(sys.argv[0])) # print to stdout sys.exit(1) @@ -188,8 +186,7 @@ class Script(object): Script.tmp_dir = sys.argv[6] logging_level_str = logging._levelNames[self.logging_level] -chout.setLevel(logging_level_str) -logger.setLevel(logging_level_str) +Logger.initialize_logger(__name__, logging_level=logging_level_str) # on windows we need to reload some of env variables manually because there is no default paths for configs(like # /etc/something/conf on linux. When this env vars created by one of the Script execution, they can not be updated @@ -208,7 +205,7 @@ class Script(object): Script.passwords[get_path_from_configuration(k, Script.config)] = get_path_from_configuration(v, Script.config) except IOError: - logger.exception("Can not read json file with command parameters: ") + Logging.logger.exception("Can not read json file with command parameters: ") sys.exit(1) # Run class method depending on a command type
[2/2] ambari git commit: AMBARI-13403. Ambari unable to build rpms with 4 digit versions (aonishuk)
AMBARI-13403. Ambari unable to build rpms with 4 digit versions (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3ba8c39c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3ba8c39c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3ba8c39c Branch: refs/heads/branch-2.1 Commit: 3ba8c39c5ee67d0970d4529e18ce296e844c741d Parents: e9263e4 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Oct 13 17:51:14 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Oct 13 17:51:14 2015 +0300 -- ambari-admin/pom.xml | 8 ambari-agent/pom.xml | 8 ambari-client/groovy-client/pom.xml | 4 ++-- ambari-client/pom.xml | 4 ++-- ambari-client/python-client/pom.xml | 4 ++-- ambari-metrics/ambari-metrics-assembly/pom.xml| 8 ambari-metrics/ambari-metrics-common/pom.xml | 2 +- ambari-metrics/ambari-metrics-flume-sink/pom.xml | 8 ambari-metrics/ambari-metrics-hadoop-sink/pom.xml | 8 ambari-metrics/ambari-metrics-host-monitoring/pom.xml | 8 ambari-metrics/ambari-metrics-kafka-sink/pom.xml | 8 ambari-metrics/ambari-metrics-storm-sink/pom.xml | 8 ambari-metrics/ambari-metrics-timelineservice/pom.xml | 10 +- ambari-metrics/pom.xml| 10 +- ambari-project/pom.xml| 4 ++-- ambari-server/pom.xml | 8 ambari-shell/ambari-groovy-shell/pom.xml | 6 +++--- ambari-shell/ambari-python-shell/pom.xml | 4 ++-- ambari-shell/pom.xml | 4 ++-- ambari-views/pom.xml | 8 ambari-web/pom.xml| 8 docs/pom.xml | 2 +- pom.xml | 10 +- 23 files changed, 76 insertions(+), 76 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3ba8c39c/ambari-admin/pom.xml -- diff --git a/ambari-admin/pom.xml b/ambari-admin/pom.xml index 8985c1e..43764b8 100644 --- a/ambari-admin/pom.xml +++ b/ambari-admin/pom.xml @@ -19,7 +19,7 @@ org.apache.ambari ambari-project -2.1.0.0 +2.1.2.1.0 ../ambari-project 4.0.0 @@ -27,7 +27,7 @@ ambari-admin jar Ambari Admin View - 2.1.0.0 + 2.1.2.1.0 Admin control panel @@ -51,8 +51,8 @@ ambariVersion ${project.version} - ^([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).* - $1.$2.$3 + ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).* + $1.$2.$3.$4 false http://git-wip-us.apache.org/repos/asf/ambari/blob/3ba8c39c/ambari-agent/pom.xml -- diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml index b544d75..83852cd 100644 --- a/ambari-agent/pom.xml +++ b/ambari-agent/pom.xml @@ -19,14 +19,14 @@ org.apache.ambari ambari-project -2.1.0.0 +2.1.2.1.0 ../ambari-project 4.0.0 org.apache.ambari ambari-agent pom - 2.1.0.0 + 2.1.2.1.0 Ambari Agent Ambari Agent @@ -77,8 +77,8 @@ ambariVersion ${project.version} - ^([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).* - $1.$2.$3 + ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).* + $1.$2.$3.$4 false http://git-wip-us.apache.org/repos/asf/ambari/blob/3ba8c39c/ambari-client/groovy-client/pom.xml -- diff --git a/ambari-client/groovy-client/pom.xml b/ambari-client/groovy-client/pom.xml index 6b08bd0..1568c94 100644 --- a/ambari-client/groovy-client/pom.xml +++ b/ambari-client/groovy-client/pom.xml @@ -12,14 +12,14 @@ ambari-client org.apache.ambari -2.1.0.0 +2.1.2.1.0 ../../ambari-client/ 4.0.0 org.apache.ambari groovy-client jar - 2.1.0.0 + 2.1.2.1.0 Ambari Groovy Client Ambari Groovy client http://git-wip-us.apache.org/repos/asf/ambari/blob/3ba8c39c/ambari-client/pom.xml -- diff --git a/ambari-client/pom.xml b/ambari-client/pom.xml index 4bba701..44b5948 100755 --- a/ambari-client/pom.xml +++ b/ambari-client/pom.x
[1/2] ambari git commit: AMBARI-13403. Ambari unable to build rpms with 4 digit versions (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 e9263e486 -> 3ba8c39c5 refs/heads/branch-2.1.2 99da5c68e -> 54823edf7 AMBARI-13403. Ambari unable to build rpms with 4 digit versions (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/54823edf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/54823edf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/54823edf Branch: refs/heads/branch-2.1.2 Commit: 54823edf76578f966e79770c081340323653cf19 Parents: 99da5c6 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Oct 13 17:51:12 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Oct 13 17:51:12 2015 +0300 -- ambari-admin/pom.xml | 8 ambari-agent/pom.xml | 8 ambari-client/groovy-client/pom.xml | 4 ++-- ambari-client/pom.xml | 4 ++-- ambari-client/python-client/pom.xml | 4 ++-- ambari-metrics/ambari-metrics-assembly/pom.xml| 8 ambari-metrics/ambari-metrics-common/pom.xml | 2 +- ambari-metrics/ambari-metrics-flume-sink/pom.xml | 8 ambari-metrics/ambari-metrics-hadoop-sink/pom.xml | 8 ambari-metrics/ambari-metrics-host-monitoring/pom.xml | 8 ambari-metrics/ambari-metrics-kafka-sink/pom.xml | 8 ambari-metrics/ambari-metrics-storm-sink/pom.xml | 8 ambari-metrics/ambari-metrics-timelineservice/pom.xml | 10 +- ambari-metrics/pom.xml| 10 +- ambari-project/pom.xml| 4 ++-- ambari-server/pom.xml | 8 ambari-shell/ambari-groovy-shell/pom.xml | 6 +++--- ambari-shell/ambari-python-shell/pom.xml | 4 ++-- ambari-shell/pom.xml | 4 ++-- ambari-views/pom.xml | 8 ambari-web/pom.xml| 8 docs/pom.xml | 2 +- pom.xml | 10 +- 23 files changed, 76 insertions(+), 76 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/54823edf/ambari-admin/pom.xml -- diff --git a/ambari-admin/pom.xml b/ambari-admin/pom.xml index 8985c1e..43764b8 100644 --- a/ambari-admin/pom.xml +++ b/ambari-admin/pom.xml @@ -19,7 +19,7 @@ org.apache.ambari ambari-project -2.1.0.0 +2.1.2.1.0 ../ambari-project 4.0.0 @@ -27,7 +27,7 @@ ambari-admin jar Ambari Admin View - 2.1.0.0 + 2.1.2.1.0 Admin control panel @@ -51,8 +51,8 @@ ambariVersion ${project.version} - ^([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).* - $1.$2.$3 + ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).* + $1.$2.$3.$4 false http://git-wip-us.apache.org/repos/asf/ambari/blob/54823edf/ambari-agent/pom.xml -- diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml index b544d75..83852cd 100644 --- a/ambari-agent/pom.xml +++ b/ambari-agent/pom.xml @@ -19,14 +19,14 @@ org.apache.ambari ambari-project -2.1.0.0 +2.1.2.1.0 ../ambari-project 4.0.0 org.apache.ambari ambari-agent pom - 2.1.0.0 + 2.1.2.1.0 Ambari Agent Ambari Agent @@ -77,8 +77,8 @@ ambariVersion ${project.version} - ^([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).* - $1.$2.$3 + ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).* + $1.$2.$3.$4 false http://git-wip-us.apache.org/repos/asf/ambari/blob/54823edf/ambari-client/groovy-client/pom.xml -- diff --git a/ambari-client/groovy-client/pom.xml b/ambari-client/groovy-client/pom.xml index 6b08bd0..1568c94 100644 --- a/ambari-client/groovy-client/pom.xml +++ b/ambari-client/groovy-client/pom.xml @@ -12,14 +12,14 @@ ambari-client org.apache.ambari -2.1.0.0 +2.1.2.1.0 ../../ambari-client/ 4.0.0 org.apache.ambari groovy-client jar - 2.1.0.0 + 2.1.2.1.0 Ambari Groovy Client Ambari Groovy client http://git-wip-us.apache.org/repos/asf/ambari/blob/54823edf/ambari-client/pom.xml -- d
ambari git commit: AMBARI-13403. Ambari unable to build rpms with 4 digit versions (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1.2 febfc413f -> 099096246 AMBARI-13403. Ambari unable to build rpms with 4 digit versions (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/09909624 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/09909624 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/09909624 Branch: refs/heads/branch-2.1.2 Commit: 09909624689e36125134dd3026490440ff8f17ec Parents: febfc41 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Oct 13 18:38:37 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Oct 13 18:38:37 2015 +0300 -- ambari-admin/pom.xml | 4 ++-- ambari-agent/pom.xml | 4 ++-- ambari-client/groovy-client/pom.xml | 4 ++-- ambari-client/pom.xml | 4 ++-- ambari-client/python-client/pom.xml | 4 ++-- ambari-metrics/ambari-metrics-assembly/pom.xml| 4 ++-- ambari-metrics/ambari-metrics-common/pom.xml | 2 +- ambari-metrics/ambari-metrics-flume-sink/pom.xml | 4 ++-- ambari-metrics/ambari-metrics-hadoop-sink/pom.xml | 4 ++-- ambari-metrics/ambari-metrics-host-monitoring/pom.xml | 4 ++-- ambari-metrics/ambari-metrics-kafka-sink/pom.xml | 4 ++-- ambari-metrics/ambari-metrics-storm-sink/pom.xml | 4 ++-- ambari-metrics/ambari-metrics-timelineservice/pom.xml | 6 +++--- ambari-metrics/pom.xml| 2 +- ambari-project/pom.xml| 4 ++-- ambari-server/pom.xml | 4 ++-- ambari-shell/ambari-groovy-shell/pom.xml | 6 +++--- ambari-shell/ambari-python-shell/pom.xml | 4 ++-- ambari-shell/pom.xml | 4 ++-- ambari-views/pom.xml | 4 ++-- ambari-web/pom.xml| 4 ++-- contrib/views/capacity-scheduler/pom.xml | 2 +- contrib/views/files/pom.xml | 2 +- contrib/views/hive/pom.xml| 2 +- contrib/views/jobs/pom.xml| 4 ++-- contrib/views/pig/pom.xml | 2 +- contrib/views/pom.xml | 4 ++-- contrib/views/slider/pom.xml | 4 ++-- contrib/views/storm/pom.xml | 2 +- contrib/views/tez/pom.xml | 2 +- contrib/views/utils/pom.xml | 2 +- pom.xml | 2 +- 32 files changed, 56 insertions(+), 56 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/09909624/ambari-admin/pom.xml -- diff --git a/ambari-admin/pom.xml b/ambari-admin/pom.xml index 43764b8..c80549c 100644 --- a/ambari-admin/pom.xml +++ b/ambari-admin/pom.xml @@ -19,7 +19,7 @@ org.apache.ambari ambari-project -2.1.2.1.0 +2.1.0.0.0 ../ambari-project 4.0.0 @@ -27,7 +27,7 @@ ambari-admin jar Ambari Admin View - 2.1.2.1.0 + 2.1.0.0.0 Admin control panel http://git-wip-us.apache.org/repos/asf/ambari/blob/09909624/ambari-agent/pom.xml -- diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml index 83852cd..38f436e 100644 --- a/ambari-agent/pom.xml +++ b/ambari-agent/pom.xml @@ -19,14 +19,14 @@ org.apache.ambari ambari-project -2.1.2.1.0 +2.1.0.0.0 ../ambari-project 4.0.0 org.apache.ambari ambari-agent pom - 2.1.2.1.0 + 2.1.0.0.0 Ambari Agent Ambari Agent http://git-wip-us.apache.org/repos/asf/ambari/blob/09909624/ambari-client/groovy-client/pom.xml -- diff --git a/ambari-client/groovy-client/pom.xml b/ambari-client/groovy-client/pom.xml index 1568c94..3dbc78e 100644 --- a/ambari-client/groovy-client/pom.xml +++ b/ambari-client/groovy-client/pom.xml @@ -12,14 +12,14 @@ ambari-client org.apache.ambari -2.1.2.1.0 +2.1.0.0.0 ../../ambari-client/ 4.0.0 org.apache.ambari groovy-client jar - 2.1.2.1.0 + 2.1.0.0.0 Ambari Groovy Client Ambari Groovy client http://git-wip-us.apache.org/repos/asf/ambari/blob/09909624/ambari-client/pom.xml -- diff --git a/ambari-client/pom.xml b/ambari-client/pom.xml index 44b5948..2f8f3fc 100755 --- a/ambari-client/pom.xml +++ b/ambari-client/pom.xml @@ -20,14 +20,14 @@ or
ambari git commit: AMBARI-13403. Ambari unable to build rpms with 4 digit versions (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 3ba8c39c5 -> 2443d6bf5 AMBARI-13403. Ambari unable to build rpms with 4 digit versions (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2443d6bf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2443d6bf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2443d6bf Branch: refs/heads/branch-2.1 Commit: 2443d6bf5aebea8aa6382602cbabf8f29f99c3df Parents: 3ba8c39 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Oct 13 18:41:32 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Oct 13 18:41:32 2015 +0300 -- ambari-admin/pom.xml | 4 ++-- ambari-agent/pom.xml | 4 ++-- ambari-client/groovy-client/pom.xml | 4 ++-- ambari-client/pom.xml | 4 ++-- ambari-client/python-client/pom.xml | 4 ++-- ambari-metrics/ambari-metrics-assembly/pom.xml| 4 ++-- ambari-metrics/ambari-metrics-common/pom.xml | 2 +- ambari-metrics/ambari-metrics-flume-sink/pom.xml | 4 ++-- ambari-metrics/ambari-metrics-hadoop-sink/pom.xml | 4 ++-- ambari-metrics/ambari-metrics-host-monitoring/pom.xml | 4 ++-- ambari-metrics/ambari-metrics-kafka-sink/pom.xml | 4 ++-- ambari-metrics/ambari-metrics-storm-sink/pom.xml | 4 ++-- ambari-metrics/ambari-metrics-timelineservice/pom.xml | 6 +++--- ambari-metrics/pom.xml| 2 +- ambari-project/pom.xml| 4 ++-- ambari-server/pom.xml | 4 ++-- ambari-shell/ambari-groovy-shell/pom.xml | 6 +++--- ambari-shell/ambari-python-shell/pom.xml | 4 ++-- ambari-shell/pom.xml | 4 ++-- ambari-views/pom.xml | 4 ++-- ambari-web/pom.xml| 4 ++-- contrib/views/capacity-scheduler/pom.xml | 2 +- contrib/views/files/pom.xml | 2 +- contrib/views/hive/pom.xml| 2 +- contrib/views/jobs/pom.xml| 4 ++-- contrib/views/pig/pom.xml | 2 +- contrib/views/pom.xml | 4 ++-- contrib/views/slider/pom.xml | 4 ++-- contrib/views/storm/pom.xml | 2 +- contrib/views/tez/pom.xml | 2 +- contrib/views/utils/pom.xml | 2 +- pom.xml | 2 +- 32 files changed, 56 insertions(+), 56 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2443d6bf/ambari-admin/pom.xml -- diff --git a/ambari-admin/pom.xml b/ambari-admin/pom.xml index 43764b8..c80549c 100644 --- a/ambari-admin/pom.xml +++ b/ambari-admin/pom.xml @@ -19,7 +19,7 @@ org.apache.ambari ambari-project -2.1.2.1.0 +2.1.0.0.0 ../ambari-project 4.0.0 @@ -27,7 +27,7 @@ ambari-admin jar Ambari Admin View - 2.1.2.1.0 + 2.1.0.0.0 Admin control panel http://git-wip-us.apache.org/repos/asf/ambari/blob/2443d6bf/ambari-agent/pom.xml -- diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml index 83852cd..38f436e 100644 --- a/ambari-agent/pom.xml +++ b/ambari-agent/pom.xml @@ -19,14 +19,14 @@ org.apache.ambari ambari-project -2.1.2.1.0 +2.1.0.0.0 ../ambari-project 4.0.0 org.apache.ambari ambari-agent pom - 2.1.2.1.0 + 2.1.0.0.0 Ambari Agent Ambari Agent http://git-wip-us.apache.org/repos/asf/ambari/blob/2443d6bf/ambari-client/groovy-client/pom.xml -- diff --git a/ambari-client/groovy-client/pom.xml b/ambari-client/groovy-client/pom.xml index 1568c94..3dbc78e 100644 --- a/ambari-client/groovy-client/pom.xml +++ b/ambari-client/groovy-client/pom.xml @@ -12,14 +12,14 @@ ambari-client org.apache.ambari -2.1.2.1.0 +2.1.0.0.0 ../../ambari-client/ 4.0.0 org.apache.ambari groovy-client jar - 2.1.2.1.0 + 2.1.0.0.0 Ambari Groovy Client Ambari Groovy client http://git-wip-us.apache.org/repos/asf/ambari/blob/2443d6bf/ambari-client/pom.xml -- diff --git a/ambari-client/pom.xml b/ambari-client/pom.xml index 44b5948..2f8f3fc 100755 --- a/ambari-client/pom.xml +++ b/ambari-client/pom.xml @@ -20,14 +20,14 @@ or
ambari git commit: AMBARI-13242. AMBARI-13242: ambari-server setup failed if use another server as ambari-server next time (Di Li via aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk 93f0896ec -> 329d2b542 AMBARI-13242. AMBARI-13242: ambari-server setup failed if use another server as ambari-server next time (Di Li via aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/329d2b54 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/329d2b54 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/329d2b54 Branch: refs/heads/trunk Commit: 329d2b5424492eac6c6b16f3e85ce5e33da6f51f Parents: 93f0896 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Mon Oct 5 23:57:25 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Mon Oct 5 23:57:25 2015 +0300 -- ambari-agent/conf/unix/install-helper.sh | 20 +++ ambari-server/conf/unix/install-helper.sh | 27 +- 2 files changed, 46 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/329d2b54/ambari-agent/conf/unix/install-helper.sh -- diff --git a/ambari-agent/conf/unix/install-helper.sh b/ambari-agent/conf/unix/install-helper.sh index 35c67fb..185290c 100644 --- a/ambari-agent/conf/unix/install-helper.sh +++ b/ambari-agent/conf/unix/install-helper.sh @@ -68,6 +68,26 @@ do_remove(){ if [ -f "$PYTHON_WRAPER_TARGET" ]; then rm -f "$PYTHON_WRAPER_TARGET" fi + + if [ -d "$COMMON_DIR" ]; then +rm -f $COMMON_DIR + fi + + if [ -d "$RESOURCE_MANAGEMENT_DIR" ]; then +rm -rf $RESOURCE_MANAGEMENT_DIR + fi + + if [ -d "$JINJA_DIR" ]; then +rm -rf $JINJA_DIR + fi + + if [ -d "$SIMPLEJSON_DIR" ]; then +rm -f $SIMPLEJSON_DIR + fi + + if [ -d "$OLD_COMMON_DIR" ]; then +rm -f $OLD_COMMON_DIR + fi # if server package exists, restore their settings if [ -f "$INSTALL_HELPER_SERVER" ]; then # call server shared files installer http://git-wip-us.apache.org/repos/asf/ambari/blob/329d2b54/ambari-server/conf/unix/install-helper.sh -- diff --git a/ambari-server/conf/unix/install-helper.sh b/ambari-server/conf/unix/install-helper.sh index 9dbb2b8..2635694 100644 --- a/ambari-server/conf/unix/install-helper.sh +++ b/ambari-server/conf/unix/install-helper.sh @@ -22,6 +22,7 @@ RESOURCE_MANAGEMENT_DIR="/usr/lib/python2.6/site-packages/resource_management" JINJA_DIR="/usr/lib/python2.6/site-packages/ambari_jinja2" SIMPLEJSON_DIR="/usr/lib/python2.6/site-packages/ambari_simplejson" OLD_COMMON_DIR="/usr/lib/python2.6/site-packages/common_functions" +AMBARI_SERVER="/usr/lib/python2.6/site-packages/ambari_server" INSTALL_HELPER_AGENT="/var/lib/ambari-agent/install-helper.sh" COMMON_DIR_SERVER="/usr/lib/ambari-server/lib/ambari_commons" RESOURCE_MANAGEMENT_DIR_SERVER="/usr/lib/ambari-server/lib/resource_management" @@ -61,9 +62,33 @@ do_remove(){ rm -f "$PYTHON_WRAPER_TARGET" fi + if [ -d "$COMMON_DIR" ]; then +rm -f $COMMON_DIR + fi + + if [ -d "$RESOURCE_MANAGEMENT_DIR" ]; then +rm -f $RESOURCE_MANAGEMENT_DIR + fi + + if [ -d "$JINJA_DIR" ]; then +rm -f $JINJA_DIR + fi + + if [ -d "$SIMPLEJSON_DIR" ]; then +rm -f $SIMPLEJSON_DIR + fi + + if [ -d "$OLD_COMMON_DIR" ]; then +rm -rf $OLD_COMMON_DIR + fi + + if [ -d "$AMBARI_SERVER" ]; then +rm -rf "$AMBARI_SERVER" + fi + # if server package exists, restore their settings if [ -f "$INSTALL_HELPER_AGENT" ]; then # call agent shared files installer - $INSTALL_HELPER_AGENT install +$INSTALL_HELPER_AGENT install fi }
[2/2] ambari git commit: AMBARI-13318. Issue with "Memory allocated for all YARN containers on a node" enhanced config (aonishuk)
AMBARI-13318. Issue with "Memory allocated for all YARN containers on a node" enhanced config (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f922634f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f922634f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f922634f Branch: refs/heads/branch-2.1 Commit: f922634ffd728e5286a3454b82e2e817d2de6b3f Parents: b10b1ff Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Oct 6 12:39:11 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Oct 6 12:39:11 2015 +0300 -- .../internal/BlueprintConfigurationProcessor.java | 2 ++ .../internal/BlueprintConfigurationProcessorTest.java | 9 - 2 files changed, 10 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f922634f/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java index 892cf32..0535c96 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java @@ -1916,6 +1916,7 @@ public class BlueprintConfigurationProcessor { mPropertyUpdaters.put("hbase-env", hbaseEnvMap); mPropertyUpdaters.put("mapred-env", mapredEnvMap); mPropertyUpdaters.put("oozie-env", oozieEnvHeapSizeMap); +mPropertyUpdaters.put("yarn-site", yarnSiteMap); multiHostTopologyUpdaters.put("webhcat-site", multiWebhcatSiteMap); multiHostTopologyUpdaters.put("hbase-site", multiHbaseSiteMap); @@ -2057,6 +2058,7 @@ public class BlueprintConfigurationProcessor { hbaseEnvMap.put("hbase_regionserver_heapsize", new MPropertyUpdater()); oozieEnvHeapSizeMap.put("oozie_heapsize", new MPropertyUpdater()); oozieEnvHeapSizeMap.put("oozie_permsize", new MPropertyUpdater()); +yarnSiteMap.put("yarn.nodemanager.resource.memory-mb", new MPropertyUpdater()); } /** http://git-wip-us.apache.org/repos/asf/ambari/blob/f922634f/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java index a97ca74..43da6c5 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java @@ -1422,11 +1422,13 @@ public class BlueprintConfigurationProcessorTest { Map<String, String> oozieSiteProperties = new HashMap<String, String>(); Map<String, String> oozieEnvProperties = new HashMap<String, String>(); Map<String, String> coreSiteProperties = new HashMap<String, String>(); - +Map<String, String> yarnSiteProperties = new HashMap<String, String>(); + configProperties.put("oozie-site", oozieSiteProperties); configProperties.put("oozie-env", oozieEnvProperties); configProperties.put("hive-env", oozieEnvProperties); configProperties.put("core-site", coreSiteProperties); +configProperties.put("yarn-site", yarnSiteProperties); oozieSiteProperties.put("oozie.base.url", expectedHostName); oozieSiteProperties.put("oozie.authentication.kerberos.principal", expectedHostName); @@ -1439,6 +1441,8 @@ public class BlueprintConfigurationProcessorTest { oozieEnvProperties.put("oozie_permsize", "2048m"); coreSiteProperties.put("hadoop.proxyuser.oozie.hosts", expectedHostName + "," + expectedHostNameTwo); + +oozieEnvProperties.put("yarn.nodemanager.resource.memory-mb", "2048m"); Configuration clusterConfig = new Configuration(configProperties, Collections.<String, Map<String, Map<String, String>>>emptyMap()); @@ -1492,6 +1496,9 @@ public
[1/2] ambari git commit: AMBARI-13318. Issue with "Memory allocated for all YARN containers on a node" enhanced config (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 b10b1ffee -> f922634ff refs/heads/trunk aeebae6eb -> 401161157 AMBARI-13318. Issue with "Memory allocated for all YARN containers on a node" enhanced config (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/40116115 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/40116115 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/40116115 Branch: refs/heads/trunk Commit: 4011611574cf2c1de9517b165ec109feba97c622 Parents: aeebae6 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Oct 6 12:39:08 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Oct 6 12:39:08 2015 +0300 -- .../internal/BlueprintConfigurationProcessor.java | 2 ++ .../internal/BlueprintConfigurationProcessorTest.java | 9 - 2 files changed, 10 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/40116115/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java index 5fd5563..3d13725 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java @@ -1937,6 +1937,7 @@ public class BlueprintConfigurationProcessor { mPropertyUpdaters.put("hbase-env", hbaseEnvMap); mPropertyUpdaters.put("mapred-env", mapredEnvMap); mPropertyUpdaters.put("oozie-env", oozieEnvHeapSizeMap); +mPropertyUpdaters.put("yarn-site", yarnSiteMap); multiHostTopologyUpdaters.put("webhcat-site", multiWebhcatSiteMap); multiHostTopologyUpdaters.put("hbase-site", multiHbaseSiteMap); @@ -2144,6 +2145,7 @@ public class BlueprintConfigurationProcessor { hbaseEnvMap.put("hbase_regionserver_heapsize", new MPropertyUpdater()); oozieEnvHeapSizeMap.put("oozie_heapsize", new MPropertyUpdater()); oozieEnvHeapSizeMap.put("oozie_permsize", new MPropertyUpdater()); +yarnSiteMap.put("yarn.nodemanager.resource.memory-mb", new MPropertyUpdater()); } /** http://git-wip-us.apache.org/repos/asf/ambari/blob/40116115/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java index ac86668..402c69d 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java @@ -1427,11 +1427,13 @@ public class BlueprintConfigurationProcessorTest { Map<String, String> oozieSiteProperties = new HashMap<String, String>(); Map<String, String> oozieEnvProperties = new HashMap<String, String>(); Map<String, String> coreSiteProperties = new HashMap<String, String>(); - +Map<String, String> yarnSiteProperties = new HashMap<String, String>(); + configProperties.put("oozie-site", oozieSiteProperties); configProperties.put("oozie-env", oozieEnvProperties); configProperties.put("hive-env", oozieEnvProperties); configProperties.put("core-site", coreSiteProperties); +configProperties.put("yarn-site", yarnSiteProperties); oozieSiteProperties.put("oozie.base.url", expectedHostName); oozieSiteProperties.put("oozie.authentication.kerberos.principal", expectedHostName); @@ -1444,6 +1446,8 @@ public class BlueprintConfigurationProcessorTest { oozieEnvProperties.put("oozie_permsize", "2048m"); coreSiteProperties.put("hadoop.proxyuser.oozie.hosts", expectedHostName + "," + expectedHostNameTwo); + +oozieEnvProperties.put("yarn.nodemanager.resource.memory-mb", "2048m"); Configuration clusterConfig = new Configuration(config
ambari git commit: Revert "AMBARI-13318. Issue with "Memory allocated for all YARN containers on a node" enhanced config (aonishuk)"
Repository: ambari Updated Branches: refs/heads/trunk cfe3c8041 -> a1f105496 Revert "AMBARI-13318. Issue with "Memory allocated for all YARN containers on a node" enhanced config (aonishuk)" This reverts commit 4011611574cf2c1de9517b165ec109feba97c622. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a1f10549 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a1f10549 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a1f10549 Branch: refs/heads/trunk Commit: a1f105496dfad5085653f18097d6e1e18da7f224 Parents: cfe3c80 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Oct 9 09:44:30 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Oct 9 09:44:30 2015 +0300 -- .../internal/BlueprintConfigurationProcessor.java | 2 -- .../internal/BlueprintConfigurationProcessorTest.java | 9 + 2 files changed, 1 insertion(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a1f10549/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java index 3d13725..5fd5563 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java @@ -1937,7 +1937,6 @@ public class BlueprintConfigurationProcessor { mPropertyUpdaters.put("hbase-env", hbaseEnvMap); mPropertyUpdaters.put("mapred-env", mapredEnvMap); mPropertyUpdaters.put("oozie-env", oozieEnvHeapSizeMap); -mPropertyUpdaters.put("yarn-site", yarnSiteMap); multiHostTopologyUpdaters.put("webhcat-site", multiWebhcatSiteMap); multiHostTopologyUpdaters.put("hbase-site", multiHbaseSiteMap); @@ -2145,7 +2144,6 @@ public class BlueprintConfigurationProcessor { hbaseEnvMap.put("hbase_regionserver_heapsize", new MPropertyUpdater()); oozieEnvHeapSizeMap.put("oozie_heapsize", new MPropertyUpdater()); oozieEnvHeapSizeMap.put("oozie_permsize", new MPropertyUpdater()); -yarnSiteMap.put("yarn.nodemanager.resource.memory-mb", new MPropertyUpdater()); } /** http://git-wip-us.apache.org/repos/asf/ambari/blob/a1f10549/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java index 402c69d..ac86668 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java @@ -1427,13 +1427,11 @@ public class BlueprintConfigurationProcessorTest { Map<String, String> oozieSiteProperties = new HashMap<String, String>(); Map<String, String> oozieEnvProperties = new HashMap<String, String>(); Map<String, String> coreSiteProperties = new HashMap<String, String>(); -Map<String, String> yarnSiteProperties = new HashMap<String, String>(); - + configProperties.put("oozie-site", oozieSiteProperties); configProperties.put("oozie-env", oozieEnvProperties); configProperties.put("hive-env", oozieEnvProperties); configProperties.put("core-site", coreSiteProperties); -configProperties.put("yarn-site", yarnSiteProperties); oozieSiteProperties.put("oozie.base.url", expectedHostName); oozieSiteProperties.put("oozie.authentication.kerberos.principal", expectedHostName); @@ -1446,8 +1444,6 @@ public class BlueprintConfigurationProcessorTest { oozieEnvProperties.put("oozie_permsize", "2048m"); coreSiteProperties.put("hadoop.proxyuser.oozie.hosts", expectedHostName + "," + expectedHostNameTwo); - -oozieEnvProperties.put("yarn.nodemanager.resource.memory-mb", "2048m"); Configuration cluste
ambari git commit: Revert "AMBARI-13318. Issue with "Memory allocated for all YARN containers on a node" enhanced config (aonishuk)"
Repository: ambari Updated Branches: refs/heads/branch-2.1 46db8ff3d -> e1bb12518 Revert "AMBARI-13318. Issue with "Memory allocated for all YARN containers on a node" enhanced config (aonishuk)" This reverts commit f922634ffd728e5286a3454b82e2e817d2de6b3f. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e1bb1251 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e1bb1251 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e1bb1251 Branch: refs/heads/branch-2.1 Commit: e1bb125182d160b9622ce0ada2ab07b9c39c273d Parents: 46db8ff Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Oct 9 09:07:27 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Oct 9 09:41:41 2015 +0300 -- .../internal/BlueprintConfigurationProcessor.java | 2 -- .../internal/BlueprintConfigurationProcessorTest.java | 9 + 2 files changed, 1 insertion(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e1bb1251/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java index 0535c96..892cf32 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java @@ -1916,7 +1916,6 @@ public class BlueprintConfigurationProcessor { mPropertyUpdaters.put("hbase-env", hbaseEnvMap); mPropertyUpdaters.put("mapred-env", mapredEnvMap); mPropertyUpdaters.put("oozie-env", oozieEnvHeapSizeMap); -mPropertyUpdaters.put("yarn-site", yarnSiteMap); multiHostTopologyUpdaters.put("webhcat-site", multiWebhcatSiteMap); multiHostTopologyUpdaters.put("hbase-site", multiHbaseSiteMap); @@ -2058,7 +2057,6 @@ public class BlueprintConfigurationProcessor { hbaseEnvMap.put("hbase_regionserver_heapsize", new MPropertyUpdater()); oozieEnvHeapSizeMap.put("oozie_heapsize", new MPropertyUpdater()); oozieEnvHeapSizeMap.put("oozie_permsize", new MPropertyUpdater()); -yarnSiteMap.put("yarn.nodemanager.resource.memory-mb", new MPropertyUpdater()); } /** http://git-wip-us.apache.org/repos/asf/ambari/blob/e1bb1251/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java index 43da6c5..a97ca74 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java @@ -1422,13 +1422,11 @@ public class BlueprintConfigurationProcessorTest { Map<String, String> oozieSiteProperties = new HashMap<String, String>(); Map<String, String> oozieEnvProperties = new HashMap<String, String>(); Map<String, String> coreSiteProperties = new HashMap<String, String>(); -Map<String, String> yarnSiteProperties = new HashMap<String, String>(); - + configProperties.put("oozie-site", oozieSiteProperties); configProperties.put("oozie-env", oozieEnvProperties); configProperties.put("hive-env", oozieEnvProperties); configProperties.put("core-site", coreSiteProperties); -configProperties.put("yarn-site", yarnSiteProperties); oozieSiteProperties.put("oozie.base.url", expectedHostName); oozieSiteProperties.put("oozie.authentication.kerberos.principal", expectedHostName); @@ -1441,8 +1439,6 @@ public class BlueprintConfigurationProcessorTest { oozieEnvProperties.put("oozie_permsize", "2048m"); coreSiteProperties.put("hadoop.proxyuser.oozie.hosts", expectedHostName + "," + expectedHostNameTwo); - -oozieEnvProperties.put("yarn.nodemanager.resource.memory-mb", "2048m"); Configuration cluste
ambari git commit: AMBARI-13410. Ambari-metrics-common rpm doesn't contain build number (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1.2 099096246 -> 8a800741e AMBARI-13410. Ambari-metrics-common rpm doesn't contain build number (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8a800741 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8a800741 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8a800741 Branch: refs/heads/branch-2.1.2 Commit: 8a800741e3fe676c3b5de5e031f523cc20017824 Parents: 0990962 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Oct 13 22:24:22 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Oct 13 22:24:22 2015 +0300 -- ambari-metrics/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8a800741/ambari-metrics/pom.xml -- diff --git a/ambari-metrics/pom.xml b/ambari-metrics/pom.xml index c2da855..4a48897 100644 --- a/ambari-metrics/pom.xml +++ b/ambari-metrics/pom.xml @@ -198,9 +198,9 @@ package-release ${project.version} - ^([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-)((([a-zA-Z]+)?([0-9]+))|(SNAPSHOT)).* + ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-)((([a-zA-Z]+)?([0-9]+))|(SNAPSHOT)).* - $5 + $7 true
ambari git commit: AMBARI-13410. Ambari-metrics-common rpm doesn't contain build number (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 d7b8dc907 -> 154c98b2c AMBARI-13410. Ambari-metrics-common rpm doesn't contain build number (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/154c98b2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/154c98b2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/154c98b2 Branch: refs/heads/branch-2.1 Commit: 154c98b2c075889d819c041bec90ff3c6ac57b13 Parents: d7b8dc9 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Oct 13 22:21:17 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Oct 13 22:21:17 2015 +0300 -- ambari-metrics/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/154c98b2/ambari-metrics/pom.xml -- diff --git a/ambari-metrics/pom.xml b/ambari-metrics/pom.xml index c2da855..4a48897 100644 --- a/ambari-metrics/pom.xml +++ b/ambari-metrics/pom.xml @@ -198,9 +198,9 @@ package-release ${project.version} - ^([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-)((([a-zA-Z]+)?([0-9]+))|(SNAPSHOT)).* + ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-)((([a-zA-Z]+)?([0-9]+))|(SNAPSHOT)).* - $5 + $7 true
ambari git commit: AMBARI-13410. Ambari-metrics-common rpm doesn't contain build number (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk 81eff4e59 -> b33ad0791 AMBARI-13410. Ambari-metrics-common rpm doesn't contain build number (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b33ad079 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b33ad079 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b33ad079 Branch: refs/heads/trunk Commit: b33ad0791e5e643b4c621898c18f48245514dea8 Parents: 81eff4e Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Oct 13 22:21:14 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Oct 13 22:21:14 2015 +0300 -- ambari-metrics/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b33ad079/ambari-metrics/pom.xml -- diff --git a/ambari-metrics/pom.xml b/ambari-metrics/pom.xml index 8931340..da4712a 100644 --- a/ambari-metrics/pom.xml +++ b/ambari-metrics/pom.xml @@ -205,9 +205,9 @@ package-release ${project.version} - ^([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-)((([a-zA-Z]+)?([0-9]+))|(SNAPSHOT)).* + ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-)((([a-zA-Z]+)?([0-9]+))|(SNAPSHOT)).* - $5 + $7 true
ambari git commit: AMBARI-13358. Ambari throwing ganglia errors after upgrade (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk 9ea0ffd0f -> a64c46971 AMBARI-13358. Ambari throwing ganglia errors after upgrade (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a64c4697 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a64c4697 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a64c4697 Branch: refs/heads/trunk Commit: a64c469718a5395e9adfdabf46fe15b7040adf89 Parents: 9ea0ffd Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Oct 9 15:21:38 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Oct 9 15:21:38 2015 +0300 -- .../ambari/server/orm/dao/ClusterDAO.java | 36 +--- .../apache/ambari/server/state/ServiceImpl.java | 7 ++-- 2 files changed, 26 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a64c4697/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java index 1523f3a..b79d5e3 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java @@ -128,19 +128,6 @@ public class ClusterDAO { TypedQuery query = entityManagerProvider.get().createQuery(cq); return daoUtils.selectOne(query); } - - @RequiresSession - public List findClusterConfigMappingEntitiesByType(Long clusterId, String type) { -CriteriaBuilder cb = entityManagerProvider.get().getCriteriaBuilder(); -CriteriaQuery cq = cb.createQuery(ClusterConfigMappingEntity.class); -Root config = cq.from(ClusterConfigMappingEntity.class); -cq.where(cb.and( -cb.equal(config.get("clusterId"), clusterId)), - cb.equal(config.get("typeName"), type) -); -TypedQuery query = entityManagerProvider.get().createQuery(cq); -return daoUtils.selectList(query); - } /** * Gets the next version that will be created for a given @@ -274,6 +261,29 @@ public class ClusterDAO { public void removeConfigMapping(ClusterConfigMappingEntity entity) { entityManagerProvider.get().remove(entity); } + + + /** + * Sets selected = 0, for clusterConfigEntities which has type_name which is in the given types list + * + * @param clusterId + * the cluster that the service is a part of. + * @param types + * the names of the configuration types. + */ +@Transactional +public void removeClusterConfigMappingEntityByTypes(Long clusterId, List types) { + if(types.isEmpty()) { +return; + } + + TypedQuery query = entityManagerProvider.get().createQuery + ("DELETE FROM ClusterConfigMappingEntity configs WHERE configs" + +".clusterId=?1 AND configs.typeName IN ?2", Long.class); + + daoUtils.executeUpdate(query, clusterId, types); +} + /** * Retrieve entity data from DB http://git-wip-us.apache.org/repos/asf/ambari/blob/a64c4697/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java index 1d3f051..9d5fa85 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java @@ -566,12 +566,11 @@ public class ServiceImpl implements Service { } if(lastServiceConfigEntity != null) { + List configTypesToDisable = new ArrayList(); for(ClusterConfigEntity clusterConfigEntity:lastServiceConfigEntity.getClusterConfigEntities()) { -List clusterConfigMappingEntities = clusterDAO.findClusterConfigMappingEntitiesByType(cluster.getClusterId() ,clusterConfigEntity.getType()); -for(ClusterConfigMappingEntity clusterConfigMappingEntity:clusterConfigMappingEntities) { - clusterDAO.removeConfigMapping(clusterConfigMappingEntity); -} +configTypesToDisable.add(clusterConfigEntity.getType()); } + clusterDAO.removeClusterConfigMappingEntityByTypes(cluster.getClusterId(), configTypesToDisable); } }
ambari git commit: AMBARI-13307. Agent instance memory footprint likely gradually growing (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1.2 a9290ec85 -> 39b964a7d AMBARI-13307. Agent instance memory footprint likely gradually growing (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/39b964a7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/39b964a7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/39b964a7 Branch: refs/heads/branch-2.1.2 Commit: 39b964a7d5d869c9244dc1de324aeff8ab2346b7 Parents: a9290ec Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Oct 9 14:45:48 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Oct 9 14:45:48 2015 +0300 -- .../src/main/python/resource_management/core/logger.py | 4 ++-- .../python/resource_management/libraries/script/script.py | 9 +++-- 2 files changed, 5 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/39b964a7/ambari-common/src/main/python/resource_management/core/logger.py -- diff --git a/ambari-common/src/main/python/resource_management/core/logger.py b/ambari-common/src/main/python/resource_management/core/logger.py index 7642c6d..f126f1e 100644 --- a/ambari-common/src/main/python/resource_management/core/logger.py +++ b/ambari-common/src/main/python/resource_management/core/logger.py @@ -36,6 +36,8 @@ class Logger: @staticmethod def initialize_logger(name='resource_management', logging_level=logging.INFO, format='%(asctime)s - %(message)s'): +if Logger.logger: + return # set up logging (two separate loggers for stderr and stdout with different loglevels) logger = logging.getLogger(name) logger.setLevel(logging_level) @@ -51,8 +53,6 @@ class Logger: logger.addHandler(chout) Logger.logger = logger - -return logger, chout, cherr @staticmethod def error(text): http://git-wip-us.apache.org/repos/asf/ambari/blob/39b964a7/ambari-common/src/main/python/resource_management/libraries/script/script.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/script/script.py b/ambari-common/src/main/python/resource_management/libraries/script/script.py index f43c414..efd34e3 100644 --- a/ambari-common/src/main/python/resource_management/libraries/script/script.py +++ b/ambari-common/src/main/python/resource_management/libraries/script/script.py @@ -171,11 +171,9 @@ class Script(object): Sets up logging; Parses command parameters and executes method relevant to command type """ -logger, chout, cherr = Logger.initialize_logger(__name__) - # parse arguments if len(sys.argv) < 7: - logger.error("Script expects at least 6 arguments") + print "Script expects at least 6 arguments" print USAGE.format(os.path.basename(sys.argv[0])) # print to stdout sys.exit(1) @@ -188,8 +186,7 @@ class Script(object): Script.tmp_dir = sys.argv[6] logging_level_str = logging._levelNames[self.logging_level] -chout.setLevel(logging_level_str) -logger.setLevel(logging_level_str) +Logger.initialize_logger(__name__, logging_level=logging_level_str) # on windows we need to reload some of env variables manually because there is no default paths for configs(like # /etc/something/conf on linux. When this env vars created by one of the Script execution, they can not be updated @@ -208,7 +205,7 @@ class Script(object): Script.passwords[get_path_from_configuration(k, Script.config)] = get_path_from_configuration(v, Script.config) except IOError: - logger.exception("Can not read json file with command parameters: ") + Logging.logger.exception("Can not read json file with command parameters: ") sys.exit(1) # Run class method depending on a command type
[1/2] ambari git commit: AMBARI-13358. Ambari throwing ganglia errors after upgrade (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 40242bcfa -> 811d2316e refs/heads/trunk 800e42597 -> 9ea0ffd0f AMBARI-13358. Ambari throwing ganglia errors after upgrade (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9ea0ffd0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9ea0ffd0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9ea0ffd0 Branch: refs/heads/trunk Commit: 9ea0ffd0f41f510d683da7da9e3fb32605f15033 Parents: 800e425 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Oct 9 14:52:37 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Oct 9 14:52:37 2015 +0300 -- .../ambari/server/orm/dao/ClusterDAO.java | 14 ++ .../apache/ambari/server/state/ServiceImpl.java | 20 +++- 2 files changed, 33 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9ea0ffd0/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java index 609d0de..1523f3a 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java @@ -18,6 +18,7 @@ package org.apache.ambari.server.orm.dao; +import java.util.Collections; import java.util.List; import javax.persistence.EntityManager; @@ -127,6 +128,19 @@ public class ClusterDAO { TypedQuery query = entityManagerProvider.get().createQuery(cq); return daoUtils.selectOne(query); } + + @RequiresSession + public List findClusterConfigMappingEntitiesByType(Long clusterId, String type) { +CriteriaBuilder cb = entityManagerProvider.get().getCriteriaBuilder(); +CriteriaQuery cq = cb.createQuery(ClusterConfigMappingEntity.class); +Root config = cq.from(ClusterConfigMappingEntity.class); +cq.where(cb.and( +cb.equal(config.get("clusterId"), clusterId)), + cb.equal(config.get("typeName"), type) +); +TypedQuery query = entityManagerProvider.get().createQuery(cq); +return daoUtils.selectList(query); + } /** * Gets the next version that will be created for a given http://git-wip-us.apache.org/repos/asf/ambari/blob/9ea0ffd0/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java index 9a91e4c..1d3f051 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java @@ -18,6 +18,7 @@ package org.apache.ambari.server.state; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -37,6 +38,8 @@ import org.apache.ambari.server.orm.dao.ClusterServiceDAO; import org.apache.ambari.server.orm.dao.ServiceConfigDAO; import org.apache.ambari.server.orm.dao.ServiceDesiredStateDAO; import org.apache.ambari.server.orm.dao.StackDAO; +import org.apache.ambari.server.orm.entities.ClusterConfigEntity; +import org.apache.ambari.server.orm.entities.ClusterConfigMappingEntity; import org.apache.ambari.server.orm.entities.ClusterEntity; import org.apache.ambari.server.orm.entities.ClusterServiceEntity; import org.apache.ambari.server.orm.entities.ClusterServiceEntityPK; @@ -551,10 +554,25 @@ public class ServiceImpl implements Service { List serviceConfigEntities = serviceConfigDAO.findByService(cluster.getClusterId(), getName()); +Long maxServiceConfigEntityId = -1L; +ServiceConfigEntity lastServiceConfigEntity = null; // last service config by id, should have all needed clusterConfigEntities + for (ServiceConfigEntity serviceConfigEntity : serviceConfigEntities) { + if(serviceConfigEntity.getServiceConfigId() > maxServiceConfigEntityId) { +maxServiceConfigEntityId = serviceConfigEntity.getServiceConfigId(); +lastServiceConfigEntity = serviceConfigEntity; + } serviceConfigDAO.remove(serviceConfigEntity); } - + +if(lastServiceConfigEntity != null) { + for(ClusterConfigEntity clusterConfigEntity:lastServiceConfigEntity.getClusterConfigEntities()) { +List clusterConfigMappingEntities = clusterDAO.findClusterConfigMappingEntitiesByType(cluster.get
[2/2] ambari git commit: AMBARI-13358. Ambari throwing ganglia errors after upgrade (aonishuk)
AMBARI-13358. Ambari throwing ganglia errors after upgrade (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/811d2316 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/811d2316 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/811d2316 Branch: refs/heads/branch-2.1 Commit: 811d2316ef824543c2a3ea2908e8993f1560c52a Parents: 40242bc Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Oct 9 14:52:40 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Oct 9 14:52:40 2015 +0300 -- .../ambari/server/orm/dao/ClusterDAO.java | 14 ++ .../apache/ambari/server/state/ServiceImpl.java | 20 +++- 2 files changed, 33 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/811d2316/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java index 6e55128..3085747 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java @@ -18,6 +18,7 @@ package org.apache.ambari.server.orm.dao; +import java.util.Collections; import java.util.List; import javax.persistence.EntityManager; @@ -127,6 +128,19 @@ public class ClusterDAO { TypedQuery query = entityManagerProvider.get().createQuery(cq); return daoUtils.selectOne(query); } + + @RequiresSession + public List findClusterConfigMappingEntitiesByType(Long clusterId, String type) { +CriteriaBuilder cb = entityManagerProvider.get().getCriteriaBuilder(); +CriteriaQuery cq = cb.createQuery(ClusterConfigMappingEntity.class); +Root config = cq.from(ClusterConfigMappingEntity.class); +cq.where(cb.and( +cb.equal(config.get("clusterId"), clusterId)), + cb.equal(config.get("typeName"), type) +); +TypedQuery query = entityManagerProvider.get().createQuery(cq); +return daoUtils.selectList(query); + } /** * Gets the next version that will be created for a given http://git-wip-us.apache.org/repos/asf/ambari/blob/811d2316/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java index c210557..7b1d0d8 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java @@ -18,6 +18,7 @@ package org.apache.ambari.server.state; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -37,6 +38,8 @@ import org.apache.ambari.server.orm.dao.ClusterServiceDAO; import org.apache.ambari.server.orm.dao.ServiceConfigDAO; import org.apache.ambari.server.orm.dao.ServiceDesiredStateDAO; import org.apache.ambari.server.orm.dao.StackDAO; +import org.apache.ambari.server.orm.entities.ClusterConfigEntity; +import org.apache.ambari.server.orm.entities.ClusterConfigMappingEntity; import org.apache.ambari.server.orm.entities.ClusterEntity; import org.apache.ambari.server.orm.entities.ClusterServiceEntity; import org.apache.ambari.server.orm.entities.ClusterServiceEntityPK; @@ -550,10 +553,25 @@ public class ServiceImpl implements Service { List serviceConfigEntities = serviceConfigDAO.findByService(cluster.getClusterId(), getName()); +Long maxServiceConfigEntityId = -1L; +ServiceConfigEntity lastServiceConfigEntity = null; // last service config by id, should have all needed clusterConfigEntities + for (ServiceConfigEntity serviceConfigEntity : serviceConfigEntities) { + if(serviceConfigEntity.getServiceConfigId() > maxServiceConfigEntityId) { +maxServiceConfigEntityId = serviceConfigEntity.getServiceConfigId(); +lastServiceConfigEntity = serviceConfigEntity; + } serviceConfigDAO.remove(serviceConfigEntity); } - + +if(lastServiceConfigEntity != null) { + for(ClusterConfigEntity clusterConfigEntity:lastServiceConfigEntity.getClusterConfigEntities()) { +List clusterConfigMappingEntities = clusterDAO.findClusterConfigMappingEntitiesByType(cluster.getClusterId() ,clusterConfigEntity.getType()); +for(ClusterConfigMappingEntity clusterConfigMappingEntity:clusterConfigMappingEntities) { +
ambari git commit: AMBARI-13358. Ambari throwing ganglia errors after upgrade (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 811d2316e -> c06a8ab75 AMBARI-13358. Ambari throwing ganglia errors after upgrade (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c06a8ab7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c06a8ab7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c06a8ab7 Branch: refs/heads/branch-2.1 Commit: c06a8ab759b9c1e5fa9eba0cd91b172bf2739ce2 Parents: 811d231 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Oct 9 15:29:36 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Oct 9 15:29:36 2015 +0300 -- .../ambari/server/orm/dao/ClusterDAO.java | 36 +--- .../apache/ambari/server/state/ServiceImpl.java | 7 ++-- 2 files changed, 26 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c06a8ab7/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java index 3085747..6ab3b4f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java @@ -128,19 +128,6 @@ public class ClusterDAO { TypedQuery query = entityManagerProvider.get().createQuery(cq); return daoUtils.selectOne(query); } - - @RequiresSession - public List findClusterConfigMappingEntitiesByType(Long clusterId, String type) { -CriteriaBuilder cb = entityManagerProvider.get().getCriteriaBuilder(); -CriteriaQuery cq = cb.createQuery(ClusterConfigMappingEntity.class); -Root config = cq.from(ClusterConfigMappingEntity.class); -cq.where(cb.and( -cb.equal(config.get("clusterId"), clusterId)), - cb.equal(config.get("typeName"), type) -); -TypedQuery query = entityManagerProvider.get().createQuery(cq); -return daoUtils.selectList(query); - } /** * Gets the next version that will be created for a given @@ -248,6 +235,29 @@ public class ClusterDAO { public void removeConfigMapping(ClusterConfigMappingEntity entity) { entityManagerProvider.get().remove(entity); } + + + /** + * Sets selected = 0, for clusterConfigEntities which has type_name which is in the given types list + * + * @param clusterId + * the cluster that the service is a part of. + * @param types + * the names of the configuration types. + */ +@Transactional +public void removeClusterConfigMappingEntityByTypes(Long clusterId, List types) { + if(types.isEmpty()) { +return; + } + + TypedQuery query = entityManagerProvider.get().createQuery + ("DELETE FROM ClusterConfigMappingEntity configs WHERE configs" + +".clusterId=?1 AND configs.typeName IN ?2", Long.class); + + daoUtils.executeUpdate(query, clusterId, types); +} + /** * Retrieve entity data from DB http://git-wip-us.apache.org/repos/asf/ambari/blob/c06a8ab7/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java index 7b1d0d8..bbe2f62 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java @@ -565,12 +565,11 @@ public class ServiceImpl implements Service { } if(lastServiceConfigEntity != null) { + List configTypesToDisable = new ArrayList(); for(ClusterConfigEntity clusterConfigEntity:lastServiceConfigEntity.getClusterConfigEntities()) { -List clusterConfigMappingEntities = clusterDAO.findClusterConfigMappingEntitiesByType(cluster.getClusterId() ,clusterConfigEntity.getType()); -for(ClusterConfigMappingEntity clusterConfigMappingEntity:clusterConfigMappingEntities) { - clusterDAO.removeConfigMapping(clusterConfigMappingEntity); -} +configTypesToDisable.add(clusterConfigEntity.getType()); } + clusterDAO.removeClusterConfigMappingEntityByTypes(cluster.getClusterId(), configTypesToDisable); } }
[1/2] ambari git commit: AMBARI-12326. on non-root agent RU ZK restart fails (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 d81c31ed0 - c679234d3 refs/heads/trunk 02dfbab58 - 877141d78 AMBARI-12326. on non-root agent RU ZK restart fails (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/877141d7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/877141d7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/877141d7 Branch: refs/heads/trunk Commit: 877141d784b6dba018ca0926abe4297ca4eae2cc Parents: 02dfbab Author: Andrew Onishuk aonis...@hortonworks.com Authored: Wed Jul 8 12:18:34 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Wed Jul 8 12:18:34 2015 +0300 -- .../python/resource_management/libraries/functions/validate.py | 4 ++-- .../ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py| 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/877141d7/ambari-common/src/main/python/resource_management/libraries/functions/validate.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/validate.py b/ambari-common/src/main/python/resource_management/libraries/functions/validate.py index 63196f7..c3c9ae7 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/validate.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/validate.py @@ -25,12 +25,12 @@ from resource_management.core.exceptions import Fail @retry(times=10, sleep_time=2) -def call_and_match_output(command, regex_expression, err_message): +def call_and_match_output(command, regex_expression, err_message, **call_kwargs): Call the command and performs a regex match on the output for the specified expression. :param command: Command to call :param regex_expression: Regex expression to search in the output - code, out = shell.call(command, logoutput=True) + code, out = shell.call(command, logoutput=True, quiet=False, **call_kwargs) if not (out and re.search(regex_expression, out, re.IGNORECASE)): raise Fail(err_message) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/877141d7/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py -- diff --git a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py index 240882f..b7fb578 100644 --- a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py +++ b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py @@ -91,9 +91,9 @@ class ZookeeperServerLinux(ZookeeperServer): delete_command = format(echo 'delete /{unique} ' | {cli_shell}) quorum_err_message = Failed to establish zookeeper quorum -call_and_match_output(create_command, 'Created', quorum_err_message) -call_and_match_output(list_command, r\[.*? + unique + .*?\], quorum_err_message) -shell.call(delete_command) +call_and_match_output(create_command, 'Created', quorum_err_message, user=params.zk_user) +call_and_match_output(list_command, r\[.*? + unique + .*?\], quorum_err_message, user=params.zk_user) +shell.call(delete_command, user=params.zk_user) if params.client_port: check_leader_command = format(echo stat | nc localhost {client_port} | grep Mode)
[2/2] ambari git commit: AMBARI-12326. on non-root agent RU ZK restart fails (aonishuk)
AMBARI-12326. on non-root agent RU ZK restart fails (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c679234d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c679234d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c679234d Branch: refs/heads/branch-2.1 Commit: c679234d38f420d92fb4243de9e338691cd6e036 Parents: d81c31e Author: Andrew Onishuk aonis...@hortonworks.com Authored: Wed Jul 8 12:18:36 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Wed Jul 8 12:18:36 2015 +0300 -- .../python/resource_management/libraries/functions/validate.py | 4 ++-- .../ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py| 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c679234d/ambari-common/src/main/python/resource_management/libraries/functions/validate.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/validate.py b/ambari-common/src/main/python/resource_management/libraries/functions/validate.py index 63196f7..c3c9ae7 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/validate.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/validate.py @@ -25,12 +25,12 @@ from resource_management.core.exceptions import Fail @retry(times=10, sleep_time=2) -def call_and_match_output(command, regex_expression, err_message): +def call_and_match_output(command, regex_expression, err_message, **call_kwargs): Call the command and performs a regex match on the output for the specified expression. :param command: Command to call :param regex_expression: Regex expression to search in the output - code, out = shell.call(command, logoutput=True) + code, out = shell.call(command, logoutput=True, quiet=False, **call_kwargs) if not (out and re.search(regex_expression, out, re.IGNORECASE)): raise Fail(err_message) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/c679234d/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py -- diff --git a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py index 240882f..b7fb578 100644 --- a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py +++ b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py @@ -91,9 +91,9 @@ class ZookeeperServerLinux(ZookeeperServer): delete_command = format(echo 'delete /{unique} ' | {cli_shell}) quorum_err_message = Failed to establish zookeeper quorum -call_and_match_output(create_command, 'Created', quorum_err_message) -call_and_match_output(list_command, r\[.*? + unique + .*?\], quorum_err_message) -shell.call(delete_command) +call_and_match_output(create_command, 'Created', quorum_err_message, user=params.zk_user) +call_and_match_output(list_command, r\[.*? + unique + .*?\], quorum_err_message, user=params.zk_user) +shell.call(delete_command, user=params.zk_user) if params.client_port: check_leader_command = format(echo stat | nc localhost {client_port} | grep Mode)
[2/2] ambari git commit: AMBARI-12331. on non-root agent RU Oozie restart fails (aonishuk)
AMBARI-12331. on non-root agent RU Oozie restart fails (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6ea0b83c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6ea0b83c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6ea0b83c Branch: refs/heads/branch-2.1 Commit: 6ea0b83c84bcd23a84577996d6e5b7e7a4af98ba Parents: 58fc42e Author: Andrew Onishuk aonis...@hortonworks.com Authored: Wed Jul 8 17:48:03 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Wed Jul 8 17:48:03 2015 +0300 -- .../libraries/functions/tar_archive.py | 40 ++--- .../1.4.0.2.0/package/scripts/flume_upgrade.py | 5 +- .../0.5.0.2.2/package/scripts/knox_gateway.py | 6 +- .../package/scripts/oozie_server_upgrade.py | 23 +-- .../stacks/2.0.6/HDFS/test_hdfs_client.py | 3 + .../stacks/2.0.6/OOZIE/test_oozie_server.py | 124 +-- .../stacks/2.1/FALCON/test_falcon_server.py | 158 ++- .../python/stacks/2.2/KNOX/test_knox_gateway.py | 85 ++ 8 files changed, 309 insertions(+), 135 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6ea0b83c/ambari-common/src/main/python/resource_management/libraries/functions/tar_archive.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/tar_archive.py b/ambari-common/src/main/python/resource_management/libraries/functions/tar_archive.py index f1fb597..49caf88 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/tar_archive.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/tar_archive.py @@ -18,16 +18,12 @@ See the License for the specific language governing permissions and limitations under the License. ''' -import os -import tarfile -from contextlib import closing +from resource_management.core.resources.system import Execute def archive_dir(output_filename, input_dir): - with closing(tarfile.open(output_filename, w:gz)) as tar: -try: - tar.add(input_dir, arcname=os.path.basename(.)) -finally: - tar.close() + Execute(('tar', '-zcvf', output_filename, input_dir), +sudo = True, + ) def archive_directory_dereference(archive, directory): @@ -38,19 +34,15 @@ def archive_directory_dereference(archive, directory): :param directory: the directory to include :return: None - tarball = None - try: -# !!! dereference must be TRUE since the conf is a symlink and we want -# its contents instead of the actual symlink -tarball = tarfile.open(archive, mode=w, dereference=True) - -# tar the files, chopping off everything in front of directory -# /foo/bar/conf/a, /foo/bar/conf/b, /foo/bar/conf/dir/c -# becomes -# a -# b -# dir/c -tarball.add(directory, arcname=os.path.relpath(directory, start=directory)) - finally: -if tarball: - tarball.close() \ No newline at end of file + + Execute(('tar', '-zcvhf', archive, directory), +sudo = True, + ) + +def untar_archive(archive, directory): + + :param directory: can be a symlink and is followed + + Execute(('tar','-xvf',archive,'-C',directory+/), + sudo = True, + ) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/6ea0b83c/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_upgrade.py -- diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_upgrade.py b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_upgrade.py index 32cc1b9..7743619 100644 --- a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_upgrade.py +++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_upgrade.py @@ -70,10 +70,7 @@ def pre_start_restore(): directoryMappings[directory]) if os.path.isfile(archive): - Logger.info('Extracting {0} to {1}'.format(archive, directory)) - Execute(('tar','-xvf',archive,'-C',directory+/), - sudo = True, - ) + tar_archive.untar_archive(archive, directory) # cleanup if os.path.exists(os.path.join(tempfile.gettempdir(), BACKUP_TEMP_DIR)): http://git-wip-us.apache.org/repos/asf/ambari/blob/6ea0b83c/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py -- diff --git a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py b/ambari-server/src/main
[1/2] ambari git commit: AMBARI-12331. on non-root agent RU Oozie restart fails (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 58fc42e16 - 6ea0b83c8 refs/heads/trunk bebe23872 - cebb515d4 AMBARI-12331. on non-root agent RU Oozie restart fails (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cebb515d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cebb515d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cebb515d Branch: refs/heads/trunk Commit: cebb515d4a4109d951687d5c932fdd9af27e3b48 Parents: bebe238 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Wed Jul 8 17:48:01 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Wed Jul 8 17:48:01 2015 +0300 -- .../libraries/functions/tar_archive.py | 40 ++--- .../1.4.0.2.0/package/scripts/flume_upgrade.py | 5 +- .../0.5.0.2.2/package/scripts/knox_gateway.py | 6 +- .../package/scripts/oozie_server_upgrade.py | 23 +-- .../stacks/2.0.6/HDFS/test_hdfs_client.py | 3 + .../stacks/2.0.6/OOZIE/test_oozie_server.py | 124 +-- .../stacks/2.1/FALCON/test_falcon_server.py | 158 ++- .../python/stacks/2.2/KNOX/test_knox_gateway.py | 85 ++ 8 files changed, 309 insertions(+), 135 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cebb515d/ambari-common/src/main/python/resource_management/libraries/functions/tar_archive.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/tar_archive.py b/ambari-common/src/main/python/resource_management/libraries/functions/tar_archive.py index f1fb597..49caf88 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/tar_archive.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/tar_archive.py @@ -18,16 +18,12 @@ See the License for the specific language governing permissions and limitations under the License. ''' -import os -import tarfile -from contextlib import closing +from resource_management.core.resources.system import Execute def archive_dir(output_filename, input_dir): - with closing(tarfile.open(output_filename, w:gz)) as tar: -try: - tar.add(input_dir, arcname=os.path.basename(.)) -finally: - tar.close() + Execute(('tar', '-zcvf', output_filename, input_dir), +sudo = True, + ) def archive_directory_dereference(archive, directory): @@ -38,19 +34,15 @@ def archive_directory_dereference(archive, directory): :param directory: the directory to include :return: None - tarball = None - try: -# !!! dereference must be TRUE since the conf is a symlink and we want -# its contents instead of the actual symlink -tarball = tarfile.open(archive, mode=w, dereference=True) - -# tar the files, chopping off everything in front of directory -# /foo/bar/conf/a, /foo/bar/conf/b, /foo/bar/conf/dir/c -# becomes -# a -# b -# dir/c -tarball.add(directory, arcname=os.path.relpath(directory, start=directory)) - finally: -if tarball: - tarball.close() \ No newline at end of file + + Execute(('tar', '-zcvhf', archive, directory), +sudo = True, + ) + +def untar_archive(archive, directory): + + :param directory: can be a symlink and is followed + + Execute(('tar','-xvf',archive,'-C',directory+/), + sudo = True, + ) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/cebb515d/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_upgrade.py -- diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_upgrade.py b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_upgrade.py index 32cc1b9..7743619 100644 --- a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_upgrade.py +++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_upgrade.py @@ -70,10 +70,7 @@ def pre_start_restore(): directoryMappings[directory]) if os.path.isfile(archive): - Logger.info('Extracting {0} to {1}'.format(archive, directory)) - Execute(('tar','-xvf',archive,'-C',directory+/), - sudo = True, - ) + tar_archive.untar_archive(archive, directory) # cleanup if os.path.exists(os.path.join(tempfile.gettempdir(), BACKUP_TEMP_DIR)): http://git-wip-us.apache.org/repos/asf/ambari/blob/cebb515d/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py -- diff --git
[2/2] ambari git commit: AMBARI-12334. YARN service check issues (aonishuk)
AMBARI-12334. YARN service check issues (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/23d7b174 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/23d7b174 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/23d7b174 Branch: refs/heads/branch-2.1 Commit: 23d7b17428bd674cc8665c571e10e73a9e4a68be Parents: 6ea0b83 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Wed Jul 8 17:53:57 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Wed Jul 8 17:53:57 2015 +0300 -- .../YARN/2.1.0.2.0/package/scripts/params_linux.py| 3 ++- .../YARN/2.1.0.2.0/package/scripts/service_check.py | 2 +- .../src/test/python/stacks/2.0.6/configs/client-upgrade.json | 3 ++- ambari-server/src/test/python/stacks/2.0.6/configs/default.json | 3 ++- ambari-server/src/test/python/stacks/2.0.6/configs/secured.json | 3 ++- 5 files changed, 9 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/23d7b174/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py index 0b1bec5..77092c1 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py @@ -121,7 +121,7 @@ kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executab rm_hosts = config['clusterHostInfo']['rm_host'] rm_host = rm_hosts[0] rm_port = config['configurations']['yarn-site']['yarn.resourcemanager.webapp.address'].split(':')[-1] -rm_https_port = 8090 +rm_https_port = config['configurations']['yarn-site']['yarn.resourcemanager.webapp.https.address'].split(':')[-1] # TODO UPGRADE default, update site during upgrade rm_nodes_exclude_path = default(/configurations/yarn-site/yarn.resourcemanager.nodes.exclude-path,/etc/hadoop/conf/yarn.exclude) @@ -285,6 +285,7 @@ yarn_http_policy = config['configurations']['yarn-site']['yarn.http.policy'] yarn_https_on = (yarn_http_policy.upper() == 'HTTPS_ONLY') scheme = 'http' if not yarn_https_on else 'https' yarn_rm_address = config['configurations']['yarn-site']['yarn.resourcemanager.webapp.address'] if not yarn_https_on else config['configurations']['yarn-site']['yarn.resourcemanager.webapp.https.address'] +rm_active_port = rm_https_port if yarn_https_on else rm_port #ranger yarn properties if has_ranger_admin: http://git-wip-us.apache.org/repos/asf/ambari/blob/23d7b174/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py index a58db1d..1d593ba 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py @@ -114,7 +114,7 @@ class ServiceCheckDefault(ServiceCheck): json_response_received = False for rm_host in params.rm_hosts: - info_app_url = params.scheme + :// + params.yarn_rm_address + /ws/v1/cluster/apps/ + application_name + info_app_url = params.scheme + :// + rm_host + : + params.rm_active_port + /ws/v1/cluster/apps/ + application_name get_app_info_cmd = curl --negotiate -u : -ksL --connect-timeout + CURL_CONNECTION_TIMEOUT + + info_app_url http://git-wip-us.apache.org/repos/asf/ambari/blob/23d7b174/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json b/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json index a8bc490..c13e5c9 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json +++ b/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json @@ -484,7 +484,8 @@ yarn.timeline-service.webapp.https.address: c6402.ambari.apache.org:8190, yarn.resourcemanager.connect.retry-interval.ms: 3, yarn.timeline-service.leveldb-timeline-store.start-time-write-cache-size: 1, -yarn.http.policy: HTTP_ONLY
[1/2] ambari git commit: AMBARI-12334. YARN service check issues (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 6ea0b83c8 - 23d7b1742 refs/heads/trunk cebb515d4 - 601af4efb AMBARI-12334. YARN service check issues (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/601af4ef Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/601af4ef Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/601af4ef Branch: refs/heads/trunk Commit: 601af4efb5d8053bcb2d972ce5930ab8be6f3665 Parents: cebb515 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Wed Jul 8 17:53:55 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Wed Jul 8 17:53:55 2015 +0300 -- .../YARN/2.1.0.2.0/package/scripts/params_linux.py| 3 ++- .../YARN/2.1.0.2.0/package/scripts/service_check.py | 2 +- .../src/test/python/stacks/2.0.6/configs/client-upgrade.json | 3 ++- ambari-server/src/test/python/stacks/2.0.6/configs/default.json | 3 ++- ambari-server/src/test/python/stacks/2.0.6/configs/secured.json | 3 ++- 5 files changed, 9 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/601af4ef/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py index 0b1bec5..77092c1 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py @@ -121,7 +121,7 @@ kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executab rm_hosts = config['clusterHostInfo']['rm_host'] rm_host = rm_hosts[0] rm_port = config['configurations']['yarn-site']['yarn.resourcemanager.webapp.address'].split(':')[-1] -rm_https_port = 8090 +rm_https_port = config['configurations']['yarn-site']['yarn.resourcemanager.webapp.https.address'].split(':')[-1] # TODO UPGRADE default, update site during upgrade rm_nodes_exclude_path = default(/configurations/yarn-site/yarn.resourcemanager.nodes.exclude-path,/etc/hadoop/conf/yarn.exclude) @@ -285,6 +285,7 @@ yarn_http_policy = config['configurations']['yarn-site']['yarn.http.policy'] yarn_https_on = (yarn_http_policy.upper() == 'HTTPS_ONLY') scheme = 'http' if not yarn_https_on else 'https' yarn_rm_address = config['configurations']['yarn-site']['yarn.resourcemanager.webapp.address'] if not yarn_https_on else config['configurations']['yarn-site']['yarn.resourcemanager.webapp.https.address'] +rm_active_port = rm_https_port if yarn_https_on else rm_port #ranger yarn properties if has_ranger_admin: http://git-wip-us.apache.org/repos/asf/ambari/blob/601af4ef/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py index a58db1d..1d593ba 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py @@ -114,7 +114,7 @@ class ServiceCheckDefault(ServiceCheck): json_response_received = False for rm_host in params.rm_hosts: - info_app_url = params.scheme + :// + params.yarn_rm_address + /ws/v1/cluster/apps/ + application_name + info_app_url = params.scheme + :// + rm_host + : + params.rm_active_port + /ws/v1/cluster/apps/ + application_name get_app_info_cmd = curl --negotiate -u : -ksL --connect-timeout + CURL_CONNECTION_TIMEOUT + + info_app_url http://git-wip-us.apache.org/repos/asf/ambari/blob/601af4ef/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json b/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json index a8bc490..c13e5c9 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json +++ b/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json @@ -484,7 +484,8 @@ yarn.timeline-service.webapp.https.address: c6402.ambari.apache.org:8190, yarn.resourcemanager.connect.retry-interval.ms: 3
[1/2] ambari git commit: AMBARI-12359. on non-root agent RU Falcon restart fails (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 5f3d2a613 - 5b3d80fbd refs/heads/trunk d9097096d - cd3f63c49 AMBARI-12359. on non-root agent RU Falcon restart fails (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cd3f63c4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cd3f63c4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cd3f63c4 Branch: refs/heads/trunk Commit: cd3f63c49ee4f6fd26e34d65b201bfa435eb21cc Parents: d909709 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Thu Jul 9 20:27:46 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Thu Jul 9 20:27:46 2015 +0300 -- .../package/scripts/falcon_server_upgrade.py| 16 ++ .../stacks/2.1/FALCON/test_falcon_server.py | 59 2 files changed, 43 insertions(+), 32 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cd3f63c4/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon_server_upgrade.py -- diff --git a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon_server_upgrade.py b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon_server_upgrade.py index 07cfbf6..6277086 100644 --- a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon_server_upgrade.py +++ b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon_server_upgrade.py @@ -24,6 +24,8 @@ import tempfile from resource_management.core.logger import Logger from resource_management.core.exceptions import Fail from resource_management.libraries.functions import tar_archive +from resource_management.core.resources.system import Execute +from resource_management.core.resources.system import Directory BACKUP_TEMP_DIR = falcon-upgrade-backup BACKUP_DATA_ARCHIVE = falcon-local-backup.tar @@ -72,18 +74,12 @@ def pre_start_restore(): if not os.path.isfile(archive): raise Fail(Unable to restore missing backup archive {0}.format(archive)) -Logger.info('Extracting {0} to {1}'.format(archive, directory)) - -tarball = None -try: - tarball = tarfile.open(archive, r) - tarball.extractall(directory) -finally: - if tarball: -tarball.close() +tar_archive.untar_archive(archive, directory) # cleanup - shutil.rmtree(os.path.join(tempfile.gettempdir(), BACKUP_TEMP_DIR)) + Directory(os.path.join(tempfile.gettempdir(), BACKUP_TEMP_DIR), +action = delete, + ) def _get_directory_mappings(): http://git-wip-us.apache.org/repos/asf/ambari/blob/cd3f63c4/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py -- diff --git a/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py b/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py index ba2c026..11570ed 100644 --- a/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py +++ b/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py @@ -182,14 +182,10 @@ class TestFalconServer(RMFTestCase): recursive = True ) - - @patch(shutil.rmtree, new = MagicMock()) - @patch(tarfile.open) @patch(os.path.isdir) @patch(os.path.exists) @patch(os.path.isfile) - def test_upgrade(self, isfile_mock, exists_mock, isdir_mock, - tarfile_open_mock): + def test_upgrade(self, isfile_mock, exists_mock, isdir_mock): isdir_mock.return_value = True exists_mock.side_effect = [False,False,True, True] @@ -223,6 +219,23 @@ class TestFalconServer(RMFTestCase): self.assertResourceCalled('Execute', ('hdp-select', 'set', 'falcon-server', u'2.2.1.0-2135'), sudo = True, ) +self.assertResourceCalled('Execute', ('tar', + '-xvf', + '/tmp/falcon-upgrade-backup/falcon-conf-backup.tar', + '-C', + '/usr/hdp/current/falcon-server/conf/'), +sudo = True, +) +self.assertResourceCalled('Execute', ('tar', + '-xvf', + '/tmp/falcon-upgrade-backup/falcon-local-backup.tar', + '-C', + u'/hadoop/falcon/'), +sudo = True, +) +self.assertResourceCalled('Directory', '/tmp/falcon-upgrade-backup', +action = ['delete'], +) self.assertResourceCalled('Directory', '/var/run/falcon', owner = 'falcon', recursive = True, @@ -357,17 +370,6 @@ class TestFalconServer(RMFTestCase): user = 'falcon', ) self.assertNoMoreResources() - -# 4 calls to tarfile.open (2 directories * read + write) -self.assertTrue
[2/2] ambari git commit: AMBARI-12386. After running as root, ambari-agent won't start or stop as non-root (aonishuk)
AMBARI-12386. After running as root, ambari-agent won't start or stop as non-root (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0bd575b8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0bd575b8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0bd575b8 Branch: refs/heads/branch-2.1 Commit: 0bd575b8ae7d35ef821e547dc30ed9acc19ab920 Parents: 85c6880 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Sat Jul 11 10:21:28 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Sat Jul 11 10:21:28 2015 +0300 -- ambari-agent/conf/unix/ambari-agent | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0bd575b8/ambari-agent/conf/unix/ambari-agent -- diff --git a/ambari-agent/conf/unix/ambari-agent b/ambari-agent/conf/unix/ambari-agent index 2d38067..9a57554 100755 --- a/ambari-agent/conf/unix/ambari-agent +++ b/ambari-agent/conf/unix/ambari-agent @@ -56,11 +56,11 @@ if [ $? != 0 ] [ $EUID -ne 0 ] ; then fi change_files_permissions() { - ambari-sudo.sh chown -R $current_user /var/run/ambari-agent - ambari-sudo.sh chown -R $current_user /var/log/ambari-agent - ambari-sudo.sh chown -R $current_user /var/lib/ambari-agent/data - ambari-sudo.sh chown -R $current_user /var/lib/ambari-agent/cache - ambari-sudo.sh chown $current_user /usr/lib/ambari-agent + ambari-sudo.sh chown -R $current_user /var/run/ambari-agent/ + ambari-sudo.sh chown -R $current_user /var/log/ambari-agent/ + ambari-sudo.sh chown -R $current_user /var/lib/ambari-agent/data/ + ambari-sudo.sh chown -R $current_user /var/lib/ambari-agent/cache/ + ambari-sudo.sh chown$current_user /usr/lib/ambari-agent/ } if [ -a /usr/bin/python2.7 ] [ -z $PYTHON ]; then
[1/2] ambari git commit: AMBARI-12306. Some alerts report cluster name to be null (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 ef71690b5 - 6f097c93a refs/heads/trunk 913121389 - 31159474a AMBARI-12306. Some alerts report cluster name to be null (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/31159474 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/31159474 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/31159474 Branch: refs/heads/trunk Commit: 31159474a2f4dcc85e1808f8a5e20c138bd34c76 Parents: 9131213 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Tue Jul 7 15:49:37 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Tue Jul 7 15:49:37 2015 +0300 -- .../listeners/alerts/AlertAggregateListener.java | 14 ++ 1 file changed, 14 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/31159474/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertAggregateListener.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertAggregateListener.java b/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertAggregateListener.java index ac2f907..0bcfa2f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertAggregateListener.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertAggregateListener.java @@ -22,6 +22,8 @@ import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; +import com.google.inject.Provider; +import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.EagerSingleton; import org.apache.ambari.server.events.AggregateAlertRecalculateEvent; import org.apache.ambari.server.events.AlertReceivedEvent; @@ -32,6 +34,7 @@ import org.apache.ambari.server.orm.dao.AlertSummaryDTO; import org.apache.ambari.server.orm.dao.AlertsDAO; import org.apache.ambari.server.state.Alert; import org.apache.ambari.server.state.AlertState; +import org.apache.ambari.server.state.Clusters; import org.apache.ambari.server.state.alert.AggregateDefinitionMapping; import org.apache.ambari.server.state.alert.AggregateSource; import org.apache.ambari.server.state.alert.AlertDefinition; @@ -68,6 +71,12 @@ public class AlertAggregateListener { private AlertsDAO m_alertsDao = null; /** + * Used for looking cluster name by cluster id + */ + @Inject + ProviderClusters m_clusters; + + /** * The event publisher used to receive incoming events and publish new events * when an aggregate alert is run. */ @@ -168,6 +177,11 @@ public class AlertAggregateListener { aggregateAlert.setLabel(aggregateDefinition.getLabel()); aggregateAlert.setTimestamp(System.currentTimeMillis()); +try { + aggregateAlert.setCluster(m_clusters.get().getClusterById(clusterId).getClusterName()); +} catch (AmbariException exception) { + LOG.error(Unable to lookup cluster with ID {}, clusterId, exception); +} if (0 == totalCount) { aggregateAlert.setText(There are no instances of the aggregated alert.);
[2/2] ambari git commit: AMBARI-12306. Some alerts report cluster name to be null (aonishuk)
AMBARI-12306. Some alerts report cluster name to be null (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6f097c93 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6f097c93 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6f097c93 Branch: refs/heads/branch-2.1 Commit: 6f097c93a38d6573c4713ed420c1a8d6e85c878f Parents: ef71690 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Tue Jul 7 15:49:39 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Tue Jul 7 15:49:39 2015 +0300 -- .../listeners/alerts/AlertAggregateListener.java | 14 ++ 1 file changed, 14 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6f097c93/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertAggregateListener.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertAggregateListener.java b/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertAggregateListener.java index ac2f907..0bcfa2f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertAggregateListener.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertAggregateListener.java @@ -22,6 +22,8 @@ import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; +import com.google.inject.Provider; +import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.EagerSingleton; import org.apache.ambari.server.events.AggregateAlertRecalculateEvent; import org.apache.ambari.server.events.AlertReceivedEvent; @@ -32,6 +34,7 @@ import org.apache.ambari.server.orm.dao.AlertSummaryDTO; import org.apache.ambari.server.orm.dao.AlertsDAO; import org.apache.ambari.server.state.Alert; import org.apache.ambari.server.state.AlertState; +import org.apache.ambari.server.state.Clusters; import org.apache.ambari.server.state.alert.AggregateDefinitionMapping; import org.apache.ambari.server.state.alert.AggregateSource; import org.apache.ambari.server.state.alert.AlertDefinition; @@ -68,6 +71,12 @@ public class AlertAggregateListener { private AlertsDAO m_alertsDao = null; /** + * Used for looking cluster name by cluster id + */ + @Inject + ProviderClusters m_clusters; + + /** * The event publisher used to receive incoming events and publish new events * when an aggregate alert is run. */ @@ -168,6 +177,11 @@ public class AlertAggregateListener { aggregateAlert.setLabel(aggregateDefinition.getLabel()); aggregateAlert.setTimestamp(System.currentTimeMillis()); +try { + aggregateAlert.setCluster(m_clusters.get().getClusterById(clusterId).getClusterName()); +} catch (AmbariException exception) { + LOG.error(Unable to lookup cluster with ID {}, clusterId, exception); +} if (0 == totalCount) { aggregateAlert.setText(There are no instances of the aggregated alert.);
[1/2] ambari git commit: AMBARI-12310. Yarn Service check from Ambari fails on WireEncrypted Cluster (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 261fd7f76 - ef71690b5 refs/heads/trunk 6ca17505b - 913121389 AMBARI-12310. Yarn Service check from Ambari fails on WireEncrypted Cluster (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/91312138 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/91312138 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/91312138 Branch: refs/heads/trunk Commit: 9131213895c9bf9cb05023f4ffba74e21a41549e Parents: 6ca1750 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Tue Jul 7 14:10:58 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Tue Jul 7 14:10:58 2015 +0300 -- .../YARN/2.1.0.2.0/package/scripts/params_linux.py | 11 ++- .../YARN/2.1.0.2.0/package/scripts/service_check.py | 4 ++-- .../test/python/stacks/2.0.6/configs/client-upgrade.json | 3 ++- .../src/test/python/stacks/2.0.6/configs/default.json| 3 ++- .../src/test/python/stacks/2.0.6/configs/secured.json| 3 ++- 5 files changed, 14 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/91312138/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py index 790c51b..0b1bec5 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py @@ -281,6 +281,11 @@ else: ranger_admin_log_dir = default(/configurations/ranger-env/ranger_admin_log_dir,/var/log/ranger/admin) +yarn_http_policy = config['configurations']['yarn-site']['yarn.http.policy'] +yarn_https_on = (yarn_http_policy.upper() == 'HTTPS_ONLY') +scheme = 'http' if not yarn_https_on else 'https' +yarn_rm_address = config['configurations']['yarn-site']['yarn.resourcemanager.webapp.address'] if not yarn_https_on else config['configurations']['yarn-site']['yarn.resourcemanager.webapp.https.address'] + #ranger yarn properties if has_ranger_admin: is_supported_yarn_ranger = config['configurations']['yarn-env']['is_supported_yarn_ranger'] @@ -299,11 +304,7 @@ if has_ranger_admin: ranger_env = config['configurations']['ranger-env'] ranger_plugin_properties = config['configurations']['ranger-yarn-plugin-properties'] policy_user = config['configurations']['ranger-yarn-plugin-properties']['policy_user'] -yarn_rest_url = config['configurations']['yarn-site']['yarn.resourcemanager.webapp.address'] -yarn_http_policy = config['configurations']['yarn-site']['yarn.http.policy'] -scheme = 'http' -if yarn_http_policy.upper() == 'HTTPS_ONLY': - scheme = 'https' +yarn_rest_url = config['configurations']['yarn-site']['yarn.resourcemanager.webapp.address'] ranger_plugin_config = { 'username' : config['configurations']['ranger-yarn-plugin-properties']['REPOSITORY_CONFIG_USERNAME'], http://git-wip-us.apache.org/repos/asf/ambari/blob/91312138/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py index f4b0969..a58db1d 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py @@ -114,9 +114,9 @@ class ServiceCheckDefault(ServiceCheck): json_response_received = False for rm_host in params.rm_hosts: - info_app_url = http://; + rm_host + : + params.rm_port + /ws/v1/cluster/apps/ + application_name + info_app_url = params.scheme + :// + params.yarn_rm_address + /ws/v1/cluster/apps/ + application_name - get_app_info_cmd = curl --negotiate -u : -sL --connect-timeout + CURL_CONNECTION_TIMEOUT + + info_app_url + get_app_info_cmd = curl --negotiate -u : -ksL --connect-timeout + CURL_CONNECTION_TIMEOUT + + info_app_url return_code, stdout = shell.checked_call(get_app_info_cmd, path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin', http://git-wip-us.apache.org/repos/asf/ambari/blob/91312138/ambari-server/src/test/python/stacks/2.0.6/configs
[1/2] ambari git commit: AMBARI-12351. SecondaryNameNode alert not working with SPNEGO enabled cluster (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 fa206f755 - dc223c338 refs/heads/trunk f46ec8df8 - f8008fcb9 AMBARI-12351. SecondaryNameNode alert not working with SPNEGO enabled cluster (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f8008fcb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f8008fcb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f8008fcb Branch: refs/heads/trunk Commit: f8008fcb970649aebb581ebfc3de8e36f8ff76bb Parents: f46ec8d Author: Andrew Onishuk aonis...@hortonworks.com Authored: Thu Jul 9 13:42:04 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Thu Jul 9 13:42:04 2015 +0300 -- .../src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f8008fcb/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json -- diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json index f5a10f6..477fd95 100644 --- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json +++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json @@ -476,6 +476,8 @@ uri: { http: {{hdfs-site/dfs.namenode.secondary.http-address}}, https: {{hdfs-site/dfs.namenode.secondary.https-address}}, +kerberos_keytab: {{hdfs-site/dfs.web.authentication.kerberos.keytab}}, +kerberos_principal: {{hdfs-site/dfs.web.authentication.kerberos.principal}}, https_property: {{hdfs-site/dfs.http.policy}}, https_property_value: HTTPS_ONLY },
[2/2] ambari git commit: AMBARI-12351. SecondaryNameNode alert not working with SPNEGO enabled cluster (aonishuk)
AMBARI-12351. SecondaryNameNode alert not working with SPNEGO enabled cluster (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dc223c33 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dc223c33 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dc223c33 Branch: refs/heads/branch-2.1 Commit: dc223c33879f789993cf5c18c1f854ff4c603d00 Parents: fa206f7 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Thu Jul 9 13:42:06 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Thu Jul 9 13:42:06 2015 +0300 -- .../src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/dc223c33/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json -- diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json index f5a10f6..477fd95 100644 --- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json +++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json @@ -476,6 +476,8 @@ uri: { http: {{hdfs-site/dfs.namenode.secondary.http-address}}, https: {{hdfs-site/dfs.namenode.secondary.https-address}}, +kerberos_keytab: {{hdfs-site/dfs.web.authentication.kerberos.keytab}}, +kerberos_principal: {{hdfs-site/dfs.web.authentication.kerberos.principal}}, https_property: {{hdfs-site/dfs.http.policy}}, https_property_value: HTTPS_ONLY },
[2/2] ambari git commit: AMBARI-12352. Ambari dashboard reports hive metastore as green but alerts says metastore down. (aonishuk)
AMBARI-12352. Ambari dashboard reports hive metastore as green but alerts says metastore down. (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1e6f278f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1e6f278f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1e6f278f Branch: refs/heads/branch-2.1 Commit: 1e6f278fd7285f97fd43289b6789932691e29164 Parents: dc223c3 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Thu Jul 9 15:41:51 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Thu Jul 9 15:41:51 2015 +0300 -- .../HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1e6f278f/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py index f7a84f2..7f23d31 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py @@ -160,10 +160,10 @@ def execute(configurations={}, parameters={}, host_name=None): cmd = format(export HIVE_CONF_DIR='{conf_dir}' ; hive --hiveconf hive.metastore.uris={metastore_uri}\ - --hiveconf hive.metastore.client.connect.retry.delay=1s\ + --hiveconf hive.metastore.client.connect.retry.delay=1\ --hiveconf hive.metastore.failure.retries=1\ --hiveconf hive.metastore.connect.retries=1\ - --hiveconf hive.metastore.client.socket.timeout=14s\ + --hiveconf hive.metastore.client.socket.timeout=14\ --hiveconf hive.execution.engine=mr -e 'show databases;') start_time = time.time() @@ -225,10 +225,10 @@ def execute(configurations={}, parameters={}, host_name=None): hive_cmd = os.path.join(hive_home, bin, hive.cmd) cmd = format(cmd /c {hive_cmd} --hiveconf hive.metastore.uris={metastore_uri}\ - --hiveconf hive.metastore.client.connect.retry.delay=1s\ + --hiveconf hive.metastore.client.connect.retry.delay=1\ --hiveconf hive.metastore.failure.retries=1\ --hiveconf hive.metastore.connect.retries=1\ - --hiveconf hive.metastore.client.socket.timeout=14s\ + --hiveconf hive.metastore.client.socket.timeout=14\ --hiveconf hive.execution.engine=mr -e 'show databases;') start_time = time.time() try:
[1/2] ambari git commit: AMBARI-12352. Ambari dashboard reports hive metastore as green but alerts says metastore down. (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 dc223c338 - 1e6f278fd refs/heads/trunk f8008fcb9 - 5330972d6 AMBARI-12352. Ambari dashboard reports hive metastore as green but alerts says metastore down. (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5330972d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5330972d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5330972d Branch: refs/heads/trunk Commit: 5330972d692856c93871fabeebd47abb7cb5647f Parents: f8008fc Author: Andrew Onishuk aonis...@hortonworks.com Authored: Thu Jul 9 15:41:49 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Thu Jul 9 15:41:49 2015 +0300 -- .../HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5330972d/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py index f7a84f2..7f23d31 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_metastore.py @@ -160,10 +160,10 @@ def execute(configurations={}, parameters={}, host_name=None): cmd = format(export HIVE_CONF_DIR='{conf_dir}' ; hive --hiveconf hive.metastore.uris={metastore_uri}\ - --hiveconf hive.metastore.client.connect.retry.delay=1s\ + --hiveconf hive.metastore.client.connect.retry.delay=1\ --hiveconf hive.metastore.failure.retries=1\ --hiveconf hive.metastore.connect.retries=1\ - --hiveconf hive.metastore.client.socket.timeout=14s\ + --hiveconf hive.metastore.client.socket.timeout=14\ --hiveconf hive.execution.engine=mr -e 'show databases;') start_time = time.time() @@ -225,10 +225,10 @@ def execute(configurations={}, parameters={}, host_name=None): hive_cmd = os.path.join(hive_home, bin, hive.cmd) cmd = format(cmd /c {hive_cmd} --hiveconf hive.metastore.uris={metastore_uri}\ - --hiveconf hive.metastore.client.connect.retry.delay=1s\ + --hiveconf hive.metastore.client.connect.retry.delay=1\ --hiveconf hive.metastore.failure.retries=1\ --hiveconf hive.metastore.connect.retries=1\ - --hiveconf hive.metastore.client.socket.timeout=14s\ + --hiveconf hive.metastore.client.socket.timeout=14\ --hiveconf hive.execution.engine=mr -e 'show databases;') start_time = time.time() try:
[2/2] ambari git commit: AMBARI-12371. Downloaded client configuration contains strange folder (aonishuk)
AMBARI-12371. Downloaded client configuration contains strange folder (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c4e9c507 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c4e9c507 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c4e9c507 Branch: refs/heads/branch-2.1 Commit: c4e9c50772db7e78ee5e5ba04f33ecb92f238042 Parents: 14ab4bf Author: Andrew Onishuk aonis...@hortonworks.com Authored: Fri Jul 10 18:08:31 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Fri Jul 10 18:08:31 2015 +0300 -- .../resource_management/libraries/script/script.py| 14 -- .../test/python/stacks/2.0.6/HDFS/test_hdfs_client.py | 8 +--- 2 files changed, 17 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c4e9c507/ambari-common/src/main/python/resource_management/libraries/script/script.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/script/script.py b/ambari-common/src/main/python/resource_management/libraries/script/script.py index c422ac8..26fd158 100644 --- a/ambari-common/src/main/python/resource_management/libraries/script/script.py +++ b/ambari-common/src/main/python/resource_management/libraries/script/script.py @@ -25,6 +25,7 @@ import os import sys import logging import platform +import tarfile from ambari_commons import OSCheck, OSConst from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl from resource_management.libraries.resources import XmlConfig @@ -40,6 +41,7 @@ from resource_management.libraries.functions.version import compare_versions from resource_management.libraries.functions.version import format_hdp_stack_version from resource_management.libraries.script.config_dictionary import ConfigDictionary, UnknownConfiguration from resource_management.core.resources.system import Execute +from contextlib import closing import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set. @@ -536,18 +538,26 @@ class Script(object): for filename, dict in file_dict.iteritems(): XmlConfig(filename, conf_dir=conf_tmp_dir, +mode=0644, **self.generate_configs_get_xml_file_content(filename, dict) ) for file_dict in env_configs_list: for filename,dicts in file_dict.iteritems(): File(os.path.join(conf_tmp_dir, filename), + mode=0644, content=InlineTemplate(self.generate_configs_get_template_file_content(filename, dicts))) for file_dict in properties_configs_list: for filename, dict in file_dict.iteritems(): PropertiesFile(os.path.join(conf_tmp_dir, filename), -properties=self.generate_configs_get_xml_file_dict(filename, dict) + mode=0644, + properties=self.generate_configs_get_xml_file_dict(filename, dict) ) - archive_dir(output_filename, conf_tmp_dir) + with closing(tarfile.open(output_filename, w:gz)) as tar: +try: + tar.add(conf_tmp_dir, arcname=os.path.basename(.)) +finally: + tar.close() + finally: Directory(conf_tmp_dir, action=delete) http://git-wip-us.apache.org/repos/asf/ambari/blob/c4e9c507/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py index 06d94e9..4948d01 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py +++ b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py @@ -48,25 +48,27 @@ class Test(RMFTestCase): ) self.assertResourceCalled('XmlConfig', 'hdfs-site.xml', conf_dir = '/tmp/123', + mode=0644, configuration_attributes = self.getConfig()['configuration_attributes']['hdfs-site'], configurations = self.getConfig()['configurations']['hdfs-site'], ) self.assertResourceCalled('File', '/tmp/123/hadoop-env.sh', + mode=0644, content = InlineTemplate(self.getConfig()['configurations']['hadoop-env']['content']), ) self.assertResourceCalled('File', '/tmp/123/log4j.properties', + mode=0644
[1/2] ambari git commit: AMBARI-12371. Downloaded client configuration contains strange folder (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 14ab4bf7e - c4e9c5077 refs/heads/trunk f438398fd - 4fbab311d AMBARI-12371. Downloaded client configuration contains strange folder (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4fbab311 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4fbab311 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4fbab311 Branch: refs/heads/trunk Commit: 4fbab311df79264e4bbc65e7b5d546409f0a3622 Parents: f438398 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Fri Jul 10 18:08:28 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Fri Jul 10 18:08:28 2015 +0300 -- .../resource_management/libraries/script/script.py| 14 -- .../test/python/stacks/2.0.6/HDFS/test_hdfs_client.py | 8 +--- 2 files changed, 17 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4fbab311/ambari-common/src/main/python/resource_management/libraries/script/script.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/script/script.py b/ambari-common/src/main/python/resource_management/libraries/script/script.py index c422ac8..26fd158 100644 --- a/ambari-common/src/main/python/resource_management/libraries/script/script.py +++ b/ambari-common/src/main/python/resource_management/libraries/script/script.py @@ -25,6 +25,7 @@ import os import sys import logging import platform +import tarfile from ambari_commons import OSCheck, OSConst from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl from resource_management.libraries.resources import XmlConfig @@ -40,6 +41,7 @@ from resource_management.libraries.functions.version import compare_versions from resource_management.libraries.functions.version import format_hdp_stack_version from resource_management.libraries.script.config_dictionary import ConfigDictionary, UnknownConfiguration from resource_management.core.resources.system import Execute +from contextlib import closing import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set. @@ -536,18 +538,26 @@ class Script(object): for filename, dict in file_dict.iteritems(): XmlConfig(filename, conf_dir=conf_tmp_dir, +mode=0644, **self.generate_configs_get_xml_file_content(filename, dict) ) for file_dict in env_configs_list: for filename,dicts in file_dict.iteritems(): File(os.path.join(conf_tmp_dir, filename), + mode=0644, content=InlineTemplate(self.generate_configs_get_template_file_content(filename, dicts))) for file_dict in properties_configs_list: for filename, dict in file_dict.iteritems(): PropertiesFile(os.path.join(conf_tmp_dir, filename), -properties=self.generate_configs_get_xml_file_dict(filename, dict) + mode=0644, + properties=self.generate_configs_get_xml_file_dict(filename, dict) ) - archive_dir(output_filename, conf_tmp_dir) + with closing(tarfile.open(output_filename, w:gz)) as tar: +try: + tar.add(conf_tmp_dir, arcname=os.path.basename(.)) +finally: + tar.close() + finally: Directory(conf_tmp_dir, action=delete) http://git-wip-us.apache.org/repos/asf/ambari/blob/4fbab311/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py index 06d94e9..4948d01 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py +++ b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py @@ -48,25 +48,27 @@ class Test(RMFTestCase): ) self.assertResourceCalled('XmlConfig', 'hdfs-site.xml', conf_dir = '/tmp/123', + mode=0644, configuration_attributes = self.getConfig()['configuration_attributes']['hdfs-site'], configurations = self.getConfig()['configurations']['hdfs-site'], ) self.assertResourceCalled('File', '/tmp/123/hadoop-env.sh', + mode=0644, content = InlineTemplate(self.getConfig()['configurations']['hadoop-env']['content
[1/2] ambari git commit: AMBARI-12390. Confirm Hosts step fails with umask 027 and non-root ambari-server user (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 38df799a5 - f28c2493e refs/heads/trunk f540afa05 - 99c5ab336 AMBARI-12390. Confirm Hosts step fails with umask 027 and non-root ambari-server user (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/99c5ab33 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/99c5ab33 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/99c5ab33 Branch: refs/heads/trunk Commit: 99c5ab3369723a1ef56783fbf8b9cea149f828a5 Parents: f540afa Author: Andrew Onishuk aonis...@hortonworks.com Authored: Sun Jul 12 12:01:48 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Sun Jul 12 12:01:48 2015 +0300 -- ambari-server/src/main/python/bootstrap.py | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/99c5ab33/ambari-server/src/main/python/bootstrap.py -- diff --git a/ambari-server/src/main/python/bootstrap.py b/ambari-server/src/main/python/bootstrap.py index 436d631..95ad4d1 100755 --- a/ambari-server/src/main/python/bootstrap.py +++ b/ambari-server/src/main/python/bootstrap.py @@ -458,6 +458,7 @@ class BootstrapDefault(Bootstrap): target, params.bootdir, self.host_log) result = scp.run() self.host_log.write(\n) +result[exitstatus] = 0 # ignore not copied *.pyc files with permission denied. return result def getMoveRepoFileWithPasswordCommand(self, targetDir):
[2/2] ambari git commit: AMBARI-12390. Confirm Hosts step fails with umask 027 and non-root ambari-server user (aonishuk)
AMBARI-12390. Confirm Hosts step fails with umask 027 and non-root ambari-server user (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f28c2493 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f28c2493 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f28c2493 Branch: refs/heads/branch-2.1 Commit: f28c2493e4a853cc9cadc5bd620b4225fe76a7fa Parents: 38df799 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Sun Jul 12 12:01:50 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Sun Jul 12 12:01:50 2015 +0300 -- ambari-server/src/main/python/bootstrap.py | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f28c2493/ambari-server/src/main/python/bootstrap.py -- diff --git a/ambari-server/src/main/python/bootstrap.py b/ambari-server/src/main/python/bootstrap.py index 436d631..95ad4d1 100755 --- a/ambari-server/src/main/python/bootstrap.py +++ b/ambari-server/src/main/python/bootstrap.py @@ -458,6 +458,7 @@ class BootstrapDefault(Bootstrap): target, params.bootdir, self.host_log) result = scp.run() self.host_log.write(\n) +result[exitstatus] = 0 # ignore not copied *.pyc files with permission denied. return result def getMoveRepoFileWithPasswordCommand(self, targetDir):
[2/2] ambari git commit: AMBARI-13881. Devdeploy: YARN, Mahout service checks fail on all OSes (aonishuk)
AMBARI-13881. Devdeploy: YARN,Mahout service checks fail on all OSes (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/99413382 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/99413382 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/99413382 Branch: refs/heads/branch-2.1 Commit: 994133826c47b1371240e8235c5bf3a86beccd58 Parents: 203195c Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Nov 13 14:48:01 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Nov 13 14:48:01 2015 +0200 -- .../2.1.0.2.0/package/scripts/params_linux.py | 2 ++ .../YARN/2.1.0.2.0/package/scripts/yarn.py | 8 ++ .../stacks/2.0.6/YARN/test_historyserver.py | 30 3 files changed, 40 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/99413382/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py index 0e9d77c..cc42481 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py @@ -175,6 +175,8 @@ nm_log_dirs_list = nm_log_dirs.split(',') distrAppJarName = "hadoop-yarn-applications-distributedshell-2.*.jar" hadoopMapredExamplesJarName = "hadoop-mapreduce-examples-2.*.jar" +entity_file_history_directory = "/tmp/entity-file-history/active" + yarn_pid_dir = status_params.yarn_pid_dir mapred_pid_dir = status_params.mapred_pid_dir http://git-wip-us.apache.org/repos/asf/ambari/blob/99413382/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py index 8c52de2..aa79fe4 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py @@ -71,6 +71,14 @@ def yarn(name = None): mode=0777, recursive_chmod=True ) + + +params.HdfsResource(params.entity_file_history_directory, + action="create_on_execute", + type="directory", + owner=params.yarn_user, + group=params.user_group +) params.HdfsResource("/mapred", type="directory", action="create_on_execute", http://git-wip-us.apache.org/repos/asf/ambari/blob/99413382/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py index bd1643d..f345cf6 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py +++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py @@ -202,6 +202,21 @@ class TestHistoryServer(RMFTestCase): action = ['create_on_execute'], hdfs_site=self.getConfig()['configurations']['hdfs-site'], principal_name=UnknownConfigurationMock(), default_fs='hdfs://c6401.ambari.apache.org:8020', mode = 0777, ) +self.assertResourceCalled('HdfsResource', '/tmp/entity-file-history/active', +security_enabled = False, +hadoop_bin_dir = '/usr/bin', +keytab = UnknownConfigurationMock(), +default_fs = 'hdfs://c6401.ambari.apache.org:8020', +hdfs_site = self.getConfig()['configurations']['hdfs-site'], +kinit_path_local = '/usr/bin/kinit', +principal_name = UnknownConfigurationMock(), +user = 'hdfs', +owner = 'yarn', +group = 'hadoop', +hadoop_conf_dir = '/etc/hadoop/conf', +type = 'directory', +action = ['create_on_execute'], +) self.assertResourceCalled('HdfsResource', '/mapred', security_enabled = False, hadoop_bin_dir = '/usr/bin', @@ -428,6 +443,21 @@ class TestHistoryServer(RMFTestCase): action = ['crea
ambari git commit: AMBARI-13843. Create a script to setup an Ambari deployment for non-root (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk 927200115 -> 2d03c6d00 AMBARI-13843. Create a script to setup an Ambari deployment for non-root (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2d03c6d0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2d03c6d0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2d03c6d0 Branch: refs/heads/trunk Commit: 2d03c6d00224eeb974416345c804bc0cbb732c46 Parents: 9272001 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Nov 13 16:19:57 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Nov 13 16:20:22 2015 +0200 -- .../non_root/setup_and_start_non_root_agent.sh | 32 .../non_root/setup_and_start_non_root_server.sh | 19 2 files changed, 51 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2d03c6d0/b/contrib/utils/non_root/setup_and_start_non_root_agent.sh -- diff --git a/b/contrib/utils/non_root/setup_and_start_non_root_agent.sh b/b/contrib/utils/non_root/setup_and_start_non_root_agent.sh deleted file mode 100755 index a564546..000 --- a/b/contrib/utils/non_root/setup_and_start_non_root_agent.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and - -# Run this on every ambari-agent node where you wish to have ambari-agent running as non-root - -# The script functions: -# a) adds ambari user -# b) adds required sudo priviligies for it into /etc/sudoers -# c) Starts ambari-agent as ambari user - -useradd ambari - -echo 'Defaultsexempt_group = ambari' >> /etc/sudoers -echo 'Defaults!env_reset,env_delete-=PATH' >> /etc/sudoers -echo 'Defaults: ambari !requiretty' >> /etc/sudoers - -echo 'ambariALL=(ALL) NOPASSWD:SETENV: /usr/bin/yum,/usr/bin/zypper,/usr/bin/apt-get, /bin/mkdir, /usr/bin/test, /bin/ln, /bin/chown, /bin/chmod, /bin/chgrp, /usr/sbin/groupadd, /usr/sbin/groupmod, /usr/sbin/useradd, /usr/sbin/usermod, /bin/cp, /usr/sbin/setenforce, /usr/bin/test, /usr/bin/stat, /bin/mv, /bin/sed, /bin/rm, /bin/kill, /bin/readlink, /usr/bin/pgrep, /bin/cat, /usr/bin/unzip, /bin/tar, /usr/bin/tee, /usr/bin/hdp-select, /usr/bin/conf-select, /usr/hdp/current/hadoop-client/sbin/hadoop-daemon.sh, /usr/lib/hadoop/bin/hadoop-daemon.sh, /usr/lib/hadoop/sbin/hadoop-daemon.sh, /usr/hdp/current/ranger-admin/setup.sh, /usr/hdp/current/ranger-usersync/setup.sh, /usr/bin/ranger-usersync-stop, /usr/bin/ranger-usersync-start, /sbin/chkconfig gmond off, /sbin/chkconfig gmetad off, /etc/init.d/httpd *, /sbin/service hdp-gmetad start, /sbin/service hdp-gmond start, /usr/hdp/current/ranger-admin/ranger_credential_helper.py, /usr/hdp/current/ranger-kms/ranger_credential_he lper.py, /usr/sbin/gmond, /usr/sbin/update-rc.d ganglia-monitor *, /usr/sbin/update-rc.d gmetad *, /etc/init.d/apache2 *, /usr/sbin/service hdp-gmond *, /usr/sbin/service hdp-gmetad *, /usr/sbin/service mysql *, /sbin/service mysqld *, /sbin/service mysql *, /bin/su hdfs *, /bin/su ambari-qa *, /bin/su ranger *, /bin/su zookeeper *, /bin/su knox *,/bin/su falcon *,/bin/su ams *, /bin/su flume *,/bin/su hbase *,/bin/su spark *,/bin/su accumulo *,/bin/su hive *, /bin/su hcat *,/bin/su kafka *,/bin/su mapred *,/bin/su oozie *,/bin/su sqoop *,/bin/su storm *,/bin/su tez *,/bin/su atlas *,/bin/su yarn *,/bin/su kms *,/bin/su mysql *' >> /etc/sudoers - -sed -i.bak 's/run_as_user\s*=\s*.*$/run_as_user=ambari/g' '/etc/ambari-agent/conf/ambari-agent.ini' -su - ambari -c '/usr/sbin/ambari-agent restart' http://git-wip-us.apache.org/repos/asf/ambari/blob/2d03c6d0/b/contrib/utils/non_root/setup_and_start_non_root_server.sh -- diff --git a/b/contrib/utils/non_root/setup_and_start_non_root_server.sh b/b/contrib/utils/non_root/setup_and_start_non_root_server.sh deleted file mode 100755 index 469a7a6..000 --- a/b/contrib
[1/2] ambari git commit: AMBARI-13881. Devdeploy: YARN, Mahout service checks fail on all OSes (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 203195cc7 -> 994133826 refs/heads/trunk 18e595aeb -> a05e5b6b5 AMBARI-13881. Devdeploy: YARN,Mahout service checks fail on all OSes (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a05e5b6b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a05e5b6b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a05e5b6b Branch: refs/heads/trunk Commit: a05e5b6b55f400cbda163ceec385f07a4d670328 Parents: 18e595a Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Nov 13 14:47:58 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Nov 13 14:47:58 2015 +0200 -- .../2.1.0.2.0/package/scripts/params_linux.py | 2 ++ .../YARN/2.1.0.2.0/package/scripts/yarn.py | 8 ++ .../stacks/2.0.6/YARN/test_historyserver.py | 30 3 files changed, 40 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a05e5b6b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py index f608b08..aa71751 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py @@ -174,6 +174,8 @@ nm_log_dirs_list = nm_log_dirs.split(',') distrAppJarName = "hadoop-yarn-applications-distributedshell-2.*.jar" hadoopMapredExamplesJarName = "hadoop-mapreduce-examples-2.*.jar" +entity_file_history_directory = "/tmp/entity-file-history/active" + yarn_pid_dir = status_params.yarn_pid_dir mapred_pid_dir = status_params.mapred_pid_dir http://git-wip-us.apache.org/repos/asf/ambari/blob/a05e5b6b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py index 451976f..81809aa 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py @@ -71,6 +71,14 @@ def yarn(name = None): mode=0777, recursive_chmod=True ) + + +params.HdfsResource(params.entity_file_history_directory, + action="create_on_execute", + type="directory", + owner=params.yarn_user, + group=params.user_group +) params.HdfsResource("/mapred", type="directory", action="create_on_execute", http://git-wip-us.apache.org/repos/asf/ambari/blob/a05e5b6b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py index 40a085f..e1a7ed3 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py +++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py @@ -206,6 +206,21 @@ class TestHistoryServer(RMFTestCase): action = ['create_on_execute'], hdfs_site=self.getConfig()['configurations']['hdfs-site'], principal_name=UnknownConfigurationMock(), default_fs='hdfs://c6401.ambari.apache.org:8020', mode = 0777, ) +self.assertResourceCalled('HdfsResource', '/tmp/entity-file-history/active', +security_enabled = False, +hadoop_bin_dir = '/usr/bin', +keytab = UnknownConfigurationMock(), +default_fs = 'hdfs://c6401.ambari.apache.org:8020', +hdfs_site = self.getConfig()['configurations']['hdfs-site'], +kinit_path_local = '/usr/bin/kinit', +principal_name = UnknownConfigurationMock(), +user = 'hdfs', +owner = 'yarn', +group = 'hadoop', +hadoop_conf_dir = '/etc/hadoop/conf', +type = 'directory', +action = ['create_on_execute'], +) self.assertResourceCalled('HdfsResource', '/mapred', security_enabled = Fal
[2/2] ambari git commit: AMBARI-12898. Configure dfs.content-summary.limit to 5000 by default. (aonishuk)
AMBARI-12898. Configure dfs.content-summary.limit to 5000 by default. (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/69307276 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/69307276 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/69307276 Branch: refs/heads/branch-2.1 Commit: 69307276b73225adc868b313f53a100a38ac40b3 Parents: 8579b7b Author: Andrew Onishuk aonis...@hortonworks.com Authored: Thu Aug 27 15:38:51 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Thu Aug 27 15:38:51 2015 +0300 -- .../stacks/HDP/2.2/services/HDFS/configuration/hdfs-site.xml | 6 ++ 1 file changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/69307276/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/configuration/hdfs-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/configuration/hdfs-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/configuration/hdfs-site.xml index ee5566b..c1ff588 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/configuration/hdfs-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/configuration/hdfs-site.xml @@ -41,6 +41,12 @@ /property property +namedfs.content-summary.limit/name +value5000/value +descriptionDfs content summary limit./description + /property + + property namedfs.encryption.key.provider.uri/name value/value depends-on
[1/2] ambari git commit: AMBARI-12898. Configure dfs.content-summary.limit to 5000 by default. (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 8579b7bf9 - 69307276b refs/heads/trunk a54812b44 - 2ec1f8558 AMBARI-12898. Configure dfs.content-summary.limit to 5000 by default. (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2ec1f855 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2ec1f855 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2ec1f855 Branch: refs/heads/trunk Commit: 2ec1f8558283f64cde6bab32032bdf07778d3255 Parents: a54812b Author: Andrew Onishuk aonis...@hortonworks.com Authored: Thu Aug 27 15:38:47 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Thu Aug 27 15:38:47 2015 +0300 -- .../stacks/HDP/2.2/services/HDFS/configuration/hdfs-site.xml | 6 ++ 1 file changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2ec1f855/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/configuration/hdfs-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/configuration/hdfs-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/configuration/hdfs-site.xml index ee5566b..c1ff588 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/configuration/hdfs-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/configuration/hdfs-site.xml @@ -41,6 +41,12 @@ /property property +namedfs.content-summary.limit/name +value5000/value +descriptionDfs content summary limit./description + /property + + property namedfs.encryption.key.provider.uri/name value/value depends-on
[2/2] ambari git commit: AMBARI-12901. Ambari Headless principal for Storm should include cluster-name (aonishuk)
AMBARI-12901. Ambari Headless principal for Storm should include cluster-name (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3d4cc38a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3d4cc38a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3d4cc38a Branch: refs/heads/branch-2.1 Commit: 3d4cc38a646de6b70bbfadeabb0a512484286f89 Parents: 25ed4ef Author: Andrew Onishuk aonis...@hortonworks.com Authored: Thu Aug 27 15:58:07 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Thu Aug 27 15:58:07 2015 +0300 -- .../main/resources/common-services/STORM/0.9.1.2.1/kerberos.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3d4cc38a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/kerberos.json -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/kerberos.json b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/kerberos.json index c96d7e7..db21f51 100644 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/kerberos.json +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/kerberos.json @@ -40,8 +40,8 @@ supervisor.enable: true, storm.zookeeper.superACL: sasl:{{storm_bare_jaas_principal}}, java.security.auth.login.config: {{conf_dir}}/storm_jaas.conf, -nimbus.admins: ['{{storm_user}}'], -nimbus.supervisor.users: ['{{storm_user}}'], +nimbus.admins: ['{{storm_bare_jaas_principal}}'], +nimbus.supervisor.users: ['{{storm_bare_jaas_principal}}'], ui.filter.params: {'type': 'kerberos', 'kerberos.principal': '{{storm_ui_jaas_principal}}', 'kerberos.keytab': '{{storm_ui_keytab_path}}', 'kerberos.name.rules': 'DEFAULT'} } }
[1/2] ambari git commit: AMBARI-12900. Ambari overrides hot-fixed tez tarball on HDFS everytime HiveServer is restarted (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 69307276b - 7184571c3 refs/heads/trunk 2ec1f8558 - b0137be7a AMBARI-12900. Ambari overrides hot-fixed tez tarball on HDFS everytime HiveServer is restarted (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b0137be7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b0137be7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b0137be7 Branch: refs/heads/trunk Commit: b0137be7ab9e0388e6266b1911976ec253747ac9 Parents: 2ec1f85 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Thu Aug 27 15:45:57 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Thu Aug 27 15:45:57 2015 +0300 -- .../resource_management/libraries/functions/copy_tarball.py | 5 +++-- .../resource_management/libraries/providers/hdfs_resource.py| 3 +++ .../resource_management/libraries/resources/hdfs_resource.py| 4 3 files changed, 10 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b0137be7/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 ad4aadc..792f019 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 @@ -96,7 +96,7 @@ def _get_single_version_from_hdp_select(): return hdp_version def copy_to_hdfs(name, user_group, owner, file_mode=0444, custom_source_file=None, custom_dest_file=None, force_execute=False, - use_ru_version_during_ru=True): + use_ru_version_during_ru=True, replace_existing_files=False): :param name: Tarball name, e.g., tez, hive, pig, sqoop. :param user_group: Group to own the directory. @@ -190,7 +190,8 @@ def copy_to_hdfs(name, user_group, owner, file_mode=0444, custom_source_file=Non source=source_file, group=user_group, owner=owner, - mode=0444 + mode=0444, + replace_existing_files=replace_existing_files, ) Logger.info(Will attempt to copy {0} tarball from {1} to DFS at {2}..format(name, source_file, dest_file)) http://git-wip-us.apache.org/repos/asf/ambari/blob/b0137be7/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py index cb6fb21..1d1aeba 100644 --- a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py +++ b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py @@ -301,6 +301,9 @@ class HdfsResourceWebHDFS: if local_file_size == length: Logger.info(format(DFS file {target} is identical to {source}, skipping the copying)) return +elif not self.main_resource.resource.replace_existing_files: + Logger.info(format(Not replacing existing DFS file {target} which is different from {source}, due to replace_existing_files=False)) + return else: Logger.info(format(File {target} already exists in DFS, skipping the creation)) return http://git-wip-us.apache.org/repos/asf/ambari/blob/b0137be7/ambari-common/src/main/python/resource_management/libraries/resources/hdfs_resource.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/resources/hdfs_resource.py b/ambari-common/src/main/python/resource_management/libraries/resources/hdfs_resource.py index 3a991b0..69aeab0 100644 --- a/ambari-common/src/main/python/resource_management/libraries/resources/hdfs_resource.py +++ b/ambari-common/src/main/python/resource_management/libraries/resources/hdfs_resource.py @@ -63,6 +63,10 @@ class HdfsResource(Resource): recursive_chown = BooleanArgument(default=False) recursive_chmod = BooleanArgument(default=False) change_permissions_for_parents = BooleanArgument(default=False) + + If a file present in HDFS is different from source, should it be replaced? + + replace_existing_files = BooleanArgument(default=True) security_enabled = BooleanArgument(default=False) principal_name
[2/2] ambari git commit: AMBARI-12900. Ambari overrides hot-fixed tez tarball on HDFS everytime HiveServer is restarted (aonishuk)
AMBARI-12900. Ambari overrides hot-fixed tez tarball on HDFS everytime HiveServer is restarted (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7184571c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7184571c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7184571c Branch: refs/heads/branch-2.1 Commit: 7184571c3dff60c85fd7983c27dc638f0eb80c84 Parents: 6930727 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Thu Aug 27 15:45:59 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Thu Aug 27 15:45:59 2015 +0300 -- .../resource_management/libraries/functions/copy_tarball.py | 5 +++-- .../resource_management/libraries/providers/hdfs_resource.py| 3 +++ .../resource_management/libraries/resources/hdfs_resource.py| 4 3 files changed, 10 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7184571c/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 ad4aadc..792f019 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 @@ -96,7 +96,7 @@ def _get_single_version_from_hdp_select(): return hdp_version def copy_to_hdfs(name, user_group, owner, file_mode=0444, custom_source_file=None, custom_dest_file=None, force_execute=False, - use_ru_version_during_ru=True): + use_ru_version_during_ru=True, replace_existing_files=False): :param name: Tarball name, e.g., tez, hive, pig, sqoop. :param user_group: Group to own the directory. @@ -190,7 +190,8 @@ def copy_to_hdfs(name, user_group, owner, file_mode=0444, custom_source_file=Non source=source_file, group=user_group, owner=owner, - mode=0444 + mode=0444, + replace_existing_files=replace_existing_files, ) Logger.info(Will attempt to copy {0} tarball from {1} to DFS at {2}..format(name, source_file, dest_file)) http://git-wip-us.apache.org/repos/asf/ambari/blob/7184571c/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py index cb6fb21..1d1aeba 100644 --- a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py +++ b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py @@ -301,6 +301,9 @@ class HdfsResourceWebHDFS: if local_file_size == length: Logger.info(format(DFS file {target} is identical to {source}, skipping the copying)) return +elif not self.main_resource.resource.replace_existing_files: + Logger.info(format(Not replacing existing DFS file {target} which is different from {source}, due to replace_existing_files=False)) + return else: Logger.info(format(File {target} already exists in DFS, skipping the creation)) return http://git-wip-us.apache.org/repos/asf/ambari/blob/7184571c/ambari-common/src/main/python/resource_management/libraries/resources/hdfs_resource.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/resources/hdfs_resource.py b/ambari-common/src/main/python/resource_management/libraries/resources/hdfs_resource.py index 3a991b0..69aeab0 100644 --- a/ambari-common/src/main/python/resource_management/libraries/resources/hdfs_resource.py +++ b/ambari-common/src/main/python/resource_management/libraries/resources/hdfs_resource.py @@ -63,6 +63,10 @@ class HdfsResource(Resource): recursive_chown = BooleanArgument(default=False) recursive_chmod = BooleanArgument(default=False) change_permissions_for_parents = BooleanArgument(default=False) + + If a file present in HDFS is different from source, should it be replaced? + + replace_existing_files = BooleanArgument(default=True) security_enabled = BooleanArgument(default=False) principal_name = ResourceArgument()
[1/2] ambari git commit: AMBARI-12912. Python Wrapper Can Choose Two Different Python Versions (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 2d9612e9f - bb877b81a refs/heads/trunk 49c052e59 - 85c87bffa AMBARI-12912. Python Wrapper Can Choose Two Different Python Versions (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/85c87bff Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/85c87bff Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/85c87bff Branch: refs/heads/trunk Commit: 85c87bffae1d24d0aeb0170427b8dd775b23f79b Parents: 49c052e Author: Andrew Onishuk aonis...@hortonworks.com Authored: Fri Aug 28 12:28:21 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Fri Aug 28 12:28:21 2015 +0300 -- ambari-common/src/main/unix/ambari-python-wrap | 12 1 file changed, 8 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/85c87bff/ambari-common/src/main/unix/ambari-python-wrap -- diff --git a/ambari-common/src/main/unix/ambari-python-wrap b/ambari-common/src/main/unix/ambari-python-wrap index b9cf3b6..efc073b 100755 --- a/ambari-common/src/main/unix/ambari-python-wrap +++ b/ambari-common/src/main/unix/ambari-python-wrap @@ -22,16 +22,20 @@ export PYTHONPATH=/usr/lib/python2.6/site-packages:/usr/lib/python2.6/site-packa # reset settings unset PYTHON -# checking for preferable python versions -if [ -a /usr/bin/python2.7 ] [ -z $PYTHON ]; then - PYTHON=/usr/bin/python2.7 +# checking for default Python 2 +if [ -a /usr/bin/python2 ] [ -z $PYTHON ]; then + PYTHON=/usr/bin/python2 fi if [ -a /usr/bin/python2.6 ] [ -z $PYTHON ]; then PYTHON=/usr/bin/python2.6 fi -# if no preferable python versions found, try to use system one +if [ -a /usr/bin/python2.7 ] [ -z $PYTHON ]; then + PYTHON=/usr/bin/python2.7 +fi + +# if no preferable python versions found, try to use system one. Hoping it's Python 2 if [[ -z $PYTHON ]]; then PYTHON=/usr/bin/python fi
[2/2] ambari git commit: AMBARI-12912. Python Wrapper Can Choose Two Different Python Versions (aonishuk)
AMBARI-12912. Python Wrapper Can Choose Two Different Python Versions (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bb877b81 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bb877b81 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bb877b81 Branch: refs/heads/branch-2.1 Commit: bb877b81ad7eea4921274eb66c6b973d34dd649a Parents: 2d9612e Author: Andrew Onishuk aonis...@hortonworks.com Authored: Fri Aug 28 12:28:24 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Fri Aug 28 12:28:24 2015 +0300 -- ambari-common/src/main/unix/ambari-python-wrap | 12 1 file changed, 8 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/bb877b81/ambari-common/src/main/unix/ambari-python-wrap -- diff --git a/ambari-common/src/main/unix/ambari-python-wrap b/ambari-common/src/main/unix/ambari-python-wrap index b9cf3b6..efc073b 100755 --- a/ambari-common/src/main/unix/ambari-python-wrap +++ b/ambari-common/src/main/unix/ambari-python-wrap @@ -22,16 +22,20 @@ export PYTHONPATH=/usr/lib/python2.6/site-packages:/usr/lib/python2.6/site-packa # reset settings unset PYTHON -# checking for preferable python versions -if [ -a /usr/bin/python2.7 ] [ -z $PYTHON ]; then - PYTHON=/usr/bin/python2.7 +# checking for default Python 2 +if [ -a /usr/bin/python2 ] [ -z $PYTHON ]; then + PYTHON=/usr/bin/python2 fi if [ -a /usr/bin/python2.6 ] [ -z $PYTHON ]; then PYTHON=/usr/bin/python2.6 fi -# if no preferable python versions found, try to use system one +if [ -a /usr/bin/python2.7 ] [ -z $PYTHON ]; then + PYTHON=/usr/bin/python2.7 +fi + +# if no preferable python versions found, try to use system one. Hoping it's Python 2 if [[ -z $PYTHON ]]; then PYTHON=/usr/bin/python fi
ambari git commit: AMBARI-12871. Ambari startup scripts exhibit long delays (5+ seconds each) on every modifying user operation. This adds a few minutes to the time it takes to start or restart any
Repository: ambari Updated Branches: refs/heads/branch-2.1 8967aa315 - a808ddc71 AMBARI-12871. Ambari startup scripts exhibit long delays (5+ seconds each) on every modifying user operation. This adds a few minutes to the time it takes to start or restart any component, causing excessive downtime for every config change. (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a808ddc7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a808ddc7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a808ddc7 Branch: refs/heads/branch-2.1 Commit: a808ddc71db74c461abdd016d830b7a5aca146f7 Parents: 8967aa3 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Wed Aug 26 12:31:40 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Wed Aug 26 12:31:40 2015 +0300 -- .../before-ANY/scripts/shared_initialization.py | 12 +--- .../2.0.6/hooks/before-ANY/test_before_any.py | 18 -- 2 files changed, 5 insertions(+), 25 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a808ddc7/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py index 4def30f..a22c27c 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py @@ -64,25 +64,23 @@ def setup_users(): import params - if not params.host_sys_prepped: + if not params.host_sys_prepped and not params.ignore_groupsusers_create: for group in params.group_list: Group(group, - ignore_failures = params.ignore_groupsusers_create ) for user in params.user_list: User(user, gid = params.user_to_gid_dict[user], groups = params.user_to_groups_dict[user], - ignore_failures = params.ignore_groupsusers_create ) if params.override_uid == true: set_uid(params.smoke_user, params.smoke_user_dirs) else: - print 'Skipping setting uid for smoke user as host is sys prepped' + Logger.info('Skipping setting uid for smoke user as host is sys prepped') else: -print 'Skipping creation of User and Group as host is sys prepped' +Logger.info('Skipping creation of User and Group as host is sys prepped or ignore_groupsusers_create flag is on') pass @@ -96,7 +94,7 @@ def setup_users(): if not params.host_sys_prepped and params.override_uid == true: set_uid(params.hbase_user, params.hbase_user_dirs) else: - print 'Skipping setting uid for hbase user as host is sys prepped' + Logger.info('Skipping setting uid for hbase user as host is sys prepped') pass if not params.host_sys_prepped: @@ -105,7 +103,7 @@ def setup_users(): if params.has_tez and params.hdp_stack_version != and compare_versions(params.hdp_stack_version, '2.3') = 0: create_tez_am_view_acls() else: -print 'Skipping setting dfs cluster admin and tez view acls as host is sys prepped' +Logger.info('Skipping setting dfs cluster admin and tez view acls as host is sys prepped') def create_dfs_cluster_admins(): http://git-wip-us.apache.org/repos/asf/ambari/blob/a808ddc7/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py index 37a52df..82740fc 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py +++ b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py @@ -50,87 +50,69 @@ class TestHookBeforeInstall(RMFTestCase): content = DownloadSource('http://c6401.ambari.apache.org:8080/resources//UnlimitedJCEPolicyJDK7.zip'), ) self.assertResourceCalled('Group', 'hadoop', -ignore_failures = False, ) self.assertResourceCalled('Group', 'nobody', -ignore_failures = False, ) self.assertResourceCalled('Group', 'users', -ignore_failures = False, ) self.assertResourceCalled('User', 'hive', gid = 'hadoop', -ignore_failures = False, groups = [u'hadoop'], ) self.assertResourceCalled('User', 'oozie', gid = 'hadoop
ambari git commit: AMBARI-12871. Ambari startup scripts exhibit long delays (5+ seconds each) on every modifying user operation. This adds a few minutes to the time it takes to start or restart any
Repository: ambari Updated Branches: refs/heads/trunk fac57e538 - 6ccabc61e AMBARI-12871. Ambari startup scripts exhibit long delays (5+ seconds each) on every modifying user operation. This adds a few minutes to the time it takes to start or restart any component, causing excessive downtime for every config change. (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6ccabc61 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6ccabc61 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6ccabc61 Branch: refs/heads/trunk Commit: 6ccabc61e451347d1b3168d8fe1eb7a98d6bd6b6 Parents: fac57e5 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Wed Aug 26 12:29:18 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Wed Aug 26 12:30:49 2015 +0300 -- .../before-ANY/scripts/shared_initialization.py | 12 +--- .../2.0.6/hooks/before-ANY/test_before_any.py | 18 -- 2 files changed, 5 insertions(+), 25 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6ccabc61/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py index 9c4352a..bd44caf 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py @@ -30,25 +30,23 @@ def setup_users(): import params - if not params.host_sys_prepped: + if not params.host_sys_prepped and not params.ignore_groupsusers_create: for group in params.group_list: Group(group, - ignore_failures = params.ignore_groupsusers_create ) for user in params.user_list: User(user, gid = params.user_to_gid_dict[user], groups = params.user_to_groups_dict[user], - ignore_failures = params.ignore_groupsusers_create ) if params.override_uid == true: set_uid(params.smoke_user, params.smoke_user_dirs) else: - print 'Skipping setting uid for smoke user as host is sys prepped' + Logger.info('Skipping setting uid for smoke user as host is sys prepped') else: -print 'Skipping creation of User and Group as host is sys prepped' +Logger.info('Skipping creation of User and Group as host is sys prepped or ignore_groupsusers_create flag is on') pass @@ -62,7 +60,7 @@ def setup_users(): if not params.host_sys_prepped and params.override_uid == true: set_uid(params.hbase_user, params.hbase_user_dirs) else: - print 'Skipping setting uid for hbase user as host is sys prepped' + Logger.info('Skipping setting uid for hbase user as host is sys prepped') pass if not params.host_sys_prepped: @@ -71,7 +69,7 @@ def setup_users(): if params.has_tez and params.hdp_stack_version != and compare_versions(params.hdp_stack_version, '2.3') = 0: create_tez_am_view_acls() else: -print 'Skipping setting dfs cluster admin and tez view acls as host is sys prepped' +Logger.info('Skipping setting dfs cluster admin and tez view acls as host is sys prepped') def create_dfs_cluster_admins(): http://git-wip-us.apache.org/repos/asf/ambari/blob/6ccabc61/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py index 368eb68..b553a29 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py +++ b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py @@ -48,87 +48,69 @@ class TestHookBeforeInstall(RMFTestCase): ) self.assertResourceCalled('Group', 'hadoop', -ignore_failures = False, ) self.assertResourceCalled('Group', 'nobody', -ignore_failures = False, ) self.assertResourceCalled('Group', 'users', -ignore_failures = False, ) self.assertResourceCalled('User', 'hive', gid = 'hadoop', -ignore_failures = False, groups = [u'hadoop'], ) self.assertResourceCalled('User', 'oozie', gid = 'hadoop', -ignore_failures = False, groups = [u'users'], ) self.assertResourceCalled('User', 'nobody
[2/2] ambari git commit: AMBARI-12870. Installing Ambari-2.1.0 removes /etc/sudoers.d/ambari-agent file (aonishuk)
AMBARI-12870. Installing Ambari-2.1.0 removes /etc/sudoers.d/ambari-agent file (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/90a012b7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/90a012b7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/90a012b7 Branch: refs/heads/branch-2.1 Commit: 90a012b7114335a902b5f2f9b4304d16f4a0b722 Parents: a808ddc Author: Andrew Onishuk aonis...@hortonworks.com Authored: Wed Aug 26 14:11:44 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Wed Aug 26 14:11:44 2015 +0300 -- ambari-agent/src/main/package/deb/control/preinst | 4 ambari-agent/src/main/package/rpm/preinstall.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/90a012b7/ambari-agent/src/main/package/deb/control/preinst -- diff --git a/ambari-agent/src/main/package/deb/control/preinst b/ambari-agent/src/main/package/deb/control/preinst index e9fa78b..7265c55 100644 --- a/ambari-agent/src/main/package/deb/control/preinst +++ b/ambari-agent/src/main/package/deb/control/preinst @@ -31,7 +31,11 @@ fi BAK=/etc/ambari-agent/conf/ambari-agent.ini.old ORIG=/etc/ambari-agent/conf/ambari-agent.ini +BAK_SUDOERS=/etc/sudoers.d/ambari-agent.bak +ORIG_SUDOERS=/etc/sudoers.d/ambari-agent + [ -f $ORIG ] mv -f $ORIG $BAK +[ -f $ORIG_SUDOERS ] echo Moving $ORIG_SUDOERS to $BAK_SUDOERS. Please restore the file if you were using it for ambari-agent non-root functionality mv -f $ORIG_SUDOERS $BAK_SUDOERS if [ -d $STACKS_FOLDER ] then http://git-wip-us.apache.org/repos/asf/ambari/blob/90a012b7/ambari-agent/src/main/package/rpm/preinstall.sh -- diff --git a/ambari-agent/src/main/package/rpm/preinstall.sh b/ambari-agent/src/main/package/rpm/preinstall.sh index e135c18..d7419d3 100644 --- a/ambari-agent/src/main/package/rpm/preinstall.sh +++ b/ambari-agent/src/main/package/rpm/preinstall.sh @@ -31,7 +31,7 @@ BAK_SUDOERS=/etc/sudoers.d/ambari-agent.bak ORIG_SUDOERS=/etc/sudoers.d/ambari-agent [ -f $ORIG ] mv -f $ORIG $BAK -[ -f $ORIG_SUDOERS ] mv -f $ORIG_SUDOERS $BAK_SUDOERS +[ -f $ORIG_SUDOERS ] echo Moving $ORIG_SUDOERS to $BAK_SUDOERS. Please restore the file if you were using it for ambari-agent non-root functionality mv -f $ORIG_SUDOERS $BAK_SUDOERS if [ -d $STACKS_FOLDER ] then
[2/2] ambari git commit: AMBARI-12939. WebHcat server is not starting when added to secure cluster (aonishuk)
AMBARI-12939. WebHcat server is not starting when added to secure cluster (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fba08956 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fba08956 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fba08956 Branch: refs/heads/branch-2.1 Commit: fba0895648547fb0d03000dde4c66806c113a8ff Parents: 31edb90 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Mon Aug 31 20:01:05 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Mon Aug 31 20:01:05 2015 +0300 -- .../common-services/HIVE/0.12.0.2.0/package/scripts/webhcat.py | 3 ++- .../src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py| 5 - 2 files changed, 6 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fba08956/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat.py index fe52c36..e3cb97b 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat.py @@ -61,7 +61,8 @@ def webhcat(): Directory(params.config_dir, recursive=True, owner=params.webhcat_user, -group=params.user_group) +group=params.user_group, +cd_access="a") if params.security_enabled: kinit_if_needed = format("{kinit_path_local} -kt {hdfs_user_keytab} {hdfs_principal_name};") http://git-wip-us.apache.org/repos/asf/ambari/blob/fba08956/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py index d558fcc..469f6a2 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py +++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py @@ -156,6 +156,7 @@ class TestWebHCatServer(RMFTestCase): owner = 'hcat', group = 'hadoop', recursive = True, + cd_access = 'a' ) self.assertResourceCalled('XmlConfig', 'webhcat-site.xml', owner = 'hcat', @@ -197,6 +198,7 @@ class TestWebHCatServer(RMFTestCase): owner = 'hcat', group = 'hadoop', recursive = True, + cd_access = 'a' ) self.assertResourceCalled('Execute', '/usr/bin/kinit -kt /etc/security/keytabs/hdfs.headless.keytab hdfs;', path = ['/bin'], @@ -438,7 +440,8 @@ class TestWebHCatServer(RMFTestCase): self.assertResourceCalled('Directory', '/usr/hdp/current/hive-webhcat/etc/webhcat', owner = 'hcat', group = 'hadoop', - recursive = True) + recursive = True, + cd_access = 'a',) self.assertResourceCalled('XmlConfig', 'webhcat-site.xml', owner = 'hcat',
[1/2] ambari git commit: AMBARI-12939. WebHcat server is not starting when added to secure cluster (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 31edb90b2 -> fba089564 refs/heads/trunk 9a5dc13f0 -> 59bc26139 AMBARI-12939. WebHcat server is not starting when added to secure cluster (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/59bc2613 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/59bc2613 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/59bc2613 Branch: refs/heads/trunk Commit: 59bc26139325ab0d85c4afe9a6d389064a3e8bd5 Parents: 9a5dc13 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Mon Aug 31 20:01:00 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Mon Aug 31 20:01:00 2015 +0300 -- .../common-services/HIVE/0.12.0.2.0/package/scripts/webhcat.py | 3 ++- .../src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py| 5 - 2 files changed, 6 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/59bc2613/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat.py index bfdfbee..48b5cbc 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat.py @@ -61,7 +61,8 @@ def webhcat(): Directory(params.config_dir, recursive=True, owner=params.webhcat_user, -group=params.user_group) +group=params.user_group, +cd_access="a") if params.security_enabled: kinit_if_needed = format("{kinit_path_local} -kt {hdfs_user_keytab} {hdfs_principal_name};") http://git-wip-us.apache.org/repos/asf/ambari/blob/59bc2613/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py index d558fcc..469f6a2 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py +++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py @@ -156,6 +156,7 @@ class TestWebHCatServer(RMFTestCase): owner = 'hcat', group = 'hadoop', recursive = True, + cd_access = 'a' ) self.assertResourceCalled('XmlConfig', 'webhcat-site.xml', owner = 'hcat', @@ -197,6 +198,7 @@ class TestWebHCatServer(RMFTestCase): owner = 'hcat', group = 'hadoop', recursive = True, + cd_access = 'a' ) self.assertResourceCalled('Execute', '/usr/bin/kinit -kt /etc/security/keytabs/hdfs.headless.keytab hdfs;', path = ['/bin'], @@ -438,7 +440,8 @@ class TestWebHCatServer(RMFTestCase): self.assertResourceCalled('Directory', '/usr/hdp/current/hive-webhcat/etc/webhcat', owner = 'hcat', group = 'hadoop', - recursive = True) + recursive = True, + cd_access = 'a',) self.assertResourceCalled('XmlConfig', 'webhcat-site.xml', owner = 'hcat',
[1/2] ambari git commit: AMBARI-12938. Accumulo Install failed on Ubuntu or Debian using non-root and umask 027 (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 2b7583205 -> 5618e3312 refs/heads/trunk fb6ae2c19 -> 0e4d75406 AMBARI-12938. Accumulo Install failed on Ubuntu or Debian using non-root and umask 027 (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0e4d7540 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0e4d7540 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0e4d7540 Branch: refs/heads/trunk Commit: 0e4d7540668e8612403d6a5cbd97621a075e1432 Parents: fb6ae2c Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Mon Aug 31 16:40:23 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Mon Aug 31 16:40:23 2015 +0300 -- .../TestRepositoryResource.py | 18 +++--- .../libraries/providers/repository.py | 62 2 files changed, 47 insertions(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0e4d7540/ambari-agent/src/test/python/resource_management/TestRepositoryResource.py -- diff --git a/ambari-agent/src/test/python/resource_management/TestRepositoryResource.py b/ambari-agent/src/test/python/resource_management/TestRepositoryResource.py index ccc9ae0..b3e2291 100644 --- a/ambari-agent/src/test/python/resource_management/TestRepositoryResource.py +++ b/ambari-agent/src/test/python/resource_management/TestRepositoryResource.py @@ -173,13 +173,15 @@ class TestRepositoryResource(TestCase): self.assertEquals(template_name, '/tmp/1.txt') self.assertEquals(template_content, 'deb http://download.base_url.org/rpm/ a b c') - copy_item = str(file_mock.call_args_list[1]) - self.assertEqual(copy_item, "call('/etc/apt/sources.list.d/HDP.list', content=StaticFile('/tmp/1.txt'))") + copy_item0 = str(file_mock.call_args_list[1]) + copy_item1 = str(file_mock.call_args_list[2]) + self.assertEqual(copy_item0, "call('/tmp/1.txt', content=StaticFile('/etc/apt/sources.list.d/HDP.list'))") + self.assertEqual(copy_item1, "call('/etc/apt/sources.list.d/HDP.list', content=StaticFile('/tmp/1.txt'))") #'apt-get update -qq -o Dir::Etc::sourcelist="sources.list.d/HDP.list" -o APT::Get::List-Cleanup="0"') execute_command_item = execute_mock.call_args_list[0][0][0] self.assertEqual(checked_call_mock.call_args_list[0][0][0], ['apt-get', 'update', '-qq', '-o', 'Dir::Etc::sourcelist=sources.list.d/HDP.list', '-o', 'Dir::Etc::sourceparts=-', '-o', 'APT::Get::List-Cleanup=0']) - self.assertEqual(execute_command_item, 'apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 123ABCD') + self.assertEqual(execute_command_item, ('apt-key', 'adv', '--recv-keys', '--keyserver', 'keyserver.ubuntu.com', '123ABCD')) @patch("resource_management.libraries.providers.repository.checked_call") @patch.object(tempfile, "NamedTemporaryFile") @@ -214,12 +216,14 @@ class TestRepositoryResource(TestCase): self.assertEquals(template_name, '/tmp/1.txt') self.assertEquals(template_content, 'deb http://download.base_url.org/rpm/ a b c') - copy_item = str(file_mock.call_args_list[1]) - self.assertEqual(copy_item, "call('/etc/apt/sources.list.d/HDP.list', content=StaticFile('/tmp/1.txt'))") + copy_item0 = str(file_mock.call_args_list[1]) + copy_item1 = str(file_mock.call_args_list[2]) + self.assertEqual(copy_item0, "call('/tmp/1.txt', content=StaticFile('/etc/apt/sources.list.d/HDP.list'))") + self.assertEqual(copy_item1, "call('/etc/apt/sources.list.d/HDP.list', content=StaticFile('/tmp/1.txt'))") execute_command_item = execute_mock.call_args_list[0][0][0] self.assertEqual(checked_call_mock.call_args_list[0][0][0], ['apt-get', 'update', '-qq', '-o', 'Dir::Etc::sourcelist=sources.list.d/HDP.list', '-o', 'Dir::Etc::sourceparts=-', '-o', 'APT::Get::List-Cleanup=0']) - self.assertEqual(execute_command_item, 'apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 123ABCD') + self.assertEqual(execute_command_item, ('apt-key', 'adv', '--recv-keys', '--keyserver', 'keyserver.ubuntu.com', '123ABCD')) @patch.object(tempfile, "NamedTemporaryFile") @patch("resource_management.libraries.providers.repository.Execute") @@ -248,7 +252,7 @@ class TestRepositoryResource(TestCase): self.assertEquals(template_name, '/tmp/1.txt') self.assertEquals(template_content, 'deb http://download.base_url.org/rpm/ a b c') - self.assertEqual(file_mock.call_count, 1) + self.assertEqual(file_mock.call_count, 2) self
ambari git commit: AMBARI-12956. Host Checks: should not warn on nagios, ganglia or puppet packages (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 9eb04ae6f -> df1d64fae AMBARI-12956. Host Checks: should not warn on nagios, ganglia or puppet packages (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/df1d64fa Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/df1d64fa Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/df1d64fa Branch: refs/heads/branch-2.1 Commit: df1d64fae1cbcc337fee2e7dae1820a7843603b4 Parents: 9eb04ae Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Sep 1 15:14:18 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Sep 1 15:14:18 2015 +0300 -- ambari-agent/src/main/python/ambari_agent/HostInfo.py | 2 +- .../src/main/resources/custom_actions/scripts/check_host.py | 7 --- 2 files changed, 5 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/df1d64fa/ambari-agent/src/main/python/ambari_agent/HostInfo.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/HostInfo.py b/ambari-agent/src/main/python/ambari_agent/HostInfo.py index 385c758..b979242 100644 --- a/ambari-agent/src/main/python/ambari_agent/HostInfo.py +++ b/ambari-agent/src/main/python/ambari_agent/HostInfo.py @@ -143,7 +143,7 @@ class HostInfoLinux(HostInfo): # Set of default users (need to be replaced with the configured user names) DEFAULT_USERS = [ "hive", "ambari-qa", "oozie", "hbase", "hcat", "mapred", -"hdfs", "rrdcached", "zookeeper", "flume", "sqoop", "sqoop2", +"hdfs", "zookeeper", "flume", "sqoop", "sqoop2", "hue", "yarn", "tez", "storm", "falcon", "kafka", "knox" ] http://git-wip-us.apache.org/repos/asf/ambari/blob/df1d64fa/ambari-server/src/main/resources/custom_actions/scripts/check_host.py -- diff --git a/ambari-server/src/main/resources/custom_actions/scripts/check_host.py b/ambari-server/src/main/resources/custom_actions/scripts/check_host.py index 08a391e..1e54180 100644 --- a/ambari-server/src/main/resources/custom_actions/scripts/check_host.py +++ b/ambari-server/src/main/resources/custom_actions/scripts/check_host.py @@ -85,14 +85,15 @@ class CheckHost(Script): ] - # ignore required packages + # ignore packages that start with below prefixes: IGNORE_PACKAGES = [ -"epel-release" +"epel-release", "nagios", +# ganglia related: +"ganglia", "libganglia", "libconfuse", "perl", "rrdtool", "python-rrdtool", "gmetad", "librrd", "rrdcached" ] # Additional packages to look for (search packages that start with these) ADDITIONAL_PACKAGES = [ -"rrdtool", "rrdtool-python", "ganglia", "gmond", "gweb", "libconfuse", "ambari-log4j", "hadoop", "zookeeper", "oozie", "webhcat" ]
ambari git commit: AMBARI-12956. Host Checks: should not warn on nagios, ganglia or puppet packages (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk 4eb219b8a -> e6fb3934b AMBARI-12956. Host Checks: should not warn on nagios, ganglia or puppet packages (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e6fb3934 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e6fb3934 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e6fb3934 Branch: refs/heads/trunk Commit: e6fb3934badaad9d3e93efbdff2bd77d0b025c1b Parents: 4eb219b Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Sep 1 15:13:05 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Sep 1 15:13:05 2015 +0300 -- ambari-agent/src/main/python/ambari_agent/HostInfo.py | 2 +- .../src/main/resources/custom_actions/scripts/check_host.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e6fb3934/ambari-agent/src/main/python/ambari_agent/HostInfo.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/HostInfo.py b/ambari-agent/src/main/python/ambari_agent/HostInfo.py index b87b599..3d7125a 100644 --- a/ambari-agent/src/main/python/ambari_agent/HostInfo.py +++ b/ambari-agent/src/main/python/ambari_agent/HostInfo.py @@ -143,7 +143,7 @@ class HostInfoLinux(HostInfo): # Set of default users (need to be replaced with the configured user names) DEFAULT_USERS = [ "hive", "ambari-qa", "oozie", "hbase", "hcat", "mapred", -"hdfs", "rrdcached", "zookeeper", "flume", "sqoop", "sqoop2", +"hdfs", "zookeeper", "flume", "sqoop", "sqoop2", "hue", "yarn", "tez", "storm", "falcon", "kafka", "knox", "ams", "hadoop", "spark", "accumulo", "atlas", "mahout", "ranger", "kms" ] http://git-wip-us.apache.org/repos/asf/ambari/blob/e6fb3934/ambari-server/src/main/resources/custom_actions/scripts/check_host.py -- diff --git a/ambari-server/src/main/resources/custom_actions/scripts/check_host.py b/ambari-server/src/main/resources/custom_actions/scripts/check_host.py index c235c87..a1c93b1 100644 --- a/ambari-server/src/main/resources/custom_actions/scripts/check_host.py +++ b/ambari-server/src/main/resources/custom_actions/scripts/check_host.py @@ -89,12 +89,13 @@ class CheckHost(Script): # ignore required packages IGNORE_PACKAGES = [ -"epel-release", "ambari-server", "ambari-agent" +"epel-release", "ambari-server", "ambari-agent", "nagios", +# ganglia related: +"ganglia", "libganglia", "libconfuse", "perl", "rrdtool", "python-rrdtool", "gmetad", "librrd", "rrdcached" ] # Additional packages to look for (search packages that start with these) ADDITIONAL_PACKAGES = [ -"rrdtool", "rrdtool-python", "ganglia", "gmond", "gweb", "libconfuse", "ambari-log4j" ]
ambari git commit: AMBARI-12979. Devdeploy:Start Services fails at enabling security (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 3e9e182d6 -> 189beebd3 AMBARI-12979. Devdeploy:Start Services fails at enabling security (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/189beebd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/189beebd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/189beebd Branch: refs/heads/branch-2.1 Commit: 189beebd34476f392c39a7e02e7df40c0f46ab6e Parents: 3e9e182 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Wed Sep 2 18:52:55 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Wed Sep 2 18:52:55 2015 +0300 -- .../0.5.0.2.2/package/scripts/params_linux.py | 12 .../python/stacks/2.2/KNOX/test_knox_gateway.py | 20 ++-- 2 files changed, 18 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/189beebd/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py index 5917cda..27a71a2 100644 --- a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py @@ -40,6 +40,10 @@ knox_master_secret_path = '/var/lib/knox/data/security/master' knox_cert_store_path = '/var/lib/knox/data/security/keystores/gateway.jks' knox_user = default("/configurations/knox-env/knox_user", "knox") +# server configurations +knox_data_dir = '/var/lib/knox/data' +knox_logs_dir = '/var/log/knox' + # default parameters knox_bin = '/usr/bin/gateway' knox_conf_dir = '/etc/knox/conf' @@ -53,13 +57,13 @@ if Script.is_hdp_stack_greater_or_equal("2.2"): ldap_bin = '/usr/hdp/current/knox-server/bin/ldap.sh' knox_client_bin = '/usr/hdp/current/knox-server/bin/knoxcli.sh' + knox_master_secret_path = '/usr/hdp/current/knox-server/data/security/master' + knox_cert_store_path = '/usr/hdp/current/knox-server/data/security/keystores/gateway.jks' + knox_data_dir = '/usr/hdp/current/knox-server/data' + knox_group = default("/configurations/knox-env/knox_group", "knox") mode = 0644 -# server configurations -knox_data_dir = '/var/lib/knox/data' -knox_logs_dir = '/var/log/knox' - stack_version_unformatted = str(config['hostLevelParams']['stack_version']) hdp_stack_version = format_hdp_stack_version(stack_version_unformatted) http://git-wip-us.apache.org/repos/asf/ambari/blob/189beebd/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py -- diff --git a/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py b/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py index 11f476e..2acd4053 100644 --- a/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py +++ b/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py @@ -39,7 +39,7 @@ class TestKnoxGateway(RMFTestCase): target = RMFTestCase.TARGET_COMMON_SERVICES ) -self.assertResourceCalled('Directory', '/var/lib/knox/data', +self.assertResourceCalled('Directory', '/usr/hdp/current/knox-server/data', owner = 'knox', group = 'knox', recursive = True @@ -87,7 +87,7 @@ class TestKnoxGateway(RMFTestCase): self.assertResourceCalled('Execute', ('chown', '-R', 'knox:knox', - '/var/lib/knox/data', + '/usr/hdp/current/knox-server/data', '/var/log/knox', '/var/run/knox', '/usr/hdp/current/knox-server/conf', @@ -96,12 +96,12 @@ class TestKnoxGateway(RMFTestCase): ) self.assertResourceCalled('Execute', '/usr/hdp/current/knox-server/bin/knoxcli.sh create-master --master sa', environment = {'JAVA_HOME': u'/usr/jdk64/jdk1.7.0_45'}, -not_if = "ambari-sudo.sh su knox -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]test -f /var/lib/knox/data/security/master'", +not_if = "ambari-sudo.sh su knox -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]test -f /usr/hdp/current/knox-server/data/security/master'", user = 'knox', ) self.assertResourceCalled('Execute', '/usr/hdp/current/knox-server/bin/knoxcli.sh create-cert --hostname c6401.ambari.apache.org', environment = {'JAVA_HOME': u'/usr/jdk64/jdk1.7.0_45'}, -not_if