From 528571765f77ce4c1c1623c42f27efec56960e28 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Mon, 26 Nov 2007 08:38:12 +0000 Subject: [PATCH] Add support for DRBD8 devices to work standalone This patch adds a check in _AssembleNet so that if we are passed None value in the unique_id, we instead switch to standalone mode. Reviewed-by: imsnah --- lib/bdev.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/bdev.py b/lib/bdev.py index dbc19b9e8..61b58fd69 100644 --- a/lib/bdev.py +++ b/lib/bdev.py @@ -1858,6 +1858,11 @@ class DRBD8(BaseDRBD): """ lhost, lport, rhost, rport = net_info + if None in net_info: + # we don't want network connection and actually want to make + # sure its shutdown + return cls._ShutdownNet(minor) + args = ["drbdsetup", cls._DevPath(minor), "net", "%s:%s" % (lhost, lport), "%s:%s" % (rhost, rport), protocol, "-A", "discard-zero-changes", -- GitLab