# HG changeset patch # User David Scott # Date 1265716153 0 # Node ID 505385179bff8c6a9bddc032436f8601b067a342 # Parent 5f0f093c3dd3f44003c640e36af1469888441e39 CA-22016: when deciding which host to forward a VDI.copy to (eg when installing a VM to a different SR), take into account the host liveness. Signed-off-by: David Scott diff -r 5f0f093c3dd3 -r 505385179bff ocaml/xapi/message_forwarding.ml --- a/ocaml/xapi/message_forwarding.ml Tue Feb 02 15:52:34 2010 +0000 +++ b/ocaml/xapi/message_forwarding.ml Tue Feb 09 11:49:13 2010 +0000 @@ -2458,10 +2458,11 @@ let forward_sr_multiple_op ~local_fn ~__context ~srs op = let hosts = Db.Host.get_all ~__context in let filterfn host = - try - Xapi_vm_helpers.assert_can_see_specified_SRs ~__context ~reqd_srs:srs ~host; - true - with + try + Xapi_vm_helpers.assert_can_see_specified_SRs ~__context ~reqd_srs:srs ~host; + check_live ~__context host; + true + with _ -> false in let possibles = List.filter filterfn hosts in match possibles with