Geode: FIX - Updates to make builds more stable

Change-Id: Ib8d3db4c5f5d181e30a009fc928fb6fbe12b131b
diff --git a/jjb/geode/apache-geode-test/execute_stressnew.sh b/jjb/geode/apache-geode-test/execute_stressnew.sh
index 5b452fb..dd75d6b 100755
--- a/jjb/geode/apache-geode-test/execute_stressnew.sh
+++ b/jjb/geode/apache-geode-test/execute_stressnew.sh
@@ -160,5 +160,10 @@
 
 # Cleanup
 # Make sure all test containers are stopped and removed when tests are finished
-docker stop $(docker ps -a -q)
-docker rm $(docker ps -a -q)
\ No newline at end of file
+DOCKER_CONTAINERS=$(sudo docker ps -a -q 2> /dev/null)
+if [ -n "${DOCKER_CONTAINERS}" ]; then
+  docker stop ${DOCKER_CONTAINERS} > /dev/null
+  echo -e  "Removing containers with ID:"
+  docker rm ${DOCKER_CONTAINERS}
+fi
+