Hi all,
I've got a setup with a dual primary DRBD with over it a KVM virtual 
machine, managed by a Virtualdomain resource.
In a classical primary-seconday setup, the declaration of the resource is:

primitive vm-test_r0 ocf:linbit:drbd \
        params drbd_resource="r0" \
        op monitor interval="20s" timeout="40s" \
        op start interval="0" timeout="240s" \
        op stop interval="0" timeout="100s"

ms vm-test_ms-r0 vm-test_r5 \
        meta master-max="1" notify="true"

primitive vm-test_virtualdomain ocf:heartbeat:VirtualDomain \
        params config="/etc/libvirt/qemu/vm-test.xml" 
hypervisor="qemu:///system" \
        meta allow-migrate="false" \
        op monitor interval="10" timeout="30" depth="0" \
        op start interval="0" timeout="120s" \
        op stop interval="0" timeout="120s"

colocation vm-test_virtualdomain_ON_vm-test_ms-r0 inf: 
vm-test_virtualdomain vm-test_ms-r0:Master

order vm-test_virtualdomain_AFTER_vm-test_ms-r0 inf: 
vm-test_ms-r0:promote vm-test_virtualdomain:start

And it's perfectly clear that with this setup I cannot have live 
migration, so, to change this I made this modifications, following 
what's written in the dual drbd's documentation on clusterlabs:

primitive vm-test_r0 ocf:linbit:drbd \
        params drbd_resource="r0" \
        op monitor interval="20" role="Master" timeout="20" \
        op monitor interval="30" role="Slave" timeout="20" \
        op start interval="0" timeout="240s" \
        op stop interval="0" timeout="100s"

ms vm-test_ms-r0 vm-test_r0 \
        meta notify="true" master-max="2" interleave="true"

primitive vm-test_virtualdomain ocf:heartbeat:VirtualDomain \
        params config="/etc/libvirt/qemu/vm-test.xml" 
hypervisor="qemu:///system" migration_transport="ssh" \
        meta allow-migrate="true" \
        op monitor interval="10" timeout="30" depth="0" \
        op start interval="0" timeout="120s" \
        op stop interval="0" timeout="120s"

order vm-test_virtualdomain_AFTER_vm-test_ms-r0 inf: 
vm-test_ms-r0:promote vm-test_virtualdomain:start

And here are my doubts, because without a colocation, the vm migrate 
fine, but with a "classical" colocation like this:

colocation vm-test_virtualdomain_ON_vm-test_ms-r0 inf: 
vm-test_virtualdomain vm-test_ms-r0:Master

things breaks up. Because for some reason (that i don't understand) the 
destination drbd is promoted to secondary.

So, is it correct to not declare a colocation or is there a better way 
to do what I'm doing?

Thanks a lot!

-- 
RaSca
Mia Mamma Usa Linux: Niente รจ impossibile da capire, se lo spieghi bene!
[email protected]
http://www.miamammausalinux.org

_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to