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

backend.DrbdAttachNet: don't ignore Open() errors

Currently the return value or errors from the block device Open() method
are ignored. This patch catches any BlockDeviceErrors and returns a
well-formatted result.

Reviewed-by: ultrotter
parent 0959c824
......@@ -2335,7 +2335,10 @@ def DrbdAttachNet(nodes_ip, disks, instance_name, multimaster):
if multimaster:
# change to primary mode
for rd in bdevs:
except errors.BlockDeviceError, err:
return (False, "Can't change to primary mode: %s" % str(err))
if multimaster:
msg = "multi-master and primary"
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