Commit 333411a7 authored by Guido Trotter's avatar Guido Trotter
Browse files

Split drbd command creation and execution

Make _AssembleDisk more similar to _AssembleNet by splitting the
generation of the drbdsetup command and its execution. While not
changing anything this makes it easier to manipulate the command just in
certain cases, which in the future we'll need to do.

Reviewed-by: iustinp
parent 8d59409f
......@@ -1806,9 +1806,9 @@ class DRBD8(BaseDRBD):
if not cls._IsValidMeta(meta):
return False
result = utils.RunCmd(["drbdsetup", cls._DevPath(minor), "disk",
backend, meta, "0", "-e", "detach",
args = ["drbdsetup", cls._DevPath(minor), "disk",
backend, meta, "0", "-e", "detach", "--create-device"]
result = utils.RunCmd(args)
if result.failed:
logger.Error("Can't attach local disk: %s" % result.output)
return not result.failed
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