]> xenbits.xensource.com Git - xcp/xen-api.git/commitdiff
CA-40910: Only copy physical PIFs on pool join
authorRob Hoes <rob.hoes@citrix.com>
Thu, 17 Jun 2010 16:31:00 +0000 (17:31 +0100)
committerRob Hoes <rob.hoes@citrix.com>
Thu, 17 Jun 2010 16:31:00 +0000 (17:31 +0100)
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@citrix.com>
ocaml/xapi/xapi_pool.ml

index fa05a15c9e5bd26e595c1272e3ba2bf0062e3a2f..aa4d0f4857781dd024bbaa11967313853c7dac6f 100644 (file)
@@ -484,6 +484,7 @@ let update_non_vm_metadata ~__context ~rpc ~session_id =
 
        (* 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