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
8ce46200
Commit
8ce46200
authored
Jul 20, 2018
by
Felix Seibert
Browse files
change two_step rebalancing such that OSD capacities are respected
parent
a2b05e2c
Changes
1
Show whitespace changes
Inline
Side-by-side
xtreemfs_client/dataDistribution.py
View file @
8ce46200
...
...
@@ -47,6 +47,15 @@ class DataDistribution(object):
new_osd
=
osd
.
OSD
(
osd_uuid
)
self
.
OSDs
[
osd_uuid
]
=
new_osd
def
replace_osd
(
self
,
new_osd
):
"""
replaces the osd with uuid new_osd.uuid by new_osd
:param new_osd:
:return:
"""
assert
new_osd
.
uuid
in
self
.
OSDs
.
keys
()
self
.
OSDs
[
new_osd
.
uuid
]
=
new_osd
def
set_osd_capacities
(
self
,
osd_capacities
):
"""
set osd capacities
...
...
@@ -410,7 +419,10 @@ class DataDistribution(object):
origin_osd
=
self
.
get_containing_osd
(
virtual_folder
).
uuid
target_osd
=
current_osd
.
uuid
movements
[
virtual_folder
]
=
(
origin_osd
,
target_osd
)
self
.
assign_new_osd
(
virtual_folder
,
target_osd
)
for
current_osd
,
virtual_osd
in
current_to_virtual_osd_matching
:
virtual_osd
.
uuid
=
current_osd
.
uuid
self
.
replace_osd
(
virtual_osd
)
return
movements
...
...
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