← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1870096] Re: soft-affinity weight not normalized base on server group's maximum

 

** Also affects: nova/train
   Importance: Undecided
       Status: New

** Also affects: nova/pike
   Importance: Undecided
       Status: New

** Also affects: nova/stein
   Importance: Undecided
       Status: New

** Also affects: nova/rocky
   Importance: Undecided
       Status: New

** Also affects: nova/queens
   Importance: Undecided
       Status: New

** Changed in: nova
   Importance: Undecided => Medium

** Tags added: scheduler

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1870096

Title:
  soft-affinity weight not normalized base on server group's maximum

Status in OpenStack Compute (nova):
  In Progress
Status in OpenStack Compute (nova) pike series:
  New
Status in OpenStack Compute (nova) queens series:
  New
Status in OpenStack Compute (nova) rocky series:
  New
Status in OpenStack Compute (nova) stein series:
  New
Status in OpenStack Compute (nova) train series:
  New

Bug 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. 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/

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1870096/+subscriptions


References