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

Fix logging in drbd _ShutdownNet method

We didn't test for failure, just always logged the output.

Reviewed-by: imsnah
parent 520de3bb
......@@ -1341,7 +1341,8 @@ class DRBDev(BaseDRBD):
"""
result = utils.RunCmd(["drbdsetup", cls._DevPath(minor), "disconnect"])
logger.Error("Can't shutdown network: %s" % result.output)
if result.failed:
logger.Error("Can't shutdown network: %s" % result.output)
return not result.failed
def Assemble(self):
......@@ -2170,7 +2171,8 @@ class DRBD8(BaseDRBD):
"""
result = utils.RunCmd(["drbdsetup", cls._DevPath(minor), "disconnect"])
logger.Error("Can't shutdown network: %s" % result.output)
if result.failed:
logger.Error("Can't shutdown network: %s" % result.output)
return not result.failed
@classmethod
......
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