Don't stop reporting/destroying, even if something bad happens to an instance.

parent e46f3e6c
......@@ -809,6 +809,7 @@ class Slapgrid(object):
#We loop on the different computer partitions
computer_partition_list = slap_computer_usage.getComputerPartitionList()
for computer_partition in computer_partition_list:
try:
computer_partition_id = computer_partition.getId()
#We want execute all the script in the report folder
......@@ -829,7 +830,6 @@ class Slapgrid(object):
failed_script_list = []
for script in script_list_to_run:
invocation_list = []
invocation_list.append(os.path.join(instance_path, 'etc', 'report',
script))
......@@ -865,6 +865,13 @@ class Slapgrid(object):
(invocation_list, result))
if len(failed_script_list):
computer_partition.error('\n'.join(failed_script_list))
# Whatever happens, don't stop processing other instances
except Exception:
computer_partition_id = computer_partition.getId()
exception = traceback.format_exc()
issue = "Cannot run usage script(s) for %r: %s" % (
computer_partition_id, exception)
logger.info(issue)
#Now we loop through the different computer partitions to report
report_usage_issue_cp_list = []
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment