Browse Source

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
Vasyl Saienko 2 years ago
parent
commit
46c31195d2
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      agent

+ 1
- 0
agent View File

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

Loading…
Cancel
Save