AMBARI-7475 STORM service start fails on HDP2.2 (dsen)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/45ddf9f2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/45ddf9f2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/45ddf9f2 Branch: refs/heads/branch-alerts-dev Commit: 45ddf9f2435418f169df0b03d67d06c44298167a Parents: ec17bef Author: Dmytro Sen <[email protected]> Authored: Wed Sep 24 21:28:43 2014 +0300 Committer: Dmytro Sen <[email protected]> Committed: Wed Sep 24 21:36:20 2014 +0300 ---------------------------------------------------------------------- .../2.1/services/STORM/package/scripts/params.py | 5 +++-- .../2.1/services/STORM/package/scripts/service.py | 10 ++++++---- .../services/STORM/package/scripts/service_check.py | 6 ++++-- .../2.2/services/STORM/configuration/storm-site.xml | 12 ++++++++---- .../python/stacks/2.1/STORM/test_service_check.py | 5 ++++- .../stacks/2.1/STORM/test_storm_drpc_server.py | 8 ++++++-- .../python/stacks/2.1/STORM/test_storm_nimbus.py | 8 ++++++-- .../stacks/2.1/STORM/test_storm_rest_api_service.py | 8 ++++++-- .../stacks/2.1/STORM/test_storm_supervisor.py | 16 ++++++++++++---- .../stacks/2.1/STORM/test_storm_supervisor_prod.py | 8 ++++++-- .../python/stacks/2.1/STORM/test_storm_ui_server.py | 8 ++++++-- 11 files changed, 67 insertions(+), 27 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/45ddf9f2/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/params.py index 84e2174..4a8ec51 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/params.py @@ -29,10 +29,11 @@ rpm_version = default("/configurations/hadoop-env/rpm_version", None) #hadoop params if rpm_version is not None: - rest_lib_dir = format('/usr/hdp/current/storm/contrib/storm-rest') - + rest_lib_dir = '/usr/hdp/current/storm/contrib/storm-rest' + storm_bin_dir = "/usr/hdp/current/storm/bin" else: rest_lib_dir = "/usr/lib/storm/contrib/storm-rest" + storm_bin_dir = "/usr/bin" storm_user = config['configurations']['storm-env']['storm_user'] log_dir = config['configurations']['storm-env']['storm_log_dir'] http://git-wip-us.apache.org/repos/asf/ambari/blob/45ddf9f2/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/service.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/service.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/service.py index 464f62e..938dfc0 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/service.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/service.py @@ -48,20 +48,22 @@ def service( if action == "start": if name == "rest_api": - cmd = format("{process_cmd} {rest_api_conf_file} > {log_dir}/restapi.log") + cmd = format("{process_cmd} {rest_api_conf_file} > {log_dir}/restapi.log 2>&1") else: - cmd = format("env JAVA_HOME={java64_home} PATH=$PATH:{java64_home}/bin /usr/bin/storm {name} > {log_dir}/{name}.out 2>&1") + cmd = format("env JAVA_HOME={java64_home} PATH=$PATH:{java64_home}/bin storm {name} > {log_dir}/{name}.out 2>&1") Execute(cmd, not_if=no_op_test, user=params.storm_user, - wait_for_finish=False + wait_for_finish=False, + path=params.storm_bin_dir ) Execute(crt_pid_cmd, user=params.storm_user, logoutput=True, tries=tries_count, - try_sleep=10 + try_sleep=10, + path=params.storm_bin_dir ) elif action == "stop": http://git-wip-us.apache.org/repos/asf/ambari/blob/45ddf9f2/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/service_check.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/service_check.py index 50ddb31..b033e99 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/service_check.py @@ -35,10 +35,12 @@ class ServiceCheck(Script): cmd = format("env JAVA_HOME={java64_home} storm jar /tmp/wordCount.jar storm.starter.WordCountTopology WordCount{unique} -c nimbus.host={nimbus_host}") Execute(cmd, - logoutput=True + logoutput=True, + path=params.storm_bin_dir ) - Execute(format("env JAVA_HOME={java64_home} storm kill WordCount{unique}")) + Execute(format("env JAVA_HOME={java64_home} storm kill WordCount{unique}"), + path=params.storm_bin_dir) if __name__ == "__main__": ServiceCheck().execute() http://git-wip-us.apache.org/repos/asf/ambari/blob/45ddf9f2/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/configuration/storm-site.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/configuration/storm-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/configuration/storm-site.xml index f204456..1befb09 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/configuration/storm-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/configuration/storm-site.xml @@ -22,6 +22,14 @@ <configuration supports_final="true"> + <property> + <name>java.library.path</name> + <value>/usr/local/lib:/opt/local/lib:/usr/lib:/usr/hdp/current/storm/lib</value> + <description>This value is passed to spawned JVMs (e.g., Nimbus, Supervisor, and Workers) + for the java.library.path value. java.library.path tells the JVM where + to look for native libraries. It is necessary to set this config correctly since + Storm uses the ZeroMQ and JZMQ native libs. </description> + </property> <property> <name>nimbus.childopts</name> @@ -35,8 +43,6 @@ <description>The jvm opts provided to workers launched by this supervisor. All \"%ID%\" substrings are replaced with an identifier for this worker.</description> </property> - - <property> <name>ui.childopts</name> <value>-Xmx768m</value> @@ -49,6 +55,4 @@ <description>This parameter is used by the storm-deploy project to configure the jvm options for the supervisor daemon.</description> </property> - - </configuration> http://git-wip-us.apache.org/repos/asf/ambari/blob/45ddf9f2/ambari-server/src/test/python/stacks/2.1/STORM/test_service_check.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.1/STORM/test_service_check.py b/ambari-server/src/test/python/stacks/2.1/STORM/test_service_check.py index aa0ae05..2ea56f1 100644 --- a/ambari-server/src/test/python/stacks/2.1/STORM/test_service_check.py +++ b/ambari-server/src/test/python/stacks/2.1/STORM/test_service_check.py @@ -38,6 +38,9 @@ class TestStormServiceCheck(RMFTestCase): ) self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 storm jar /tmp/wordCount.jar storm.starter.WordCountTopology WordCount -c nimbus.host=c6402.ambari.apache.org', logoutput = True, + path = ['/usr/bin'] + ) + self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 storm kill WordCount', + path = ['/usr/bin'] ) - self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 storm kill WordCount') http://git-wip-us.apache.org/repos/asf/ambari/blob/45ddf9f2/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_drpc_server.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_drpc_server.py b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_drpc_server.py index b182462..d8b028f 100644 --- a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_drpc_server.py +++ b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_drpc_server.py @@ -43,9 +43,10 @@ class TestStormDrpcServer(RMFTestCase): ) self.assert_configure_default() - self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 PATH=$PATH:/usr/jdk64/jdk1.7.0_45/bin /usr/bin/storm drpc > /var/log/storm/drpc.out 2>&1', + self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 PATH=$PATH:/usr/jdk64/jdk1.7.0_45/bin storm drpc > /var/log/storm/drpc.out 2>&1', wait_for_finish = False, not_if = 'ls /var/run/storm/drpc.pid >/dev/null 2>&1 && ps `cat /var/run/storm/drpc.pid` >/dev/null 2>&1', + path = ['/usr/bin'], user = 'storm', ) @@ -53,6 +54,7 @@ class TestStormDrpcServer(RMFTestCase): logoutput = True, tries = 6, user = 'storm', + path = ['/usr/bin'], try_sleep = 10, ) @@ -92,9 +94,10 @@ class TestStormDrpcServer(RMFTestCase): self.assert_configure_secured() - self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 PATH=$PATH:/usr/jdk64/jdk1.7.0_45/bin /usr/bin/storm drpc > /var/log/storm/drpc.out 2>&1', + self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 PATH=$PATH:/usr/jdk64/jdk1.7.0_45/bin storm drpc > /var/log/storm/drpc.out 2>&1', wait_for_finish = False, not_if = 'ls /var/run/storm/drpc.pid >/dev/null 2>&1 && ps `cat /var/run/storm/drpc.pid` >/dev/null 2>&1', + path = ['/usr/bin'], user = 'storm', ) @@ -102,6 +105,7 @@ class TestStormDrpcServer(RMFTestCase): logoutput = True, tries = 6, user = 'storm', + path = ['/usr/bin'], try_sleep = 10, ) http://git-wip-us.apache.org/repos/asf/ambari/blob/45ddf9f2/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 da0ea19..005bc63 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 @@ -42,9 +42,10 @@ class TestStormNimbus(RMFTestCase): self.assert_configure_default() - self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 PATH=$PATH:/usr/jdk64/jdk1.7.0_45/bin /usr/bin/storm nimbus > /var/log/storm/nimbus.out 2>&1', + self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 PATH=$PATH:/usr/jdk64/jdk1.7.0_45/bin storm nimbus > /var/log/storm/nimbus.out 2>&1', wait_for_finish = False, not_if = 'ls /var/run/storm/nimbus.pid >/dev/null 2>&1 && ps `cat /var/run/storm/nimbus.pid` >/dev/null 2>&1', + path = ['/usr/bin'], user = 'storm', ) @@ -52,6 +53,7 @@ class TestStormNimbus(RMFTestCase): logoutput = True, tries = 6, user = 'storm', + path = ['/usr/bin'], try_sleep = 10, ) @@ -91,9 +93,10 @@ class TestStormNimbus(RMFTestCase): self.assert_configure_secured() - self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 PATH=$PATH:/usr/jdk64/jdk1.7.0_45/bin /usr/bin/storm nimbus > /var/log/storm/nimbus.out 2>&1', + self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 PATH=$PATH:/usr/jdk64/jdk1.7.0_45/bin storm nimbus > /var/log/storm/nimbus.out 2>&1', wait_for_finish = False, not_if = 'ls /var/run/storm/nimbus.pid >/dev/null 2>&1 && ps `cat /var/run/storm/nimbus.pid` >/dev/null 2>&1', + path = ['/usr/bin'], user = 'storm', ) @@ -101,6 +104,7 @@ class TestStormNimbus(RMFTestCase): logoutput = True, tries = 6, user = 'storm', + path = ['/usr/bin'], try_sleep = 10, ) http://git-wip-us.apache.org/repos/asf/ambari/blob/45ddf9f2/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_rest_api_service.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_rest_api_service.py b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_rest_api_service.py index 542830d..877bb72 100644 --- a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_rest_api_service.py +++ b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_rest_api_service.py @@ -42,9 +42,10 @@ class TestStormRestApi(RMFTestCase): self.assert_configure_default() - self.assertResourceCalled('Execute', '/usr/jdk64/jdk1.7.0_45/bin/java -jar /usr/lib/storm/contrib/storm-rest/`ls /usr/lib/storm/contrib/storm-rest | grep -wE storm-rest-[0-9.-]+\\.jar` server /etc/storm/conf/config.yaml > /var/log/storm/restapi.log', + self.assertResourceCalled('Execute', '/usr/jdk64/jdk1.7.0_45/bin/java -jar /usr/lib/storm/contrib/storm-rest/`ls /usr/lib/storm/contrib/storm-rest | grep -wE storm-rest-[0-9.-]+\\.jar` server /etc/storm/conf/config.yaml > /var/log/storm/restapi.log 2>&1', wait_for_finish = False, not_if = 'ls /var/run/storm/restapi.pid >/dev/null 2>&1 && ps `cat /var/run/storm/restapi.pid` >/dev/null 2>&1', + path = ['/usr/bin'], user = 'storm', ) @@ -52,6 +53,7 @@ class TestStormRestApi(RMFTestCase): logoutput = True, tries = 6, user = 'storm', + path = ['/usr/bin'], try_sleep = 10, ) @@ -91,9 +93,10 @@ class TestStormRestApi(RMFTestCase): self.assert_configure_secured() - self.assertResourceCalled('Execute', '/usr/jdk64/jdk1.7.0_45/bin/java -jar /usr/lib/storm/contrib/storm-rest/`ls /usr/lib/storm/contrib/storm-rest | grep -wE storm-rest-[0-9.-]+\\.jar` server /etc/storm/conf/config.yaml > /var/log/storm/restapi.log', + self.assertResourceCalled('Execute', '/usr/jdk64/jdk1.7.0_45/bin/java -jar /usr/lib/storm/contrib/storm-rest/`ls /usr/lib/storm/contrib/storm-rest | grep -wE storm-rest-[0-9.-]+\\.jar` server /etc/storm/conf/config.yaml > /var/log/storm/restapi.log 2>&1', wait_for_finish = False, not_if = 'ls /var/run/storm/restapi.pid >/dev/null 2>&1 && ps `cat /var/run/storm/restapi.pid` >/dev/null 2>&1', + path = ['/usr/bin'], user = 'storm', ) @@ -101,6 +104,7 @@ class TestStormRestApi(RMFTestCase): logoutput = True, tries = 6, user = 'storm', + path = ['/usr/bin'], try_sleep = 10, ) http://git-wip-us.apache.org/repos/asf/ambari/blob/45ddf9f2/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor.py b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor.py index 4ab2b76..76ae58f 100644 --- a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor.py +++ b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor.py @@ -42,9 +42,10 @@ class TestStormSupervisor(RMFTestCase): self.assert_configure_default() - self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 PATH=$PATH:/usr/jdk64/jdk1.7.0_45/bin /usr/bin/storm supervisor > /var/log/storm/supervisor.out 2>&1', + self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 PATH=$PATH:/usr/jdk64/jdk1.7.0_45/bin storm supervisor > /var/log/storm/supervisor.out 2>&1', wait_for_finish = False, not_if = 'ls /var/run/storm/supervisor.pid >/dev/null 2>&1 && ps `cat /var/run/storm/supervisor.pid` >/dev/null 2>&1', + path = ['/usr/bin'], user = 'storm', ) @@ -52,11 +53,13 @@ class TestStormSupervisor(RMFTestCase): logoutput = True, tries = 6, user = 'storm', + path = ['/usr/bin'], try_sleep = 10, ) - self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 PATH=$PATH:/usr/jdk64/jdk1.7.0_45/bin /usr/bin/storm logviewer > /var/log/storm/logviewer.out 2>&1', + self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 PATH=$PATH:/usr/jdk64/jdk1.7.0_45/bin storm logviewer > /var/log/storm/logviewer.out 2>&1', wait_for_finish = False, not_if = 'ls /var/run/storm/logviewer.pid >/dev/null 2>&1 && ps `cat /var/run/storm/logviewer.pid` >/dev/null 2>&1', + path = ['/usr/bin'], user = 'storm' ) @@ -64,6 +67,7 @@ class TestStormSupervisor(RMFTestCase): logoutput = True, tries = 12, user = 'storm', + path = ['/usr/bin'], try_sleep = 10 ) @@ -111,9 +115,10 @@ class TestStormSupervisor(RMFTestCase): self.assert_configure_secured() - self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 PATH=$PATH:/usr/jdk64/jdk1.7.0_45/bin /usr/bin/storm supervisor > /var/log/storm/supervisor.out 2>&1', + self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 PATH=$PATH:/usr/jdk64/jdk1.7.0_45/bin storm supervisor > /var/log/storm/supervisor.out 2>&1', wait_for_finish = False, not_if = 'ls /var/run/storm/supervisor.pid >/dev/null 2>&1 && ps `cat /var/run/storm/supervisor.pid` >/dev/null 2>&1', + path = ['/usr/bin'], user = 'storm', ) @@ -121,11 +126,13 @@ class TestStormSupervisor(RMFTestCase): logoutput = True, tries = 6, user = 'storm', + path = ['/usr/bin'], try_sleep = 10, ) - self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 PATH=$PATH:/usr/jdk64/jdk1.7.0_45/bin /usr/bin/storm logviewer > /var/log/storm/logviewer.out 2>&1', + self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 PATH=$PATH:/usr/jdk64/jdk1.7.0_45/bin storm logviewer > /var/log/storm/logviewer.out 2>&1', wait_for_finish = False, not_if = 'ls /var/run/storm/logviewer.pid >/dev/null 2>&1 && ps `cat /var/run/storm/logviewer.pid` >/dev/null 2>&1', + path = ['/usr/bin'], user = 'storm' ) @@ -133,6 +140,7 @@ class TestStormSupervisor(RMFTestCase): logoutput = True, tries = 12, user = 'storm', + path = ['/usr/bin'], try_sleep = 10 ) self.assertNoMoreResources() http://git-wip-us.apache.org/repos/asf/ambari/blob/45ddf9f2/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor_prod.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor_prod.py b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor_prod.py index 5f32ff1..1a77f951 100644 --- a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor_prod.py +++ b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor_prod.py @@ -45,15 +45,17 @@ class TestStormSupervisor(RMFTestCase): self.assertResourceCalled('Execute', 'supervisorctl start storm-supervisor', wait_for_finish = False, ) - self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 PATH=$PATH:/usr/jdk64/jdk1.7.0_45/bin /usr/bin/storm logviewer > /var/log/storm/logviewer.out 2>&1', + self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 PATH=$PATH:/usr/jdk64/jdk1.7.0_45/bin storm logviewer > /var/log/storm/logviewer.out 2>&1', wait_for_finish = False, not_if = 'ls /var/run/storm/logviewer.pid >/dev/null 2>&1 && ps `cat /var/run/storm/logviewer.pid` >/dev/null 2>&1', + path = ['/usr/bin'], user = 'storm', ) self.assertResourceCalled('Execute', 'pgrep -f "^java.+backtype.storm.daemon.logviewer$" && pgrep -f "^java.+backtype.storm.daemon.logviewer$" > /var/run/storm/logviewer.pid', logoutput = True, tries = 12, user = 'storm', + path = ['/usr/bin'], try_sleep = 10, ) @@ -101,15 +103,17 @@ class TestStormSupervisor(RMFTestCase): self.assertResourceCalled('Execute', 'supervisorctl start storm-supervisor', wait_for_finish = False, ) - self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 PATH=$PATH:/usr/jdk64/jdk1.7.0_45/bin /usr/bin/storm logviewer > /var/log/storm/logviewer.out 2>&1', + self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 PATH=$PATH:/usr/jdk64/jdk1.7.0_45/bin storm logviewer > /var/log/storm/logviewer.out 2>&1', wait_for_finish = False, not_if = 'ls /var/run/storm/logviewer.pid >/dev/null 2>&1 && ps `cat /var/run/storm/logviewer.pid` >/dev/null 2>&1', + path = ['/usr/bin'], user = 'storm', ) self.assertResourceCalled('Execute', 'pgrep -f "^java.+backtype.storm.daemon.logviewer$" && pgrep -f "^java.+backtype.storm.daemon.logviewer$" > /var/run/storm/logviewer.pid', logoutput = True, tries = 12, user = 'storm', + path = ['/usr/bin'], try_sleep = 10, ) http://git-wip-us.apache.org/repos/asf/ambari/blob/45ddf9f2/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py index b5101a5..46a1523 100644 --- a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py +++ b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py @@ -42,9 +42,10 @@ class TestStormUiServer(RMFTestCase): self.assert_configure_default() - self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 PATH=$PATH:/usr/jdk64/jdk1.7.0_45/bin /usr/bin/storm ui > /var/log/storm/ui.out 2>&1', + self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 PATH=$PATH:/usr/jdk64/jdk1.7.0_45/bin storm ui > /var/log/storm/ui.out 2>&1', wait_for_finish = False, not_if = 'ls /var/run/storm/ui.pid >/dev/null 2>&1 && ps `cat /var/run/storm/ui.pid` >/dev/null 2>&1', + path = ['/usr/bin'], user = 'storm', ) @@ -52,6 +53,7 @@ class TestStormUiServer(RMFTestCase): logoutput = True, tries = 6, user = 'storm', + path = ['/usr/bin'], try_sleep = 10, ) @@ -91,9 +93,10 @@ class TestStormUiServer(RMFTestCase): self.assert_configure_secured() - self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 PATH=$PATH:/usr/jdk64/jdk1.7.0_45/bin /usr/bin/storm ui > /var/log/storm/ui.out 2>&1', + self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 PATH=$PATH:/usr/jdk64/jdk1.7.0_45/bin storm ui > /var/log/storm/ui.out 2>&1', wait_for_finish = False, not_if = 'ls /var/run/storm/ui.pid >/dev/null 2>&1 && ps `cat /var/run/storm/ui.pid` >/dev/null 2>&1', + path = ['/usr/bin'], user = 'storm', ) @@ -101,6 +104,7 @@ class TestStormUiServer(RMFTestCase): logoutput = True, tries = 6, user = 'storm', + path = ['/usr/bin'], try_sleep = 10, )
