Activity log for bug #1870096

Date Who What changed Old value New value Message
2020-04-01 09:45:59 Johannes Kulik bug added bug
2020-04-01 09:50:24 OpenStack Infra nova: status New In Progress
2020-04-01 09:50:24 OpenStack Infra nova: assignee Johannes Kulik (jkulik)
2020-04-01 11:48:07 Johannes Kulik description Description =========== When using soft-affinity to schedule instances on the same host, the weight is unexpectedly low if a server was previously scheduled to any server-group with more members on a host. Steps to reproduce ================== Do not restart nova-scheduler in the process or the bug doesn't appear. * Create a server-group with soft-affinity (let's call it A) * Create 6 servers in server-group A, one after the other so they end up on the same host. * Create another server-group with soft-affinity (B) * Create 1 server in server-group B * Create 1 server in server-group B and look at the scheduler's weights assigned to the hosts by the ServerGroupSoftAffinityWeigher. Expected result =============== The weight assigned to the host by the ServerGroupSoftAffinityWeigher should be 1, as the maximum number of instances for server-group B is on that host (the one we created there before). Actual result ============= The weight assigned to the host by the ServerGroupSoftAffinityWeigher is 0.2, as the maximum number of instances ever encountered on a host is 5. Environment =========== We noticed this on a queens version of nova a year ago. Can't give the exact commit anymore, but the code still looks broken in current master. I've opened a review-request for fixing this bug here: https://review.opendev.org/#/c/713863/ Description =========== When using soft-affinity to schedule instances on the same host, the weight is unexpectedly low if a server was previously scheduled to any server-group with more members on a host. This low weight can then be easily outweighed by differences in resources (e.g. RAM/CPU). Steps to reproduce ================== Do not restart nova-scheduler in the process or the bug doesn't appear. You need to change the ServerGroupSoftAffinityWeigher to actually log the weights it computes to see the problem. * Create a server-group with soft-affinity (let's call it A) * Create 6 servers in server-group A, one after the other so they end up on the same host. * Create another server-group with soft-affinity (B) * Create 1 server in server-group B * Create 1 server in server-group B and look at the scheduler's weights assigned to the hosts by the ServerGroupSoftAffinityWeigher. Expected result =============== The weight assigned to the host by the ServerGroupSoftAffinityWeigher should be 1, as the maximum number of instances for server-group B is on that host (the one we created there before). Actual result ============= The weight assigned to the host by the ServerGroupSoftAffinityWeigher is 0.2, as the maximum number of instances ever encountered on a host is 5. Environment =========== We noticed this on a queens version of nova a year ago. Can't give the exact commit anymore, but the code still looks broken in current master. I've opened a review-request for fixing this bug here: https://review.opendev.org/#/c/713863/
2020-04-01 15:39:30 Balazs Gibizer nominated for series nova/train
2020-04-01 15:39:30 Balazs Gibizer bug task added nova/train
2020-04-01 15:39:30 Balazs Gibizer nominated for series nova/pike
2020-04-01 15:39:30 Balazs Gibizer bug task added nova/pike
2020-04-01 15:39:30 Balazs Gibizer nominated for series nova/stein
2020-04-01 15:39:30 Balazs Gibizer bug task added nova/stein
2020-04-01 15:39:30 Balazs Gibizer nominated for series nova/rocky
2020-04-01 15:39:30 Balazs Gibizer bug task added nova/rocky
2020-04-01 15:39:30 Balazs Gibizer nominated for series nova/queens
2020-04-01 15:39:30 Balazs Gibizer bug task added nova/queens
2020-04-01 15:39:41 Balazs Gibizer nova: importance Undecided Medium
2020-04-01 15:39:54 Balazs Gibizer tags scheduler
2020-06-01 15:10:34 OpenStack Infra nova: status In Progress Fix Released