Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
snf-ganeti
Commits
4504c3d6
Commit
4504c3d6
authored
Dec 14, 2008
by
Iustin Pop
Browse files
cleanup: LUReplaceDisks unused vars
And a small whitespace fix. Reviewed-by: amishchenko
parent
9ca87a96
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/cmdlib.py
View file @
4504c3d6
...
...
@@ -4553,7 +4553,7 @@ class LUReplaceDisks(LogicalUnit):
# now that the new lvs have the old name, we can add them to the device
info
(
"adding new mirror component on %s"
%
tgt_node
)
result
=
self
.
rpc
.
call_blockdev_addchildren
(
tgt_node
,
dev
,
new_lvs
)
result
=
self
.
rpc
.
call_blockdev_addchildren
(
tgt_node
,
dev
,
new_lvs
)
if
result
.
failed
or
not
result
.
data
:
for
new_lv
in
new_lvs
:
result
=
self
.
rpc
.
call_blockdev_remove
(
tgt_node
,
new_lv
)
...
...
@@ -4614,7 +4614,6 @@ class LUReplaceDisks(LogicalUnit):
warning
,
info
=
(
self
.
proc
.
LogWarning
,
self
.
proc
.
LogInfo
)
instance
=
self
.
instance
iv_names
=
{}
vgname
=
self
.
cfg
.
GetVGName
()
# start of work
cfg
=
self
.
cfg
old_node
=
self
.
tgt_node
...
...
@@ -4656,7 +4655,6 @@ class LUReplaceDisks(LogicalUnit):
# Step: create new storage
self
.
proc
.
LogStep
(
3
,
steps_total
,
"allocate new storage"
)
for
idx
,
dev
in
enumerate
(
instance
.
disks
):
size
=
dev
.
size
info
(
"adding new local storage on %s for disk/%d"
%
(
new_node
,
idx
))
# since we *always* want to create this LV, we use the
...
...
@@ -4744,7 +4742,6 @@ class LUReplaceDisks(LogicalUnit):
# and now perform the drbd attach
info
(
"attaching primary drbds to new secondary (standalone => connected)"
)
failures
=
[]
for
idx
,
dev
in
enumerate
(
instance
.
disks
):
info
(
"attaching primary drbd for disk/%d to new secondary node"
%
idx
)
# since the attach is smart, it's enough to 'find' the device,
...
...
Write
Preview
Markdown
is supported
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