Commit ab6cc81c authored by Iustin Pop's avatar Iustin Pop
Browse files

DRBD: Fix another bug in diskless activation

DRBD8 requires that we pass ‘--create-device’ to the first command that
wants to activate a new DRBD minor. We do this currently when we run the
“drbdsetup ... disk” command which we run before the network setup.

But if the LVs are missing, we skip the ‘disk’ subcommand and run only
the ‘net’ one, so it might be that the activation fails because the
minor we selected was never created in the first place.

The patch adds the required parameter to the DRBD8._AssembleNet() call.
Since it's a no-op for existing minors, it should not create any
problems (tested and works both with configured and unconfigured
minors).

Reviewed-by: ultrotter
parent e3e66f02
......@@ -1817,6 +1817,7 @@ class DRBD8(BaseDRBD):
"%s:%s" % (lhost, lport), "%s:%s" % (rhost, rport), protocol,
"-A", "discard-zero-changes",
"-B", "consensus",
"--create-device",
]
if dual_pri:
args.append("-m")
......
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