Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Felix Seibert
xtreemfs_client
Commits
e86e345d
Commit
e86e345d
authored
Nov 27, 2018
by
Felix Seibert
Browse files
remove unnecessary step in external layout realization for slurm mode
parent
12b3ccb0
Changes
1
Hide whitespace changes
Inline
Side-by-side
xtreemfs_client/OSDManager.py
View file @
e86e345d
...
...
@@ -336,7 +336,6 @@ class OSDManager(object):
command_list
=
[]
host_name
=
""
# command = ""
for
key
in
osd_to_folders_map
.
keys
():
if
host_name
==
""
:
host_name
=
osd_to_host_map
[
key
]
...
...
@@ -344,20 +343,20 @@ class OSDManager(object):
for
move_folder
in
osd_to_folders_map
[
key
]:
folder_path
=
self
.
get_absolute_file_path
(
move_folder
)
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
+=
"
cp -r
"
+
folder_path
+
" "
+
tmp_dir
+
" ; "
#
delete
folder
within the managed xtreemfs folder
command
+=
"
mv
"
+
folder_path
+
" "
+
tmp_dir
+
" ; "
#
copy
folder
back from temporary location to initial location
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
]
+
" ; "
# delete folder from temporary location
command
+=
"srun -N1-1 --nodelist="
+
host_name
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)
return
command_list
def
move_folder_to_osd
(
self
,
folder_id
:
str
,
new_osd_id
:
str
,
tmp_dir
=
None
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment