Created attachment 1237086 [details] engine log Description of problem: If I define soft VM to host affinity group and update cluster scheduler policy to the policy with the load balancer, the engine starts to migrate VM all time between the hosts. Version-Release number of selected component (if applicable): rhevm-4.1.0-0.3.beta2.el7.noarch How reproducible: Always Steps to Reproduce: 1. In the environment with at least two hosts 2. Create soft, positive VM to host affinity group(af_1) 3. Add vm_1 and host_1 to af_1 4. Create 50% CPU load on the host_2 5. Start vm_1 6. Change the cluster scheduling policy to power_saving 7. Wait 4-5 minutes Actual results: Jan 4, 2017 12:12:23 PM Migration completed (VM: golden_env_mixed_virtio_0, Source: host_mixed_1, Destination: host_mixed_3, Duration: 5 seconds, Total: 5 seconds, Actual downtime: (N/A)) Jan 4, 2017 12:12:19 PM Migration initiated by system (VM: golden_env_mixed_virtio_0, Source: host_mixed_1, Destination: host_mixed_3, Reason: Affinity rules enforcement). Jan 4, 2017 12:12:03 PM Migration completed (VM: golden_env_mixed_virtio_0, Source: host_mixed_3, Destination: host_mixed_1, Duration: 6 seconds, Total: 6 seconds, Actual downtime: (N/A)) Jan 4, 2017 12:11:59 PM Migration initiated by system (VM: golden_env_mixed_virtio_0, Source: host_mixed_3, Destination: host_mixed_1, Reason: Load balancing). Jan 4, 2017 12:11:21 PM Migration completed (VM: golden_env_mixed_virtio_0, Source: host_mixed_1, Destination: host_mixed_3, Duration: 4 seconds, Total: 4 seconds, Actual downtime: (N/A)) Jan 4, 2017 12:11:18 PM Migration initiated by system (VM: golden_env_mixed_virtio_0, Source: host_mixed_1, Destination: host_mixed_3, Reason: Affinity rules enforcement). Jan 4, 2017 12:11:01 PM Migration completed (VM: golden_env_mixed_virtio_0, Source: host_mixed_3, Destination: host_mixed_1, Duration: 4 seconds, Total: 4 seconds, Actual downtime: (N/A)) Jan 4, 2017 12:10:57 PM Migration initiated by system (VM: golden_env_mixed_virtio_0, Source: host_mixed_3, Destination: host_mixed_1, Reason: Load balancing). Jan 4, 2017 12:10:20 PM Migration completed (VM: golden_env_mixed_virtio_0, Source: host_mixed_1, Destination: host_mixed_3, Duration: 4 seconds, Total: 4 seconds, Actual downtime: (N/A)) Jan 4, 2017 12:10:16 PM Migration initiated by system (VM: golden_env_mixed_virtio_0, Source: host_mixed_1, Destination: host_mixed_3, Reason: Affinity rules enforcement). Jan 4, 2017 12:10:00 PM Migration completed (VM: golden_env_mixed_virtio_0, Source: host_mixed_3, Destination: host_mixed_1, Duration: 5 seconds, Total: 5 seconds, Actual downtime: (N/A)) Jan 4, 2017 12:09:56 PM Migration initiated by system (VM: golden_env_mixed_virtio_0, Source: host_mixed_3, Destination: host_mixed_1, Reason: Load balancing). Expected results: Engine must prevent such behavior Additional info:
Verified on rhevm-4.1.0.2-0.2.el7.noarch Checked that no loop appears for power_saving, even_distribution and even_vm_distribution