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

remove unnecessary step in external layout realization for slurm mode

parent 12b3ccb0
...@@ -336,7 +336,6 @@ class OSDManager(object): ...@@ -336,7 +336,6 @@ class OSDManager(object):
command_list = [] command_list = []
host_name = "" host_name = ""
# command = ""
for key in osd_to_folders_map.keys(): for key in osd_to_folders_map.keys():
if host_name == "": if host_name == "":
host_name = osd_to_host_map[key] host_name = osd_to_host_map[key]
...@@ -344,20 +343,20 @@ class OSDManager(object): ...@@ -344,20 +343,20 @@ class OSDManager(object):
for move_folder in osd_to_folders_map[key]: for move_folder in osd_to_folders_map[key]:
folder_path = self.get_absolute_file_path(move_folder) folder_path = self.get_absolute_file_path(move_folder)
folder_tmp_path = os.path.join(tmp_dir, os.path.split(move_folder)[1]) folder_tmp_path = os.path.join(tmp_dir, os.path.split(move_folder)[1])
# copy folder to temporary location
# move folder to temporary location
command += "srun -N1-1 --nodelist=" + host_name command += "srun -N1-1 --nodelist=" + host_name
command += " cp -r " + folder_path + " " + tmp_dir + " ; " command += " mv " + folder_path + " " + tmp_dir + " ; "
# delete folder within the managed xtreemfs folder # copy folder back from temporary location to initial location
command += "srun -N1-1 --nodelist=" + host_name command += "srun -N1-1 --nodelist=" + host_name
command += " rm -r " + folder_path + " ; "
# copy folder back from temporary location
command += " cp -r " + folder_tmp_path + " " + os.path.split(folder_path)[0] + " ; " command += " cp -r " + folder_tmp_path + " " + os.path.split(folder_path)[0] + " ; "
# delete folder from temporary location # delete folder from temporary location
command += "srun -N1-1 --nodelist=" + host_name command += "srun -N1-1 --nodelist=" + host_name
command += " rm -r " + folder_tmp_path + " ; " command += " rm -r " + folder_tmp_path + " ; "
if len(osd_to_folders_map[key]) > 0:
if len(command) > 0:
command_list.append(command) command_list.append(command)
# command_list.append(command)
return command_list return command_list
def move_folder_to_osd(self, folder_id: str, new_osd_id: str, tmp_dir=None): def move_folder_to_osd(self, folder_id: str, new_osd_id: str, tmp_dir=None):
......
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