[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] [XenServer6.5]: Check vif interface error at kernel 3.x issue


  • To: "=?gb18030?b?eHMtZGV2ZWw=?=" <xs-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "=?gb18030?b?wO7S5Q==?=" <yilikernel@xxxxxx>
  • Date: Sun, 10 May 2015 09:07:31 +0800
  • Cc: =?gb18030?b?eGVuLWFwaQ==?= <xen-api@xxxxxxxxxxxxx>
  • Delivery-date: Mon, 11 May 2015 10:06:15 +0000
  • List-id: User and development list for XCP and XAPI <xen-api.lists.xen.org>

Hi all,

This issue happened on XenServer Creedence. 
 
i have check the xen-api, there have some error to check a interface whether  a physical interface.
please check and review. Thanks


Subject: [PATCH] Check vif interface error at kernel 3.x issue

The softlink name of /sys/class/net/vif**/device have not the xen-backend string
on kernel 3.X, should use the softlink /sys/class/net/vif**/device/driver

Signed-off-by: Yi Li <yili@xxxxxxxxxxx>
---
 ocaml/network/network_utils.ml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ocaml/network/network_utils.ml b/ocaml/network/network_utils.ml
index 281157d..9195f01 100644
--- a/ocaml/network/network_utils.ml
+++ b/ocaml/network/network_utils.ml
@@ -86,7 +86,7 @@ module Sysfs = struct

        let is_physical name =
                try
-                       let link = Unix.readlink (getpath name "device") in
+                       let link = Unix.readlink (getpath name "device/driver") in
                        (* filter out device symlinks which look like /../../../devices/xen-backend/vif- *)
                        not(List.mem "xen-backend" (String.split '/' link))
                with _ -> false
--
1.7.12.4

Attachment: 0001-Check-vif-interface-error-at-kernel-3.x-issue.patch
Description: Binary data

_______________________________________________
Xen-api mailing list
Xen-api@xxxxxxxxxxxxx
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.