Added more logs to track better errors 09/23409/3
authorManuel Buil <manuel.buil@ericsson.com>
Thu, 20 Oct 2016 09:44:57 +0000 (11:44 +0200)
committerJose Lausuch <jose.lausuch@ericsson.com>
Thu, 20 Oct 2016 10:19:20 +0000 (10:19 +0000)
Apparently in the CI, the delete.sh script is not executed and we want to
know why

Change-Id: Iefbeb7f0222b3ea9664f5b03c6e0a5fbaaaa3a1f
Signed-off-by: Manuel Buil <manuel.buil@ericsson.com>
testcases/features/sfc/sfc.py
testcases/features/sfc/sfc_colorado1.py

index 72b4e00..122ed5d 100755 (executable)
@@ -208,7 +208,7 @@ def main():
 # STARTING SECOND VM (server) ###
 
     # boot INTANCE
-    logger.info("Creating instance '%s'..." % INSTANCE_NAME)
+    logger.info("Creating instance '%s'..." % INSTANCE_NAME_2)
     logger.debug(
         "Configuration:\n name=%s \n flavor=%s \n image=%s \n "
         "network=%s \n" % (INSTANCE_NAME_2, FLAVOR, image_id, network_id))
index ef3a489..a9c397e 100755 (executable)
@@ -215,7 +215,7 @@ def main():
     # STARTING SECOND VM (server) ###
 
         # boot INTANCE
-        logger.info("Creating instance '%s'..." % INSTANCE_NAME)
+        logger.info("Creating instance '%s'..." % INSTANCE_NAME_2)
         logger.debug(
             "Configuration:\n name=%s \n flavor=%s \n image=%s \n "
             "network=%s \n" % (INSTANCE_NAME_2, FLAVOR, image_id, network_id))
@@ -500,10 +500,14 @@ def main():
                             " :) \n" + '\033[0m')
             break
         else:
-            logger.debug("Iterating again!")
+            logger.info("Iterating again!")
             delete = ("bash delete.sh")
-            subprocess.call(delete, shell=True, stderr=subprocess.PIPE)
-            time.sleep(10)
+            try:
+                subprocess.call(delete, shell=True, stderr=subprocess.PIPE)
+                time.sleep(10)
+            except Exception, e:
+                logger.error("Problem when executing the delete.sh")
+                logger.error("Problem %s" % e)
 
     if args.report:
         stop_time = time.time()