You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2014/02/14 20:04:54 UTC
[1/2] git commit: AMBARI-4663. Queue ACLs configuration names are
wrong (Arsen Babych via aonishuk)
Updated Branches:
refs/heads/trunk cec62b2e4 -> b59b258d2
AMBARI-4663. Queue ACLs configuration names are wrong (Arsen Babych via
aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f60a78f6
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f60a78f6
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f60a78f6
Branch: refs/heads/trunk
Commit: f60a78f681870d91aff240db7ca72abcef7be595
Parents: cec62b2
Author: Andrew Onischuk <ao...@hortonworks.com>
Authored: Fri Feb 14 10:58:44 2014 -0800
Committer: Andrew Onischuk <ao...@hortonworks.com>
Committed: Fri Feb 14 10:58:44 2014 -0800
----------------------------------------------------------------------
.../HDP/2.0.6/services/YARN/configuration/capacity-scheduler.xml | 4 ++--
.../HDP/2.1.1/services/YARN/configuration/capacity-scheduler.xml | 4 ++--
.../src/test/python/stacks/2.0.6/configs/default.hbasedecom.json | 4 ++--
ambari-server/src/test/python/stacks/2.0.6/configs/default.json | 4 ++--
ambari-server/src/test/python/stacks/2.0.6/configs/secured.json | 4 ++--
ambari-server/src/test/python/stacks/2.1.1/configs/default.json | 4 ++--
ambari-server/src/test/python/stacks/2.1.1/configs/secured.json | 4 ++--
7 files changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/f60a78f6/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/configuration/capacity-scheduler.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/configuration/capacity-scheduler.xml b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/configuration/capacity-scheduler.xml
index 695a7ed..4ce2462 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/configuration/capacity-scheduler.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/configuration/capacity-scheduler.xml
@@ -85,7 +85,7 @@
</property>
<property>
- <name>yarn.scheduler.capacity.root.default.acl_submit_jobs</name>
+ <name>yarn.scheduler.capacity.root.default.acl_submit_applications</name>
<value>*</value>
<description>
The ACL of who can submit jobs to the default queue.
@@ -101,7 +101,7 @@
</property>
<property>
- <name>yarn.scheduler.capacity.root.acl_administer_queues</name>
+ <name>yarn.scheduler.capacity.root.acl_administer_queue</name>
<value>*</value>
<description>
The ACL for who can administer this queue i.e. change sub-queue
http://git-wip-us.apache.org/repos/asf/ambari/blob/f60a78f6/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/YARN/configuration/capacity-scheduler.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/YARN/configuration/capacity-scheduler.xml b/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/YARN/configuration/capacity-scheduler.xml
index 695a7ed..4ce2462 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/YARN/configuration/capacity-scheduler.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/YARN/configuration/capacity-scheduler.xml
@@ -85,7 +85,7 @@
</property>
<property>
- <name>yarn.scheduler.capacity.root.default.acl_submit_jobs</name>
+ <name>yarn.scheduler.capacity.root.default.acl_submit_applications</name>
<value>*</value>
<description>
The ACL of who can submit jobs to the default queue.
@@ -101,7 +101,7 @@
</property>
<property>
- <name>yarn.scheduler.capacity.root.acl_administer_queues</name>
+ <name>yarn.scheduler.capacity.root.acl_administer_queue</name>
<value>*</value>
<description>
The ACL for who can administer this queue i.e. change sub-queue
http://git-wip-us.apache.org/repos/asf/ambari/blob/f60a78f6/ambari-server/src/test/python/stacks/2.0.6/configs/default.hbasedecom.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/default.hbasedecom.json b/ambari-server/src/test/python/stacks/2.0.6/configs/default.hbasedecom.json
index 82e19e5..16d223e 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/configs/default.hbasedecom.json
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/default.hbasedecom.json
@@ -298,7 +298,7 @@
"capacity-scheduler": {
"yarn.scheduler.capacity.node-locality-delay": "40",
"yarn.scheduler.capacity.root.capacity": "100",
- "yarn.scheduler.capacity.root.acl_administer_queues": "*",
+ "yarn.scheduler.capacity.root.acl_administer_queue": "*",
"yarn.scheduler.capacity.root.queues": "default",
"yarn.scheduler.capacity.maximum-applications": "10000",
"yarn.scheduler.capacity.root.default.user-limit-factor": "1",
@@ -308,7 +308,7 @@
"yarn.scheduler.capacity.maximum-am-resource-percent": "0.2",
"yarn.scheduler.capacity.root.default.acl_administer_jobs": "*",
"yarn.scheduler.capacity.root.default.capacity": "100",
- "yarn.scheduler.capacity.root.default.acl_submit_jobs": "*"
+ "yarn.scheduler.capacity.root.default.acl_submit_applications": "*"
},
"hdfs-site": {
"dfs.namenode.checkpoint.period": "21600",
http://git-wip-us.apache.org/repos/asf/ambari/blob/f60a78f6/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/default.json b/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
index 5013aae..5405b87 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
@@ -298,7 +298,7 @@
"capacity-scheduler": {
"yarn.scheduler.capacity.node-locality-delay": "40",
"yarn.scheduler.capacity.root.capacity": "100",
- "yarn.scheduler.capacity.root.acl_administer_queues": "*",
+ "yarn.scheduler.capacity.root.acl_administer_queue": "*",
"yarn.scheduler.capacity.root.queues": "default",
"yarn.scheduler.capacity.maximum-applications": "10000",
"yarn.scheduler.capacity.root.default.user-limit-factor": "1",
@@ -308,7 +308,7 @@
"yarn.scheduler.capacity.maximum-am-resource-percent": "0.2",
"yarn.scheduler.capacity.root.default.acl_administer_jobs": "*",
"yarn.scheduler.capacity.root.default.capacity": "100",
- "yarn.scheduler.capacity.root.default.acl_submit_jobs": "*"
+ "yarn.scheduler.capacity.root.default.acl_submit_applications": "*"
},
"hdfs-site": {
"dfs.namenode.checkpoint.period": "21600",
http://git-wip-us.apache.org/repos/asf/ambari/blob/f60a78f6/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json
index 3944239..81da171 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json
@@ -395,7 +395,7 @@
"capacity-scheduler": {
"yarn.scheduler.capacity.node-locality-delay": "40",
"yarn.scheduler.capacity.root.capacity": "100",
- "yarn.scheduler.capacity.root.acl_administer_queues": "*",
+ "yarn.scheduler.capacity.root.acl_administer_queue": "*",
"yarn.scheduler.capacity.root.queues": "default",
"yarn.scheduler.capacity.maximum-applications": "10000",
"yarn.scheduler.capacity.root.default.user-limit-factor": "1",
@@ -405,7 +405,7 @@
"yarn.scheduler.capacity.maximum-am-resource-percent": "0.2",
"yarn.scheduler.capacity.root.default.acl_administer_jobs": "*",
"yarn.scheduler.capacity.root.default.capacity": "100",
- "yarn.scheduler.capacity.root.default.acl_submit_jobs": "*"
+ "yarn.scheduler.capacity.root.default.acl_submit_applications": "*"
},
"hdfs-site": {
"dfs.namenode.avoid.write.stale.datanode": "true",
http://git-wip-us.apache.org/repos/asf/ambari/blob/f60a78f6/ambari-server/src/test/python/stacks/2.1.1/configs/default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1.1/configs/default.json b/ambari-server/src/test/python/stacks/2.1.1/configs/default.json
index 00c8950..ebb0742 100644
--- a/ambari-server/src/test/python/stacks/2.1.1/configs/default.json
+++ b/ambari-server/src/test/python/stacks/2.1.1/configs/default.json
@@ -297,7 +297,7 @@
"capacity-scheduler": {
"yarn.scheduler.capacity.node-locality-delay": "40",
"yarn.scheduler.capacity.root.capacity": "100",
- "yarn.scheduler.capacity.root.acl_administer_queues": "*",
+ "yarn.scheduler.capacity.root.acl_administer_queue": "*",
"yarn.scheduler.capacity.root.queues": "default",
"yarn.scheduler.capacity.maximum-applications": "10000",
"yarn.scheduler.capacity.root.default.user-limit-factor": "1",
@@ -307,7 +307,7 @@
"yarn.scheduler.capacity.maximum-am-resource-percent": "0.2",
"yarn.scheduler.capacity.root.default.acl_administer_jobs": "*",
"yarn.scheduler.capacity.root.default.capacity": "100",
- "yarn.scheduler.capacity.root.default.acl_submit_jobs": "*"
+ "yarn.scheduler.capacity.root.default.acl_submit_applications": "*"
},
"hdfs-site": {
"dfs.namenode.checkpoint.period": "21600",
http://git-wip-us.apache.org/repos/asf/ambari/blob/f60a78f6/ambari-server/src/test/python/stacks/2.1.1/configs/secured.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1.1/configs/secured.json b/ambari-server/src/test/python/stacks/2.1.1/configs/secured.json
index e2e3ace..2631592 100644
--- a/ambari-server/src/test/python/stacks/2.1.1/configs/secured.json
+++ b/ambari-server/src/test/python/stacks/2.1.1/configs/secured.json
@@ -394,7 +394,7 @@
"capacity-scheduler": {
"yarn.scheduler.capacity.node-locality-delay": "40",
"yarn.scheduler.capacity.root.capacity": "100",
- "yarn.scheduler.capacity.root.acl_administer_queues": "*",
+ "yarn.scheduler.capacity.root.acl_administer_queue": "*",
"yarn.scheduler.capacity.root.queues": "default",
"yarn.scheduler.capacity.maximum-applications": "10000",
"yarn.scheduler.capacity.root.default.user-limit-factor": "1",
@@ -404,7 +404,7 @@
"yarn.scheduler.capacity.maximum-am-resource-percent": "0.2",
"yarn.scheduler.capacity.root.default.acl_administer_jobs": "*",
"yarn.scheduler.capacity.root.default.capacity": "100",
- "yarn.scheduler.capacity.root.default.acl_submit_jobs": "*"
+ "yarn.scheduler.capacity.root.default.acl_submit_applications": "*"
},
"hdfs-site": {
"dfs.namenode.avoid.write.stale.datanode": "true",
[2/2] git commit: AMBARI-4681. Rolling restart for Supervisors fails
if component is in INSTALLED state (Arsen Babych via aonishuk)
Posted by ao...@apache.org.
AMBARI-4681. Rolling restart for Supervisors fails if component is in
INSTALLED state (Arsen Babych via aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b59b258d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b59b258d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b59b258d
Branch: refs/heads/trunk
Commit: b59b258d243832ace399b0c8e2213ba38474dc79
Parents: f60a78f
Author: Andrew Onischuk <ao...@hortonworks.com>
Authored: Fri Feb 14 11:00:42 2014 -0800
Committer: Andrew Onischuk <ao...@hortonworks.com>
Committed: Fri Feb 14 11:00:42 2014 -0800
----------------------------------------------------------------------
.../HDP/2.1.1/services/STORM/package/scripts/service.py | 7 +++++--
.../python/stacks/2.1.1/STORM/test_storm_drpc_server.py | 10 ++++++++--
.../stacks/2.1.1/STORM/test_storm_logviewer_server.py | 10 ++++++++--
.../test/python/stacks/2.1.1/STORM/test_storm_nimbus.py | 10 ++++++++--
.../stacks/2.1.1/STORM/test_storm_rest_api_service.py | 11 +++++++++--
.../python/stacks/2.1.1/STORM/test_storm_supervisor.py | 11 +++++++++--
.../python/stacks/2.1.1/STORM/test_storm_ui_server.py | 11 +++++++++--
7 files changed, 56 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/b59b258d/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/STORM/package/scripts/service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/STORM/package/scripts/service.py b/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/STORM/package/scripts/service.py
index e12e39b..5661458 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/STORM/package/scripts/service.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/STORM/package/scripts/service.py
@@ -62,10 +62,13 @@ def service(
)
elif action == "stop":
+ process_dont_exist = format("! ({no_op_test})")
cmd = format("kill `cat {pid_file}` >/dev/null 2>&1")
- Execute(cmd)
+ Execute(cmd,
+ not_if=process_dont_exist
+ )
- Execute(format("! ({no_op_test})"),
+ Execute(process_dont_exist,
tries=5,
try_sleep=3
)
http://git-wip-us.apache.org/repos/asf/ambari/blob/b59b258d/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_drpc_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_drpc_server.py b/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_drpc_server.py
index 3d44d12..b66e859 100644
--- a/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_drpc_server.py
+++ b/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_drpc_server.py
@@ -64,12 +64,15 @@ class TestStormDrpcServer(RMFTestCase):
command = "stop",
config_file="default.json"
)
- self.assertResourceCalled('Execute', 'kill `cat /var/run/storm/drpc.pid` >/dev/null 2>&1')
+ self.assertResourceCalled('Execute', 'kill `cat /var/run/storm/drpc.pid` >/dev/null 2>&1',
+ not_if = '! (ls /var/run/storm/drpc.pid >/dev/null 2>&1 && ps `cat /var/run/storm/drpc.pid` >/dev/null 2>&1)',
+ )
self.assertResourceCalled('Execute', '! (ls /var/run/storm/drpc.pid >/dev/null 2>&1 && ps `cat /var/run/storm/drpc.pid` >/dev/null 2>&1)',
tries = 5,
try_sleep = 3,
)
self.assertResourceCalled('Execute', 'rm -f /var/run/storm/drpc.pid')
+ self.assertNoMoreResources()
def test_configure_default(self):
self.executeScript("2.1.1/services/STORM/package/scripts/drpc_server.py",
@@ -110,12 +113,15 @@ class TestStormDrpcServer(RMFTestCase):
command = "stop",
config_file="secured.json"
)
- self.assertResourceCalled('Execute', 'kill `cat /var/run/storm/drpc.pid` >/dev/null 2>&1')
+ self.assertResourceCalled('Execute', 'kill `cat /var/run/storm/drpc.pid` >/dev/null 2>&1',
+ not_if = '! (ls /var/run/storm/drpc.pid >/dev/null 2>&1 && ps `cat /var/run/storm/drpc.pid` >/dev/null 2>&1)',
+ )
self.assertResourceCalled('Execute', '! (ls /var/run/storm/drpc.pid >/dev/null 2>&1 && ps `cat /var/run/storm/drpc.pid` >/dev/null 2>&1)',
tries = 5,
try_sleep = 3,
)
self.assertResourceCalled('Execute', 'rm -f /var/run/storm/drpc.pid')
+ self.assertNoMoreResources()
def assert_configure_default(self):
http://git-wip-us.apache.org/repos/asf/ambari/blob/b59b258d/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_logviewer_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_logviewer_server.py b/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_logviewer_server.py
index 74fcbda..3c42ada 100644
--- a/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_logviewer_server.py
+++ b/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_logviewer_server.py
@@ -64,12 +64,15 @@ class TestStormLogviewerServer(RMFTestCase):
command = "stop",
config_file="default.json"
)
- self.assertResourceCalled('Execute', 'kill `cat /var/run/storm/logviewer.pid` >/dev/null 2>&1')
+ self.assertResourceCalled('Execute', 'kill `cat /var/run/storm/logviewer.pid` >/dev/null 2>&1',
+ not_if = '! (ls /var/run/storm/logviewer.pid >/dev/null 2>&1 && ps `cat /var/run/storm/logviewer.pid` >/dev/null 2>&1)',
+ )
self.assertResourceCalled('Execute', '! (ls /var/run/storm/logviewer.pid >/dev/null 2>&1 && ps `cat /var/run/storm/logviewer.pid` >/dev/null 2>&1)',
tries = 5,
try_sleep = 3,
)
self.assertResourceCalled('Execute', 'rm -f /var/run/storm/logviewer.pid')
+ self.assertNoMoreResources()
def test_configure_default(self):
self.executeScript("2.1.1/services/STORM/package/scripts/logviewer_server.py",
@@ -110,12 +113,15 @@ class TestStormLogviewerServer(RMFTestCase):
command = "stop",
config_file="secured.json"
)
- self.assertResourceCalled('Execute', 'kill `cat /var/run/storm/logviewer.pid` >/dev/null 2>&1')
+ self.assertResourceCalled('Execute', 'kill `cat /var/run/storm/logviewer.pid` >/dev/null 2>&1',
+ not_if = '! (ls /var/run/storm/logviewer.pid >/dev/null 2>&1 && ps `cat /var/run/storm/logviewer.pid` >/dev/null 2>&1)',
+ )
self.assertResourceCalled('Execute', '! (ls /var/run/storm/logviewer.pid >/dev/null 2>&1 && ps `cat /var/run/storm/logviewer.pid` >/dev/null 2>&1)',
tries = 5,
try_sleep = 3,
)
self.assertResourceCalled('Execute', 'rm -f /var/run/storm/logviewer.pid')
+ self.assertNoMoreResources()
def assert_configure_default(self):
http://git-wip-us.apache.org/repos/asf/ambari/blob/b59b258d/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_nimbus.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_nimbus.py b/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_nimbus.py
index 2ac251d..75c0377 100644
--- a/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_nimbus.py
+++ b/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_nimbus.py
@@ -64,12 +64,15 @@ class TestStormNimbus(RMFTestCase):
command = "stop",
config_file="default.json"
)
- self.assertResourceCalled('Execute', 'kill `cat /var/run/storm/nimbus.pid` >/dev/null 2>&1')
+ self.assertResourceCalled('Execute', 'kill `cat /var/run/storm/nimbus.pid` >/dev/null 2>&1',
+ not_if = '! (ls /var/run/storm/nimbus.pid >/dev/null 2>&1 && ps `cat /var/run/storm/nimbus.pid` >/dev/null 2>&1)',
+ )
self.assertResourceCalled('Execute', '! (ls /var/run/storm/nimbus.pid >/dev/null 2>&1 && ps `cat /var/run/storm/nimbus.pid` >/dev/null 2>&1)',
tries = 5,
try_sleep = 3,
)
self.assertResourceCalled('Execute', 'rm -f /var/run/storm/nimbus.pid')
+ self.assertNoMoreResources()
def test_configure_default(self):
self.executeScript("2.1.1/services/STORM/package/scripts/nimbus.py",
@@ -110,12 +113,15 @@ class TestStormNimbus(RMFTestCase):
command = "stop",
config_file="secured.json"
)
- self.assertResourceCalled('Execute', 'kill `cat /var/run/storm/nimbus.pid` >/dev/null 2>&1')
+ self.assertResourceCalled('Execute', 'kill `cat /var/run/storm/nimbus.pid` >/dev/null 2>&1',
+ not_if = '! (ls /var/run/storm/nimbus.pid >/dev/null 2>&1 && ps `cat /var/run/storm/nimbus.pid` >/dev/null 2>&1)',
+ )
self.assertResourceCalled('Execute', '! (ls /var/run/storm/nimbus.pid >/dev/null 2>&1 && ps `cat /var/run/storm/nimbus.pid` >/dev/null 2>&1)',
tries = 5,
try_sleep = 3,
)
self.assertResourceCalled('Execute', 'rm -f /var/run/storm/nimbus.pid')
+ self.assertNoMoreResources()
def assert_configure_default(self):
http://git-wip-us.apache.org/repos/asf/ambari/blob/b59b258d/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_rest_api_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_rest_api_service.py b/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_rest_api_service.py
index a945f21..b7ec67c 100644
--- a/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_rest_api_service.py
+++ b/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_rest_api_service.py
@@ -64,12 +64,16 @@ class TestStormRestApi(RMFTestCase):
command = "stop",
config_file="default.json"
)
- self.assertResourceCalled('Execute', 'kill `cat /var/run/storm/restapi.pid` >/dev/null 2>&1')
+
+ self.assertResourceCalled('Execute', 'kill `cat /var/run/storm/restapi.pid` >/dev/null 2>&1',
+ not_if = '! (ls /var/run/storm/restapi.pid >/dev/null 2>&1 && ps `cat /var/run/storm/restapi.pid` >/dev/null 2>&1)',
+ )
self.assertResourceCalled('Execute', '! (ls /var/run/storm/restapi.pid >/dev/null 2>&1 && ps `cat /var/run/storm/restapi.pid` >/dev/null 2>&1)',
tries = 5,
try_sleep = 3,
)
self.assertResourceCalled('Execute', 'rm -f /var/run/storm/restapi.pid')
+ self.assertNoMoreResources()
def test_configure_default(self):
self.executeScript("2.1.1/services/STORM/package/scripts/rest_api.py",
@@ -110,12 +114,15 @@ class TestStormRestApi(RMFTestCase):
command = "stop",
config_file="secured.json"
)
- self.assertResourceCalled('Execute', 'kill `cat /var/run/storm/restapi.pid` >/dev/null 2>&1')
+ self.assertResourceCalled('Execute', 'kill `cat /var/run/storm/restapi.pid` >/dev/null 2>&1',
+ not_if = '! (ls /var/run/storm/restapi.pid >/dev/null 2>&1 && ps `cat /var/run/storm/restapi.pid` >/dev/null 2>&1)',
+ )
self.assertResourceCalled('Execute', '! (ls /var/run/storm/restapi.pid >/dev/null 2>&1 && ps `cat /var/run/storm/restapi.pid` >/dev/null 2>&1)',
tries = 5,
try_sleep = 3,
)
self.assertResourceCalled('Execute', 'rm -f /var/run/storm/restapi.pid')
+ self.assertNoMoreResources()
def assert_configure_default(self):
http://git-wip-us.apache.org/repos/asf/ambari/blob/b59b258d/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_supervisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_supervisor.py b/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_supervisor.py
index 97502db..ca452cd 100644
--- a/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_supervisor.py
+++ b/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_supervisor.py
@@ -64,12 +64,16 @@ class TestStormSupervisor(RMFTestCase):
command = "stop",
config_file="default.json"
)
- self.assertResourceCalled('Execute', 'kill `cat /var/run/storm/supervisor.pid` >/dev/null 2>&1')
+
+ self.assertResourceCalled('Execute', 'kill `cat /var/run/storm/supervisor.pid` >/dev/null 2>&1',
+ not_if = '! (ls /var/run/storm/supervisor.pid >/dev/null 2>&1 && ps `cat /var/run/storm/supervisor.pid` >/dev/null 2>&1)',
+ )
self.assertResourceCalled('Execute', '! (ls /var/run/storm/supervisor.pid >/dev/null 2>&1 && ps `cat /var/run/storm/supervisor.pid` >/dev/null 2>&1)',
tries = 5,
try_sleep = 3,
)
self.assertResourceCalled('Execute', 'rm -f /var/run/storm/supervisor.pid')
+ self.assertNoMoreResources()
def test_configure_default(self):
self.executeScript("2.1.1/services/STORM/package/scripts/supervisor.py",
@@ -110,12 +114,15 @@ class TestStormSupervisor(RMFTestCase):
command = "stop",
config_file="secured.json"
)
- self.assertResourceCalled('Execute', 'kill `cat /var/run/storm/supervisor.pid` >/dev/null 2>&1')
+ self.assertResourceCalled('Execute', 'kill `cat /var/run/storm/supervisor.pid` >/dev/null 2>&1',
+ not_if = '! (ls /var/run/storm/supervisor.pid >/dev/null 2>&1 && ps `cat /var/run/storm/supervisor.pid` >/dev/null 2>&1)',
+ )
self.assertResourceCalled('Execute', '! (ls /var/run/storm/supervisor.pid >/dev/null 2>&1 && ps `cat /var/run/storm/supervisor.pid` >/dev/null 2>&1)',
tries = 5,
try_sleep = 3,
)
self.assertResourceCalled('Execute', 'rm -f /var/run/storm/supervisor.pid')
+ self.assertNoMoreResources()
def assert_configure_default(self):
http://git-wip-us.apache.org/repos/asf/ambari/blob/b59b258d/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_ui_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_ui_server.py b/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_ui_server.py
index 93e8c04..2e8d775 100644
--- a/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_ui_server.py
+++ b/ambari-server/src/test/python/stacks/2.1.1/STORM/test_storm_ui_server.py
@@ -64,12 +64,16 @@ class TestStormUiServer(RMFTestCase):
command = "stop",
config_file="default.json"
)
- self.assertResourceCalled('Execute', 'kill `cat /var/run/storm/ui.pid` >/dev/null 2>&1')
+
+ self.assertResourceCalled('Execute', 'kill `cat /var/run/storm/ui.pid` >/dev/null 2>&1',
+ not_if = '! (ls /var/run/storm/ui.pid >/dev/null 2>&1 && ps `cat /var/run/storm/ui.pid` >/dev/null 2>&1)',
+ )
self.assertResourceCalled('Execute', '! (ls /var/run/storm/ui.pid >/dev/null 2>&1 && ps `cat /var/run/storm/ui.pid` >/dev/null 2>&1)',
tries = 5,
try_sleep = 3,
)
self.assertResourceCalled('Execute', 'rm -f /var/run/storm/ui.pid')
+ self.assertNoMoreResources()
def test_configure_default(self):
self.executeScript("2.1.1/services/STORM/package/scripts/ui_server.py",
@@ -110,12 +114,15 @@ class TestStormUiServer(RMFTestCase):
command = "stop",
config_file="secured.json"
)
- self.assertResourceCalled('Execute', 'kill `cat /var/run/storm/ui.pid` >/dev/null 2>&1')
+ self.assertResourceCalled('Execute', 'kill `cat /var/run/storm/ui.pid` >/dev/null 2>&1',
+ not_if = '! (ls /var/run/storm/ui.pid >/dev/null 2>&1 && ps `cat /var/run/storm/ui.pid` >/dev/null 2>&1)',
+ )
self.assertResourceCalled('Execute', '! (ls /var/run/storm/ui.pid >/dev/null 2>&1 && ps `cat /var/run/storm/ui.pid` >/dev/null 2>&1)',
tries = 5,
try_sleep = 3,
)
self.assertResourceCalled('Execute', 'rm -f /var/run/storm/ui.pid')
+ self.assertNoMoreResources()
def assert_configure_default(self):