Bug 1014948

Summary: GroupAntiAffinityFilter filters are broken
Product: Red Hat OpenStack Reporter: Dharmit Shah <dshah>
Component: openstack-novaAssignee: Xavier Queralt <xqueralt>
Status: CLOSED ERRATA QA Contact: Gabriel Szasz <gszasz>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: ajeain, dallan, dmaley, ndipanov, sankarshan, sclewis, sgordon, slong, xqueralt, yeylon
Target Milestone: z4Keywords: Triaged, ZStream
Target Release: 3.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: openstack-nova-2013.1.4-2.el6ost Doc Type: Bug Fix
Doc Text:
When using GroupAntiAffinityFilter, the scheduler was not filtering instances in the group, which could cause an instance to not be scheduled at all if a group was specified on boot. With this fix, groups are taken into account and the instance is scheduled as expected.
Story Points: ---
Clone Of:
: 1039688 (view as bug list) Environment:
Last Closed: 2014-01-30 19:59:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1039688    

Description Dharmit Shah 2013-10-03 07:47:19 UTC
Description of problem:
GroupAffinityFilter doesn't work as expected.

There's an upstream bug https://bugs.launchpad.net/nova/+bug/1218878 tracking the issue about GroupAffinityFilter and GroupAntiAffinityFilter. Commit for the same is proposed in https://github.com/openstack/nova/commit/4233e16ba2f5bb85e93494b6eeb9ffff31dbdf30

Version-Release number of selected component (if applicable):
RHOS 3.0

How reproducible:

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Xavier Queralt 2013-11-06 11:23:02 UTC
There is already a backport of the patch for grizzly upstream, if it gets in we'll get it in the next rebase.

Comment 2 Xavier Queralt 2013-12-02 20:22:28 UTC
How to reproduce:

1. Deploy openstack with two compute nodes (compute1 and compute2).
2. Set the key 'scheduler_default_filters' in /etc/nova/nova.conf to have the following filters:
  * AvailabilityZoneFilter,RamFilter,ComputeFilter,GroupAntiAffinityFilter
3. Restart the scheduler:
  * service openstack-nova-scheduler restart
4. Start two instances, one on each compute node:
  * nova boot --image cirros --flavor m1.tiny --availability-zone nova:compute1 vm-compute1
  * nova boot --image cirros --flavor m1.tiny --availability-zone nova:compute2 vm-compute2
5. Start another instance in a group:
  * nova boot --image cirros --flavor m1.tiny --hint group=foo vm-compute
6. Without the fix the instance will move to the ERROR state and a WARNING will appear in scheduler.log.

Comment 4 Stephen Gordon 2013-12-09 19:23:25 UTC
Xavier, how is group "foo" actually defined (and the policy set)? I thought the API for this didn't get accepted yet?

Comment 5 Xavier Queralt 2013-12-10 08:24:53 UTC
In 3.0 only the GroupAntiAffinityFilter exists.

Comment 6 Xavier Queralt 2013-12-10 08:42:57 UTC
(In reply to Stephen Gordon from comment #4)
> Xavier, how is group "foo" actually defined (and the policy set)? I thought
> the API for this didn't get accepted yet?

Until the blueprint linked from bug 978507 is completed (expected for Icehouse), the group's policy will be defined by the group filter the scheduler is using. In Havana both affinity and anti affinity filters are available, while in Grizzly only the anti affinity exists.

Comment 8 Ami Jeain 2014-01-27 11:02:55 UTC
verified according to https://bugzilla.redhat.com/show_bug.cgi?id=1014948#c2:
I have now successfully created 2 instances in group, 2 in each one of the computes.
No errors found in nova (scheduler and compute)

Comment 10 errata-xmlrpc 2014-01-30 19:59:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2014-0112.html