Commit 0efff6d3 authored by Felix Seibert's avatar Felix Seibert
Browse files

try out 3

parent 25f9bda9
......@@ -190,8 +190,10 @@ class OSDManager(object):
if remote_source is not None:
shutil.rmtree(sshfs_mount_dir)
if self.debug:
print("OSDManager: random_osd_assignment: " + str(random_osd_assignment))
new_assignments = self.distribution.add_folders(new_folders, random_osd_assignment)
new_assignments = self.distribution.add_folders(new_folders, random_osd_assignment=random_osd_assignment)
if apply_layout:
self.apply_osd_assignments(new_assignments)
elif self.debug:
......
......@@ -80,6 +80,8 @@ class DataDistribution(object):
else:
new_folders.append(folder)
print("dataDistribution: random_osd_assignment: " + str(random_osd_assignment))
osds_for_new_folders = []
# totally random OSD assignment, even ignoring OSD capacities
......@@ -88,7 +90,7 @@ class DataDistribution(object):
print("using random osd assignment")
for folder in new_folders:
osds_for_new_folders.append((folder.id,
random.choice(self.OSDs.values())))
random.choice(list(self.OSDs.values()))))
return osds_for_new_folders
# balanced deterministic OSD assignment
......
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