Ignore interfaces with @ in the name

ohai reports interface name as br-bm.755@br-bm if device is vlan subinterface
on the bridge.
This patch skip interfaces with such names.

Change-Id: I17fe2276ca5e6cddd38f70f44f1275eb97814a26
Closes-Bug: #1592361
This commit is contained in:
Vasyl Saienko 2016-06-14 14:06:48 +03:00
parent c5d6963e04
commit 46c31195d2
1 changed files with 1 additions and 0 deletions

1
agent
View File

@ -402,6 +402,7 @@ class NodeAgent
(@os[:network][:interfaces] or {} rescue {}).each do |int, intinfo|
# Send info about physical interfaces only
next if int =~ /.*@.*/
next if intinfo[:encapsulation] !~ /^Ethernet.*/
# Avoid virtual devices like loopback, tunnels, bonding, vlans ...
# TODO(vsharshov): replace below lines by this string after excluding Ruby 1.8