Repository: ambari
Updated Branches:
  refs/heads/trunk 8a64be420 -> 918fd597b


AMBARI-19677 - Storm service check failed after HOU to HDP-2.5.3 due to CNF for 
StormAtlasHook (jonathanhurley)


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

Branch: refs/heads/trunk
Commit: 918fd597bc19958ed16f45b8bfce63debd325fd4
Parents: 8a64be4
Author: Jonathan Hurley <jhur...@hortonworks.com>
Authored: Mon Jan 23 09:54:15 2017 -0500
Committer: Jonathan Hurley <jhur...@hortonworks.com>
Committed: Mon Jan 23 11:39:53 2017 -0500

----------------------------------------------------------------------
 .../libraries/functions/setup_atlas_hook.py     | 14 ++++++-
 .../ATLAS/0.1.0.2.3/package/scripts/params.py   |  2 +-
 .../0.1.0.2.3/package/scripts/status_params.py  |  3 +-
 .../FALCON/0.5.0.2.1/package/scripts/falcon.py  |  6 +--
 .../0.5.0.2.1/package/scripts/params_linux.py   |  4 +-
 .../STORM/0.9.1/package/scripts/params_linux.py |  2 +-
 .../stacks/2.3/ATLAS/test_metadata_server.py    | 40 ++++++++++----------
 .../stacks/2.5/ATLAS/test_atlas_server.py       | 16 ++++----
 8 files changed, 47 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/918fd597/ambari-common/src/main/python/resource_management/libraries/functions/setup_atlas_hook.py
----------------------------------------------------------------------
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/setup_atlas_hook.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/setup_atlas_hook.py
index eeae4bc..367afc8 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/setup_atlas_hook.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/setup_atlas_hook.py
@@ -24,9 +24,11 @@ __all__ = ["has_atlas_in_cluster", "setup_atlas_hook", 
"setup_atlas_jar_symlinks
 import os
 
 # Local Imports
+from resource_management.libraries.functions import stack_features
 from resource_management.libraries.resources.properties_file import 
PropertiesFile
 from resource_management.libraries.functions.format import format
 from resource_management.libraries.functions.default import default
+from resource_management.libraries.script import Script
 from resource_management.core.resources.system import Link
 from resource_management.core.resources.packaging import Package
 from resource_management.core.logger import Logger
@@ -159,11 +161,19 @@ def setup_atlas_jar_symlinks(hook_name, jar_source_dir):
   """
   import params
 
-  atlas_home_dir = os.environ['METADATA_HOME_DIR'] if 'METADATA_HOME_DIR' in 
os.environ \
-    else format("{stack_root}/current/atlas-server")
+  stack_root = Script.get_stack_root()
+  atlas_home_dir = os.path.join(stack_root, "current", "atlas-server")
+
+  # if this is an upgrade/downagrade, then we must link in the correct version
+  # which may not be "current", so change the home directory location
+  upgrade_type = 
Script.get_upgrade_type(default("/commandParams/upgrade_type", ""))
+  if upgrade_type is not None:
+    version_dir_segment = 
stack_features.get_stack_feature_version(Script.get_config())
+    atlas_home_dir = os.path.join(stack_root, version_dir_segment, "atlas")
 
   # Will only exist if this host contains Atlas Server
   atlas_hook_dir = os.path.join(atlas_home_dir, "hook", hook_name)
+
   if os.path.exists(atlas_hook_dir):
     Logger.info("Atlas Server is present on this host, will symlink jars 
inside of %s to %s if not already done." %
                 (jar_source_dir, atlas_hook_dir))

http://git-wip-us.apache.org/repos/asf/ambari/blob/918fd597/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
index c74d046..afd6dde 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
@@ -94,7 +94,7 @@ version = default("/commandParams/version", None)
 stack_version_unformatted = config['hostLevelParams']['stack_version']
 stack_version_formatted = format_stack_version(stack_version_unformatted)
 
-metadata_home = os.environ['METADATA_HOME_DIR'] if 'METADATA_HOME_DIR' in 
os.environ else format('{stack_root}/current/atlas-server')
+metadata_home = format('{stack_root}/current/atlas-server')
 metadata_bin = format("{metadata_home}/bin")
 
 python_binary = os.environ['PYTHON_EXE'] if 'PYTHON_EXE' in os.environ else 
sys.executable

http://git-wip-us.apache.org/repos/asf/ambari/blob/918fd597/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/status_params.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/status_params.py
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/status_params.py
index 1fd1b9b..852a9cb 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/status_params.py
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/status_params.py
@@ -30,6 +30,7 @@ from resource_management.libraries.functions import 
StackFeature
 
 
 config = Script.get_config()
+stack_root = Script.get_stack_root()
 
 default_conf_file = "application.properties"
 
@@ -40,7 +41,7 @@ if check_stack_feature(StackFeature.ATLAS_UPGRADE_SUPPORT, 
version_for_stack_fea
   default_conf_file = "atlas-application.properties"
 
 conf_file = default("/configurations/atlas-env/metadata_conf_file", 
default_conf_file)
-conf_dir = os.environ['METADATA_CONF'] if 'METADATA_CONF' in os.environ else 
'/etc/atlas/conf'
+conf_dir = format("{stack_root}/current/atlas-server/conf")
 pid_dir = default("/configurations/atlas-env/metadata_pid_dir", 
"/var/run/atlas")
 pid_file = format("{pid_dir}/atlas.pid")
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/918fd597/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py
 
b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py
index 70caaea..c9c66ac 100644
--- 
a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py
+++ 
b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py
@@ -23,24 +23,20 @@ import traceback
 # Local Imports
 from resource_management.core.environment import Environment
 from resource_management.core.source import InlineTemplate
-from resource_management.core.source import Template
 from resource_management.core.source import  DownloadSource
 from resource_management.core.resources import Execute
 from resource_management.core.resources.service import Service
 from resource_management.core.resources.service import ServiceConfig
 from resource_management.core.resources.system import Directory
 from resource_management.core.resources.system import File
-from resource_management.libraries.functions import get_user_call_output
 from resource_management.libraries.script import Script
 from resource_management.libraries.resources import PropertiesFile
 from resource_management.libraries.functions import format
 from resource_management.libraries.functions.show_logs import show_logs
 from resource_management.libraries.functions import get_user_call_output
-from resource_management.libraries.functions.setup_atlas_hook import 
has_atlas_in_cluster, setup_atlas_hook, install_atlas_hook_packages, 
setup_atlas_jar_symlinks
-from resource_management.libraries.functions.stack_features import 
check_stack_feature
 from resource_management.libraries.functions.version import 
format_stack_version
 from resource_management.libraries.functions import StackFeature
-from resource_management.libraries.functions.setup_atlas_hook import 
has_atlas_in_cluster, setup_atlas_hook, install_atlas_hook_packages, 
setup_atlas_jar_symlinks
+from resource_management.libraries.functions.setup_atlas_hook import 
setup_atlas_hook, install_atlas_hook_packages, setup_atlas_jar_symlinks
 from resource_management.libraries.functions.stack_features import 
check_stack_feature
 from ambari_commons.constants import SERVICE
 from resource_management.core.logger import Logger

http://git-wip-us.apache.org/repos/asf/ambari/blob/918fd597/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py
index d667d9f..3773918 100644
--- 
a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py
@@ -161,8 +161,8 @@ if enable_atlas_hook:
       or check_stack_feature(StackFeature.FALCON_ATLAS_SUPPORT, 
stack_version_formatted)
 
   if check_stack_feature(StackFeature.ATLAS_CONF_DIR_IN_PATH, 
stack_version_formatted):
-    atlas_conf_dir = os.environ['METADATA_CONF'] if 'METADATA_CONF' in 
os.environ else format('{stack_root}/current/atlas-server/conf')
-    atlas_home_dir = os.environ['METADATA_HOME_DIR'] if 'METADATA_HOME_DIR' in 
os.environ else format('{stack_root}/current/atlas-server')
+    atlas_conf_dir = format('{stack_root}/current/atlas-server/conf')
+    atlas_home_dir = format('{stack_root}/current/atlas-server')
     atlas_hook_cp = atlas_conf_dir + os.pathsep + os.path.join(atlas_home_dir, 
"hook", "falcon", "*") + os.pathsep
   elif check_stack_feature(StackFeature.ATLAS_UPGRADE_SUPPORT, 
stack_version_formatted):
     atlas_hook_cp = format('{stack_root}/current/atlas-client/hook/falcon/*') 
+ os.pathsep

http://git-wip-us.apache.org/repos/asf/ambari/blob/918fd597/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_linux.py
index 137f29a..a176456 100644
--- 
a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_linux.py
@@ -222,7 +222,7 @@ atlas_hook_filename = 
default('/configurations/atlas-env/metadata_conf_file', 'a
 if enable_atlas_hook:
   # Only append /etc/atlas/conf to classpath if on HDP 2.4.*
   if check_stack_feature(StackFeature.ATLAS_CONF_DIR_IN_PATH, 
stack_version_formatted):
-    atlas_conf_dir = os.environ['METADATA_CONF'] if 'METADATA_CONF' in 
os.environ else '/etc/atlas/conf'
+    atlas_conf_dir = format('{stack_root}/current/atlas-server/conf')
     jar_jvm_opts += '-Datlas.conf=' + atlas_conf_dir
 #endregion
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/918fd597/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py 
b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
index e97759b..8ae6469 100644
--- a/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
+++ b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
@@ -32,7 +32,7 @@ class TestMetadataServer(RMFTestCase):
 
   def configureResourcesCalled(self):
       # Both server and client
-      self.assertResourceCalled('Directory', '/etc/atlas/conf',
+      self.assertResourceCalled('Directory', 
'/usr/hdp/current/atlas-server/conf',
                                 owner='atlas',
                                 group='hadoop',
                                 create_parents = True,
@@ -48,7 +48,7 @@ class TestMetadataServer(RMFTestCase):
                                 cd_access='a',
                                 mode=0755
       )
-      self.assertResourceCalled('Directory', '/etc/atlas/conf/solr',
+      self.assertResourceCalled('Directory', 
'/usr/hdp/current/atlas-server/conf/solr',
                                 owner='atlas',
                                 group='hadoop',
                                 create_parents = True,
@@ -94,7 +94,7 @@ class TestMetadataServer(RMFTestCase):
       app_props["atlas.server.address.id1"] = u"%s:%s" % (host_name, 
metadata_port)
       app_props["atlas.server.ha.enabled"] = "false"
 
-      self.assertResourceCalled('File', '/etc/atlas/conf/atlas-log4j.xml',
+      self.assertResourceCalled('File', 
'/usr/hdp/current/atlas-server/conf/atlas-log4j.xml',
                           content=InlineTemplate(
                             self.getConfig()['configurations'][
                               'atlas-log4j']['content']),
@@ -102,7 +102,7 @@ class TestMetadataServer(RMFTestCase):
                           group='hadoop',
                           mode=0644,
       )
-      self.assertResourceCalled('File', '/etc/atlas/conf/atlas-env.sh',
+      self.assertResourceCalled('File', 
'/usr/hdp/current/atlas-server/conf/atlas-env.sh',
                                 content=InlineTemplate(
                                     self.getConfig()['configurations'][
                                         'atlas-env']['content']),
@@ -110,7 +110,7 @@ class TestMetadataServer(RMFTestCase):
                                 group='hadoop',
                                 mode=0755,
       )
-      self.assertResourceCalled('File', '/etc/atlas/conf/solr/solrconfig.xml',
+      self.assertResourceCalled('File', 
'/usr/hdp/current/atlas-server/conf/solr/solrconfig.xml',
                                 content=InlineTemplate(
                                     self.getConfig()['configurations'][
                                       'atlas-solrconfig']['content']),
@@ -120,7 +120,7 @@ class TestMetadataServer(RMFTestCase):
       )
       # application.properties file
       self.assertResourceCalled('PropertiesFile',
-                                '/etc/atlas/conf/application.properties',
+                                
'/usr/hdp/current/atlas-server/conf/application.properties',
                                 properties=app_props,
                                 owner=u'atlas',
                                 group=u'hadoop',
@@ -156,7 +156,7 @@ class TestMetadataServer(RMFTestCase):
                                       only_if='test -d 
/tmp/solr_config_atlas_configs_0.[0-9]*')
       self.assertResourceCalledRegexp('^Execute$', '^ambari-sudo.sh 
JAVA_HOME=/usr/jdk64/jdk1.7.0_45 
/usr/lib/ambari-infra-solr-client/solrCloudCli.sh --zookeeper-connect-string 
c6401.ambari.apache.org:2181/infra-solr --upload-config --config-dir 
/tmp/solr_config_atlas_configs_0.[0-9]* --config-set atlas_configs --retry 30 
--interval 5',
                                       only_if='test -d 
/tmp/solr_config_atlas_configs_0.[0-9]*')
-      self.assertResourceCalledRegexp('^Execute$', '^ambari-sudo.sh 
JAVA_HOME=/usr/jdk64/jdk1.7.0_45 
/usr/lib/ambari-infra-solr-client/solrCloudCli.sh --zookeeper-connect-string 
c6401.ambari.apache.org:2181/infra-solr --upload-config --config-dir 
/etc/atlas/conf/solr --config-set atlas_configs --retry 30 --interval 5',
+      self.assertResourceCalledRegexp('^Execute$', '^ambari-sudo.sh 
JAVA_HOME=/usr/jdk64/jdk1.7.0_45 
/usr/lib/ambari-infra-solr-client/solrCloudCli.sh --zookeeper-connect-string 
c6401.ambari.apache.org:2181/infra-solr --upload-config --config-dir 
/usr/hdp/current/atlas-server/conf/solr --config-set atlas_configs --retry 30 
--interval 5',
                                       not_if='test -d 
/tmp/solr_config_atlas_configs_0.[0-9]*')
       self.assertResourceCalledRegexp('^Directory$', 
'^/tmp/solr_config_atlas_configs_0.[0-9]*',
                                       action=['delete'],
@@ -168,7 +168,7 @@ class TestMetadataServer(RMFTestCase):
 
   def configureResourcesCalledSecure(self):
     # Both server and client
-    self.assertResourceCalled('Directory', '/etc/atlas/conf',
+    self.assertResourceCalled('Directory', 
'/usr/hdp/current/atlas-server/conf',
                               owner='atlas',
                               group='hadoop',
                               create_parents = True,
@@ -184,7 +184,7 @@ class TestMetadataServer(RMFTestCase):
                               cd_access='a',
                               mode=0755
     )
-    self.assertResourceCalled('Directory', '/etc/atlas/conf/solr',
+    self.assertResourceCalled('Directory', 
'/usr/hdp/current/atlas-server/conf/solr',
                               owner='atlas',
                               group='hadoop',
                               create_parents = True,
@@ -230,7 +230,7 @@ class TestMetadataServer(RMFTestCase):
     app_props["atlas.server.address.id1"] = u"%s:%s" % (host_name, 
metadata_port)
     app_props["atlas.server.ha.enabled"] = "false"
 
-    self.assertResourceCalled('File', '/etc/atlas/conf/atlas-log4j.xml',
+    self.assertResourceCalled('File', 
'/usr/hdp/current/atlas-server/conf/atlas-log4j.xml',
                               content=InlineTemplate(
                                 self.getConfig()['configurations'][
                                   'atlas-log4j']['content']),
@@ -238,7 +238,7 @@ class TestMetadataServer(RMFTestCase):
                               group='hadoop',
                               mode=0644,
                               )
-    self.assertResourceCalled('File', '/etc/atlas/conf/atlas-env.sh',
+    self.assertResourceCalled('File', 
'/usr/hdp/current/atlas-server/conf/atlas-env.sh',
                               content=InlineTemplate(
                                 self.getConfig()['configurations'][
                                   'atlas-env']['content']),
@@ -246,7 +246,7 @@ class TestMetadataServer(RMFTestCase):
                               group='hadoop',
                               mode=0755,
                               )
-    self.assertResourceCalled('File', '/etc/atlas/conf/solr/solrconfig.xml',
+    self.assertResourceCalled('File', 
'/usr/hdp/current/atlas-server/conf/solr/solrconfig.xml',
                               content=InlineTemplate(
                                 self.getConfig()['configurations'][
                                   'atlas-solrconfig']['content']),
@@ -256,14 +256,14 @@ class TestMetadataServer(RMFTestCase):
                               )
     # application.properties file
     self.assertResourceCalled('PropertiesFile',
-                              '/etc/atlas/conf/application.properties',
+                              
'/usr/hdp/current/atlas-server/conf/application.properties',
                               properties=app_props,
                               owner=u'atlas',
                               group=u'hadoop',
                               mode=0644,
                               )
 
-    self.assertResourceCalled('TemplateConfig', 
'/etc/atlas/conf/atlas_jaas.conf',
+    self.assertResourceCalled('TemplateConfig', 
'/usr/hdp/current/atlas-server/conf/atlas_jaas.conf',
                               owner = 'atlas',
                               )
 
@@ -298,7 +298,7 @@ class TestMetadataServer(RMFTestCase):
                                     only_if='test -d 
/tmp/solr_config_atlas_configs_0.[0-9]*')
     self.assertResourceCalledRegexp('^Execute$', '^ambari-sudo.sh 
JAVA_HOME=/usr/jdk64/jdk1.7.0_45 
/usr/lib/ambari-infra-solr-client/solrCloudCli.sh --zookeeper-connect-string 
c6401.ambari.apache.org:2181/infra-solr --upload-config --config-dir 
/tmp/solr_config_atlas_configs_0.[0-9]* --config-set atlas_configs --retry 30 
--interval 5',
                                     only_if='test -d 
/tmp/solr_config_atlas_configs_0.[0-9]*')
-    self.assertResourceCalledRegexp('^Execute$', '^ambari-sudo.sh 
JAVA_HOME=/usr/jdk64/jdk1.7.0_45 
/usr/lib/ambari-infra-solr-client/solrCloudCli.sh --zookeeper-connect-string 
c6401.ambari.apache.org:2181/infra-solr --upload-config --config-dir 
/etc/atlas/conf/solr --config-set atlas_configs --retry 30 --interval 5',
+    self.assertResourceCalledRegexp('^Execute$', '^ambari-sudo.sh 
JAVA_HOME=/usr/jdk64/jdk1.7.0_45 
/usr/lib/ambari-infra-solr-client/solrCloudCli.sh --zookeeper-connect-string 
c6401.ambari.apache.org:2181/infra-solr --upload-config --config-dir 
/usr/hdp/current/atlas-server/conf/solr --config-set atlas_configs --retry 30 
--interval 5',
                                     not_if='test -d 
/tmp/solr_config_atlas_configs_0.[0-9]*')
     self.assertResourceCalledRegexp('^Directory$', 
'^/tmp/solr_config_atlas_configs_0.[0-9]*',
                                     action=['delete'],
@@ -324,7 +324,7 @@ class TestMetadataServer(RMFTestCase):
                               group = "hadoop",
                               content=Template("atlas_hbase_setup.rb.j2"))
 
-    self.assertResourceCalled('File', '/etc/atlas/conf/hdfs-site.xml',action = 
['delete'],)
+    self.assertResourceCalled('File', 
'/usr/hdp/current/atlas-server/conf/hdfs-site.xml',action = ['delete'],)
 
     self.assertNoMoreResources()
 
@@ -344,7 +344,7 @@ class TestMetadataServer(RMFTestCase):
                               group = "hadoop",
                               content=Template("atlas_hbase_setup.rb.j2"))
 
-    self.assertResourceCalled('File', '/etc/atlas/conf/hdfs-site.xml',action = 
['delete'],)
+    self.assertResourceCalled('File', 
'/usr/hdp/current/atlas-server/conf/hdfs-site.xml',action = ['delete'],)
 
 
     self.assertNoMoreResources()
@@ -364,10 +364,10 @@ class TestMetadataServer(RMFTestCase):
                               group = "hadoop",
                               content=Template("atlas_hbase_setup.rb.j2"))
 
-    self.assertResourceCalled('File', '/etc/atlas/conf/hdfs-site.xml',action = 
['delete'],)
+    self.assertResourceCalled('File', 
'/usr/hdp/current/atlas-server/conf/hdfs-site.xml',action = ['delete'],)
 
 
-    self.assertResourceCalled('Execute', 'source /etc/atlas/conf/atlas-env.sh 
; /usr/hdp/current/atlas-server/bin/atlas_start.py',
+    self.assertResourceCalled('Execute', 'source 
/usr/hdp/current/atlas-server/conf/atlas-env.sh ; 
/usr/hdp/current/atlas-server/bin/atlas_start.py',
                               not_if = 'ls /var/run/atlas/atlas.pid >/dev/null 
2>&1 && ps -p `cat /var/run/atlas/atlas.pid` >/dev/null 2>&1',
                               user = 'atlas',
     )
@@ -383,7 +383,7 @@ class TestMetadataServer(RMFTestCase):
                        stack_version = self.STACK_VERSION,
                        target = RMFTestCase.TARGET_COMMON_SERVICES
     )
-    self.assertResourceCalled('Execute', 'source /etc/atlas/conf/atlas-env.sh; 
/usr/hdp/current/atlas-server/bin/atlas_stop.py',
+    self.assertResourceCalled('Execute', 'source 
/usr/hdp/current/atlas-server/conf/atlas-env.sh; 
/usr/hdp/current/atlas-server/bin/atlas_stop.py',
                               user = 'atlas',
     )
     self.assertResourceCalled('File', '/var/run/atlas/atlas.pid',

http://git-wip-us.apache.org/repos/asf/ambari/blob/918fd597/ambari-server/src/test/python/stacks/2.5/ATLAS/test_atlas_server.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/test/python/stacks/2.5/ATLAS/test_atlas_server.py 
b/ambari-server/src/test/python/stacks/2.5/ATLAS/test_atlas_server.py
index bbaef78..cd2fac8 100644
--- a/ambari-server/src/test/python/stacks/2.5/ATLAS/test_atlas_server.py
+++ b/ambari-server/src/test/python/stacks/2.5/ATLAS/test_atlas_server.py
@@ -30,7 +30,7 @@ class TestAtlasServer(RMFTestCase):
 
   def configureResourcesCalled(self):
     # Both server and client
-    self.assertResourceCalled('Directory', '/etc/atlas/conf',
+    self.assertResourceCalled('Directory', 
'/usr/hdp/current/atlas-server/conf',
                               owner='atlas',
                               group='hadoop',
                               create_parents = True,
@@ -45,7 +45,7 @@ class TestAtlasServer(RMFTestCase):
                               cd_access='a',
                               mode=0755
     )
-    self.assertResourceCalled('Directory', '/etc/atlas/conf/solr',
+    self.assertResourceCalled('Directory', 
'/usr/hdp/current/atlas-server/conf/solr',
                               owner='atlas',
                               group='hadoop',
                               create_parents = True,
@@ -92,7 +92,7 @@ class TestAtlasServer(RMFTestCase):
     app_props["atlas.server.address.id1"] = u"%s:%s" % (host_name, 
metadata_port)
     app_props["atlas.server.ha.enabled"] = "false"
 
-    self.assertResourceCalled('File', '/etc/atlas/conf/atlas-log4j.xml',
+    self.assertResourceCalled('File', 
'/usr/hdp/current/atlas-server/conf/atlas-log4j.xml',
                           content=InlineTemplate(
                             self.getConfig()['configurations'][
                               'atlas-log4j']['content']),
@@ -100,7 +100,7 @@ class TestAtlasServer(RMFTestCase):
                           group='hadoop',
                           mode=0644,
     )
-    self.assertResourceCalled('File', '/etc/atlas/conf/atlas-env.sh',
+    self.assertResourceCalled('File', 
'/usr/hdp/current/atlas-server/conf/atlas-env.sh',
                               content=InlineTemplate(
                                   self.getConfig()['configurations'][
                                     'atlas-env']['content']),
@@ -108,7 +108,7 @@ class TestAtlasServer(RMFTestCase):
                               group='hadoop',
                               mode=0755,
     )
-    self.assertResourceCalled('File', '/etc/atlas/conf/solr/solrconfig.xml',
+    self.assertResourceCalled('File', 
'/usr/hdp/current/atlas-server/conf/solr/solrconfig.xml',
                               content=InlineTemplate(
                                   self.getConfig()['configurations'][
                                     'atlas-solrconfig']['content']),
@@ -118,7 +118,7 @@ class TestAtlasServer(RMFTestCase):
     )
     # application.properties file
     self.assertResourceCalled('PropertiesFile',
-                              '/etc/atlas/conf/atlas-application.properties',
+                              
'/usr/hdp/current/atlas-server/conf/atlas-application.properties',
                               properties=app_props,
                               owner=u'atlas',
                               group=u'hadoop',
@@ -155,7 +155,7 @@ class TestAtlasServer(RMFTestCase):
                                     only_if='test -d 
/tmp/solr_config_atlas_configs_0.[0-9]*')
     self.assertResourceCalledRegexp('^Execute$', '^ambari-sudo.sh 
JAVA_HOME=/usr/jdk64/jdk1.7.0_45 
/usr/lib/ambari-infra-solr-client/solrCloudCli.sh --zookeeper-connect-string 
c6401.ambari.apache.org:2181/infra-solr --upload-config --config-dir 
/tmp/solr_config_atlas_configs_0.[0-9]* --config-set atlas_configs --retry 30 
--interval 5',
                                     only_if='test -d 
/tmp/solr_config_atlas_configs_0.[0-9]*')
-    self.assertResourceCalledRegexp('^Execute$', '^ambari-sudo.sh 
JAVA_HOME=/usr/jdk64/jdk1.7.0_45 
/usr/lib/ambari-infra-solr-client/solrCloudCli.sh --zookeeper-connect-string 
c6401.ambari.apache.org:2181/infra-solr --upload-config --config-dir 
/etc/atlas/conf/solr --config-set atlas_configs --retry 30 --interval 5',
+    self.assertResourceCalledRegexp('^Execute$', '^ambari-sudo.sh 
JAVA_HOME=/usr/jdk64/jdk1.7.0_45 
/usr/lib/ambari-infra-solr-client/solrCloudCli.sh --zookeeper-connect-string 
c6401.ambari.apache.org:2181/infra-solr --upload-config --config-dir 
/usr/hdp/current/atlas-server/conf/solr --config-set atlas_configs --retry 30 
--interval 5',
                                     not_if='test -d 
/tmp/solr_config_atlas_configs_0.[0-9]*')
     self.assertResourceCalledRegexp('^Directory$', 
'^/tmp/solr_config_atlas_configs_0.[0-9]*',
                                     action=['delete'],
@@ -181,7 +181,7 @@ class TestAtlasServer(RMFTestCase):
                               group = "hadoop",
                               content=Template("atlas_hbase_setup.rb.j2"))
 
-    self.assertResourceCalled('File', '/etc/atlas/conf/hdfs-site.xml',action = 
['delete'],)
+    self.assertResourceCalled('File', 
'/usr/hdp/current/atlas-server/conf/hdfs-site.xml',action = ['delete'],)
 
     self.assertNoMoreResources()
 

Reply via email to