From 0a91d6e941e41154cb3a468ca539b8f6859deb21 Mon Sep 17 00:00:00 2001 From: Corey Melanson Date: Tue, 20 Sep 2016 17:52:20 -0400 Subject: [PATCH] work around cleanup bug for vms with multiple nics --- src/vnm_mad/remotes/lib/vlan.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vnm_mad/remotes/lib/vlan.rb b/src/vnm_mad/remotes/lib/vlan.rb index a63f3f0094..c685cbd5fd 100644 --- a/src/vnm_mad/remotes/lib/vlan.rb +++ b/src/vnm_mad/remotes/lib/vlan.rb @@ -94,6 +94,9 @@ module VNMMAD # Get the name of the vlan device. get_vlan_dev_name + # Return if the bridge doesn't exist because it was already deleted (handles last vm with multiple nics on the same vlan) + next if !@bridges.include? @nic[:bridge] + # Return if the vlan device is not the only left device in the bridge. next if @bridges[@nic[:bridge]].length > 1 or !@bridges[@nic[:bridge]].include? @nic[:vlan_dev]