Skip to content

Commit

Permalink
handle base interfaces for vlans (which have no direct associated ne…
Browse files Browse the repository at this point in the history
…twork
  • Loading branch information
andi committed Dec 20, 2012
1 parent b3b520a commit 9b8fc52
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion chef/cookbooks/network/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,13 @@ def fixup_mtu(node, networks, intfs)
mtus = {}
intfs.each { |intf_name,intf|
next if intf[:slave] # skip enslaved interfaces.

#skip interfaces no associated with networks.. they'll be handled by thier owner
#networks
net = networks[intf[:associated_network]]
mtu = net["mtu"]
Chef::Log.info("intf #{intf_name} not associated with network") && next unless net

mtu = net["mtu"] rescue nil
# skip if no MTU specified for the network
Chef::Log.info("no MTU for network: #{net["usage"]}") && next unless mtu

Expand Down

0 comments on commit 9b8fc52

Please sign in to comment.