KVM: use cache=none for shared disk templates
authorApollon Oikonomopoulos <apollon@noc.grnet.gr>
Mon, 28 Feb 2011 11:51:14 +0000 (13:51 +0200)
committerIustin Pop <iustin@google.com>
Tue, 8 Mar 2011 12:01:40 +0000 (13:01 +0100)
commit41e794f68b1d7f1136f19ba0bf575e47f3b314b8
tree38bb9d161853176aefbd910e81a35eb46e7050cf
parentdb366d9a2c1de320b8da678b4d90be187b174c38
KVM: use cache=none for shared disk templates

Disable host cache for externally mirrored disks to avoid cache incoherency.
Without this, migrations between the same two nodes may end up in disk
corruption.

This is a runtime override of cluster defaults, mostly a workaround.
Unfortunately, we cannot use cmdlib._CheckHVParams, as we want to check the
hypervisor parameters *in conjunction* with the disk template, which is part of
the instance definition.

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
lib/hypervisor/hv_kvm.py