Instances should not have soft-affinity with themselves.

Bug #1564559 reported by Mark Doffman
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Low
Unassigned

Bug Description

When migrating instances should not have affinity with themselves.

This is most clearly seen with hard anti-affinity as an instance attempting to migrate to the same host would be unable to do so due to the presence of 'itself' on the host. (See bug #1558532).

In the soft-affinity case the consequences are not so dire, but can lead to incorrect weights being calculated. This is due to the fact that the soft affinity weigher counts the instance that is being migrated when looking at the number of instances from the group on a host.

See: https://github.com/openstack/nova/blob/master/nova/scheduler/weights/affinity.py#L49

Tags: scheduler
Mark Doffman (mjdoffma)
Changed in nova:
importance: Undecided → Low
assignee: nobody → Mark Doffman (mjdoffma)
tags: added: scheduler
Revision history for this message
Charlotte Han (hanrong) wrote :

related to https://bugs.launchpad.net/nova/+bug/1558532

I think this patch can modify this question.

https://review.openstack.org/#/c/299045/1/nova/scheduler/utils.py make instance's host is not contained with members = set(request_spec.instance_group.members).

But this patch Solution had been denied, because we don't this this _SoftAffinityWeigherBase.

Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

Solving an inconsistency: This bug report has an assignee and it looks
like this will result in a patch. Therefore I switch the status to
"In Progress".
Dear assignee, please provide a patch in the next 2 weeks. If you stop
working on this report, please remove yourself as assignee and switch
the status back. If you need assistance, reach out on the IRC channel
#openstack-nova or use the mailing list.

Changed in nova:
status: New → In Progress
Revision history for this message
Sujitha (sujitha-neti) wrote :

Its been a while this bug has been assigned and no patch was submitted. Removing assignee.

Changed in nova:
assignee: Mark Doffman (mjdoffma) → nobody
status: In Progress → New
Charlotte Han (hanrong)
Changed in nova:
assignee: nobody → Charlotte Han (hanrong)
Revision history for this message
Pushkar Umaranikar (pushkar-umaranikar) wrote :

Solving Inconsistency: Since bug has priority set, Changing status from "new" to "confirmed".

Changed in nova:
status: New → Confirmed
Charlotte Han (hanrong)
Changed in nova:
assignee: Charlotte Han (hanrong) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.