Commit 7d40fd49 authored by Felix Seibert's avatar Felix Seibert
Browse files

improving debug log output

parent 74ed2a87
......@@ -5,6 +5,7 @@ from urllib import request
import urllib.error
import shutil
import time
import datetime
import dataDistribution
import div_util
......@@ -17,9 +18,9 @@ currently only depth (level) 2 subdirectories can be managed
only unix-based OSs are supported
'''
max_processes_change_policy = 200
max_processes_add_replica = 200
max_processes_delete_replica = 50
max_processes_change_policy = 50
max_processes_add_replica = 50
max_processes_delete_replica = 15
# TODO add support for arbitrary subdirectory level
# (currently depth=2 is hardcoded, which is fine for GeoMultiSens purposes)
......@@ -207,6 +208,9 @@ class OSDManager(object):
# run commands
start_time = time.time()
if self.debug:
print("starting execution of change policy commands...")
print(str(datetime.datetime.now()))
processes = div_util.run_commands(change_policy_command_list, max_processes_change_policy)
end_time = time.time()
if self.debug:
......@@ -214,7 +218,10 @@ class OSDManager(object):
str(round(end_time - start_time)) + " sec.")
# div_util.print_process_list(processes)
start_time = time.time()
start_time = time.time()
if self.debug:
print("starting execution of create replica commands...")
print(str(datetime.datetime.now()))
processes = div_util.run_commands(create_replica_command_list, max_processes_add_replica)
end_time = time.time()
if self.debug:
......@@ -223,6 +230,9 @@ class OSDManager(object):
# div_util.print_process_list(processes)
start_time = time.time()
if self.debug:
print("starting execution of delete replica commands...")
print(str(datetime.datetime.now()))
processes = div_util.run_commands(delete_replica_command_list, max_processes_delete_replica)
# run and repeat delete commands, until they return no error
......
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