Commit 023e3296 authored by Guido Trotter's avatar Guido Trotter
Browse files

LUReplaceDisks: remove use of ChainOpCode

The calls to OpActivateInstanceDisks and OpDeactivateInstanceDisks has
been replaced by _StartInstanceDisks and _SafeShutdownInstanceDisks
respectively. This is the last usage of ChainOpCode.

Reviewed-by: iustinp
parent 155d6c75
......@@ -3978,8 +3978,7 @@ class LUReplaceDisks(LogicalUnit):
# Activate the instance disks if we're replacing them on a down instance
if instance.status == "down":
op = opcodes.OpActivateInstanceDisks(instance_name=instance.name)
self.proc.ChainOpCode(op)
_StartInstanceDisks(self.cfg, instance, True)
if instance.disk_template == constants.DT_DRBD8:
if self.op.remote_node is None:
......@@ -3993,8 +3992,7 @@ class LUReplaceDisks(LogicalUnit):
# Deactivate the instance disks if we're replacing them on a down instance
if instance.status == "down":
op = opcodes.OpDeactivateInstanceDisks(instance_name=instance.name)
self.proc.ChainOpCode(op)
_SafeShutdownInstanceDisks(instance, self.cfg)
return ret
......
Markdown is supported
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