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

[Xen-API] [PATCH] CA-40910: Only copy physical PIFs on pool join

  • To: xen-api <xen-api@xxxxxxxxxxxxxxxxxxx>
  • From: Rob Hoes <rob.hoes@xxxxxxxxxx>
  • Date: Fri, 28 May 2010 17:12:09 +0100
  • Delivery-date: Fri, 28 May 2010 09:12:48 -0700
  • List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>

# HG changeset patch
# User Rob Hoes <rob.hoes@xxxxxxxxxx>
CA-40910: Only copy physical PIFs on pool join

On pool join, any bonds or VLANs on the joining host are supposed to be 
ignored. When the host reboots after the join, it will inherit the bond/VLAN 
setup from the pool master. Therefore, Bond and VLAN objects are not copied 
from the joining host to the pool. However, bond and VLAN master PIFs are, with 
is not good. This patch fixes that.

Signed-off-by: Rob Hoes <rob.hoes@xxxxxxxxxx>

diff -r 5e1b97c472e5 ocaml/xapi/xapi_pool.ml
--- a/ocaml/xapi/xapi_pool.ml
+++ b/ocaml/xapi/xapi_pool.ml
@@ -464,6 +464,7 @@
        (* update PIFs *)
        let my_pifs = Db.PIF.get_all_records ~__context in
+       let my_pifs = List.filter (fun (_, pif) -> pif.API.pIF_physical) 
my_pifs in
        let (_ : API.ref_PIF option list) =
                List.map (protect_exn (create_or_get_pif_on_master __context 
rpc session_id)) my_pifs in

Attachment: pool-join-only-copy-phy-pifs
Description: Text document

xen-api mailing list



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