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): ...@@ -232,7 +232,8 @@ class OSDManager(object):
div_util.print_process_list(processes) div_util.print_process_list(processes)
for process in 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 pass
else: else:
errored_deletions.append(process[0]) errored_deletions.append(process[0])
...@@ -47,7 +47,7 @@ def run_commands(commands, max_processes=200): ...@@ -47,7 +47,7 @@ def run_commands(commands, max_processes=200):
for p in running_processes: for p in running_processes:
p.wait() 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): 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