[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-API] [PATCH] Remove bond-slave filter from PIF.scan
# HG changeset patch # User Rob Hoes <rob.hoes@xxxxxxxxxx> Remove bond-slave filter from PIF.scan This filter uses sysfs to find out whether an interface is a bond slave. This does not work when the openvswitch backend is used. Besides, it does not seem to be necessary (anymore?) anyway. PIF.scan creates a new PIF for each interface it finds if this interface is physical and there is no PIF with the same MAC. The slave interfaces always have the same MAC as the bond master PIF (bridging backend) or their "real" MACs as stored in their PIFs (openvswitch backend). Therefore, when a bond is in effect, the MACs of all bond slaves have corresponding PIFs in the DB, so PIF.scan won't create new ones. Signed-off-by: Rob Hoes <rob.hoes@xxxxxxxxxx> diff -r 20b3b5da0f44 ocaml/xapi/xapi_pif.ml --- a/ocaml/xapi/xapi_pif.ml +++ b/ocaml/xapi/xapi_pif.ml @@ -272,15 +272,6 @@ let existing_macs = List.map fst t.mac_to_pif_table in let physical_macs = List.map fst t.mac_to_phy_table in - (* Filter out the interfaces that are enslaved as part of bonds: CA-12690 *) - let physical_macs = - List.filter - (fun mac -> - let device = List.assoc mac t.mac_to_phy_table in - let is_enslaved = try Unix.access ("/sys/class/net/"^device^"/master") [Unix.F_OK]; true with _ -> false in - not is_enslaved) - physical_macs in - (* Create PIF records for the new interfaces *) List.iter (fun mac -> Attachment:
pif-scan-simplify _______________________________________________ xen-api mailing list xen-api@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/mailman/listinfo/xen-api
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |