WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

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

To: xen-api <xen-api@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-API] [PATCH] CA-40910: Only copy physical PIFs on pool join
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
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
# 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
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-API] [PATCH] CA-40910: Only copy physical PIFs on pool join, Rob Hoes <=