fuel-nailgun-agent: Fixup SR-IOV filtering patch 77/28977/1
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Fri, 17 Feb 2017 17:33:56 +0000 (18:33 +0100)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Fri, 17 Feb 2017 17:33:56 +0000 (18:33 +0100)
Our previous SR-IOV filtering adjustment in fuel-nailgun-agent
broke detection for real SR-IOV capable interfaces, omitting
them from the inteface list.

For ThunderX systems, where interfaces are VFs, the "physfn"
dir exists, but has no "physfn/net" subdir.

Change-Id: Iaea937f360f81ac59212b8c380fecf72e9985844
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
patches/fuel-nailgun-agent/0002-Temporary-SR-IOV-Fix-VNICs-broken-filter.patch

index a3cb1ea..cbd94f2 100644 (file)
@@ -8,7 +8,7 @@ SR-IOV VFs.
 Bug report: "VNICs ignored due to SR-IOV filtering" [1]
 
 HACK: Instead of checking for "physfn", we now rely on testing
-for "sriov_totalvfs" file to determine whether current eth is
+for "physfn/net" subdir to determine whether current eth is
 a SR-IOV VF or something else (thus keeping VNICs).
 
 FIXME: Revert this patch once upstream closes bug [1].
@@ -29,7 +29,7 @@ index 89ab60f..eb2bfb4 100755
                  File.exist?("/sys/class/net/#{int}/wireless")
          # Skip virtual functions
 -        next if File.exists?("/sys/class/net/#{int}/device/physfn")
-+        next if File.exists?("/sys/class/net/#{int}/device/sriov_totalvfs")
++        next if File.exists?("/sys/class/net/#{int}/device/physfn/net")
          int_meta = {:name => int}
          int_meta[:interface_properties] = {}
          int_meta[:state] = intinfo[:state]