Commit 16863995 authored by Felix Seibert's avatar Felix Seibert
Browse files

using popen return codes to check whether the delete command was successfull, instead of stderr

parent a31b26e2
......@@ -232,7 +232,8 @@ class OSDManager(object):
div_util.print_process_list(processes)
for process in processes:
if process[1][1] == b'':
# check the return code. if it is one, the replica could not be deleted, so we try again later.
if not process[2]:
pass
else:
errored_deletions.append(process[0])
......
......@@ -47,7 +47,7 @@ def run_commands(commands, max_processes=200):
for p in running_processes:
p.wait()
return list(map(lambda proc: (proc.args, proc.communicate()), all_processes))
return list(map(lambda proc: (proc.args, proc.communicate(), proc.returncode), all_processes))
def print_process_list(processes):
......
Supports Markdown
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