Commit 50ff9a7a authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix bridge checking in instance failover

The current code checks the bridge on the primary node of the instance,
but we need to check it on the destination node.

This was caught by testing failover with a down primary node.

Reviewed-by: imsnah
parent 4cc2a728
......@@ -2480,10 +2480,10 @@ class LUFailoverInstance(LogicalUnit):
# check bridge existance
brlist = [nic.bridge for nic in instance.nics]
if not rpc.call_bridges_exist(instance.primary_node, brlist):
if not rpc.call_bridges_exist(target_node, brlist):
raise errors.OpPrereqError("One or more target bridges %s does not"
" exist on destination node '%s'" %
(brlist, instance.primary_node))
(brlist, target_node))
self.instance = instance
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