AMBARI-18446. Review necessity of xmllint and remove libxml2-utils package from Oozie manifest (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7c13b393 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7c13b393 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7c13b393 Branch: refs/heads/branch-2.5 Commit: 7c13b3939011b9a760f5f804a20cdaac3f28383b Parents: 003d455 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Thu Sep 22 17:43:12 2016 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Thu Sep 22 17:43:12 2016 +0300 ---------------------------------------------------------------------- .../common-services/OOZIE/4.0.0.2.0/metainfo.xml | 3 --- .../OOZIE/4.0.0.2.0/package/files/oozieSmoke2.sh | 5 ----- .../4.0.0.2.0/package/scripts/service_check.py | 13 ------------- .../common-services/OOZIE/4.2.0.2.3/metainfo.xml | 3 --- .../stacks/HDP/2.1/services/OOZIE/metainfo.xml | 3 --- .../stacks/HDP/2.2/services/OOZIE/metainfo.xml | 3 --- .../stacks/2.0.6/OOZIE/test_oozie_service_check.py | 8 -------- .../python/stacks/2.0.6/OOZIE/test_service_check.py | 16 ---------------- 8 files changed, 54 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/7c13b393/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml index 58d2581..66d272a 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/metainfo.xml @@ -142,9 +142,6 @@ <package> <name>extjs</name> </package> - <package> - <name>libxml2-utils</name> - </package> </packages> </osSpecific> http://git-wip-us.apache.org/repos/asf/ambari/blob/7c13b393/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/files/oozieSmoke2.sh ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/files/oozieSmoke2.sh b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/files/oozieSmoke2.sh index df86eef..71a0c85 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/files/oozieSmoke2.sh +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/files/oozieSmoke2.sh @@ -34,11 +34,6 @@ export smoke_user_keytab=${11} export kinit_path_local=${12} export smokeuser_principal=${13} -function getValueFromField { - xmllint $1 | grep "<name>$2</name>" -C 2 | grep '<value>' | cut -d ">" -f2 | cut -d "<" -f1 - return $? -} - function checkOozieJobStatus { local job_id=$1 local num_of_tries=$2 http://git-wip-us.apache.org/repos/asf/ambari/blob/7c13b393/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/service_check.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/service_check.py index 49fc129..3710117 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/service_check.py @@ -26,8 +26,6 @@ from resource_management.core.source import StaticFile from resource_management.core.system import System from resource_management.libraries.functions import format from resource_management.libraries.script import Script -from resource_management.libraries.resources.xml_config import XmlConfig -from resource_management.core.exceptions import Fail from ambari_commons.os_family_impl import OsFamilyImpl from ambari_commons import OSConst @@ -47,17 +45,6 @@ class OozieServiceCheckDefault(OozieServiceCheck): prepare_hdfs_file_name = 'prepareOozieHdfsDirectories.sh' smoke_test_file_name = 'oozieSmoke2.sh' - if 'yarn-site' in params.config['configurations']: - XmlConfig("yarn-site.xml", - conf_dir=params.hadoop_conf_dir, - configurations=params.config['configurations']['yarn-site'], - owner=params.hdfs_user, - group=params.user_group, - mode=0644 - ) - else: - raise Fail("yarn-site.xml was not present in config parameters.") - OozieServiceCheckDefault.oozie_smoke_shell_file(smoke_test_file_name, prepare_hdfs_file_name) @staticmethod http://git-wip-us.apache.org/repos/asf/ambari/blob/7c13b393/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml b/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml index f9b0f0b..96ac9ce 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.2.0.2.3/metainfo.xml @@ -155,9 +155,6 @@ <package> <name>extjs</name> </package> - <package> - <name>libxml2-utils</name> - </package> </packages> </osSpecific> </osSpecifics> http://git-wip-us.apache.org/repos/asf/ambari/blob/7c13b393/ambari-server/src/main/resources/stacks/HDP/2.1/services/OOZIE/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/OOZIE/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.1/services/OOZIE/metainfo.xml index 997c865..eab7ae0 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.1/services/OOZIE/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/OOZIE/metainfo.xml @@ -56,9 +56,6 @@ <package> <name>extjs</name> </package> - <package> - <name>libxml2-utils</name> - </package> </packages> </osSpecific> http://git-wip-us.apache.org/repos/asf/ambari/blob/7c13b393/ambari-server/src/main/resources/stacks/HDP/2.2/services/OOZIE/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/OOZIE/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/OOZIE/metainfo.xml index 8de041a..cb84a5d 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/OOZIE/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/OOZIE/metainfo.xml @@ -97,9 +97,6 @@ <package> <name>extjs</name> </package> - <package> - <name>libxml2-utils</name> - </package> </packages> </osSpecific> </osSpecifics> http://git-wip-us.apache.org/repos/asf/ambari/blob/7c13b393/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_service_check.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_service_check.py b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_service_check.py index 22d7d63..c3b4ce6 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_service_check.py +++ b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_service_check.py @@ -53,14 +53,6 @@ class TestOozieServiceCheck(RMFTestCase): self.maxDiff = None - self.assertResourceCalled('XmlConfig', - "yarn-site.xml", - owner = "hdfs", - group = "hadoop", - mode = 0644, - conf_dir="/usr/hdp/current/hadoop-client/conf", - configurations = json_content['configurations']['yarn-site']) - self.assertResourceCalled('File', "/tmp/oozieSmoke2.sh", content = StaticFile("oozieSmoke2.sh"), http://git-wip-us.apache.org/repos/asf/ambari/blob/7c13b393/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_service_check.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_service_check.py b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_service_check.py index c96faff..2626578 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_service_check.py +++ b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_service_check.py @@ -37,14 +37,6 @@ class TestServiceCheck(RMFTestCase): target = RMFTestCase.TARGET_COMMON_SERVICES ) - self.assertResourceCalled('XmlConfig', 'yarn-site.xml', - owner = 'hdfs', - group = 'hadoop', - conf_dir = '/etc/hadoop/conf', - mode = 0644, - configurations = self.getConfig()['configurations']['yarn-site'], - ) - self.assert_service_check() self.assertNoMoreResources() @@ -58,14 +50,6 @@ class TestServiceCheck(RMFTestCase): target = RMFTestCase.TARGET_COMMON_SERVICES ) - self.assertResourceCalled('XmlConfig', 'yarn-site.xml', - owner = 'hdfs', - group = 'hadoop', - conf_dir = '/etc/hadoop/conf', - mode = 0644, - configurations = self.getConfig()['configurations']['yarn-site'], - ) - self.assert_service_check() self.assertNoMoreResources()