← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1218878] Re: GroupAffinityFilter and GroupAntiAffinityFilter filters are broken

 

** Changed in: nova
       Status: Fix Committed => Fix Released

-- 
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/1218878

Title:
  GroupAffinityFilter and GroupAntiAffinityFilter filters are broken

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  My test environment has 2 compute nodes: compute1 and compute3. First, I launch 1 instance (not being tied to any group) on each node:
  $ nova boot --flavor m1.tiny --image cirros-0.3.1-x86_64-uec --key-name local --availability-zone nova:compute1 vm-compute1-nogroup
  $ nova boot --flavor m1.tiny --image cirros-0.3.1-x86_64-uec --key-name local --availability-zone nova:compute3 vm-compute3-nogroup

  So far so good, everything's active:
  $ nova list
  +--------------------------------------+---------------------+--------+------------+-------------+------------------+
  | ID                                   | Name                | Status | Task State | Power State | Networks         |
  +--------------------------------------+---------------------+--------+------------+-------------+------------------+
  | 3a465024-85e7-4e80-99a9-ccef3a4f41d5 | vm-compute1-nogroup | ACTIVE | None       | Running     | private=10.0.0.3 |
  | c838e0c4-3b4f-4030-b2a2-b21305c0f3ea | vm-compute3-nogroup | ACTIVE | None       | Running     | private=10.0.0.4 |
  +--------------------------------------+---------------------+--------+------------+-------------+------------------+

  Then I try to launch one instance in group 'foo' but it fails:
  $ nova boot --flavor m1.tiny --image cirros-0.3.1-x86_64-uec --key-name local --availability-zone nova:compute3 vm-compute3-nogroup
  $ nova list
  +--------------------------------------+---------------------+--------+------------+-------------+------------------+
  | ID                                   | Name                | Status | Task State | Power State | Networks         |
  +--------------------------------------+---------------------+--------+------------+-------------+------------------+
  | 3a465024-85e7-4e80-99a9-ccef3a4f41d5 | vm-compute1-nogroup | ACTIVE | None       | Running     | private=10.0.0.3 |
  | c838e0c4-3b4f-4030-b2a2-b21305c0f3ea | vm-compute3-nogroup | ACTIVE | None       | Running     | private=10.0.0.4 |
  | 743fa564-f38f-4f44-9913-d8adcae955a0 | vm1-foo             | ERROR  | None       | NOSTATE     |                  |
  +--------------------------------------+---------------------+--------+------------+-------------+------------------+

  I've pasted the scheduler logs [1] and my nova.conf file [2]. As you
  will see, the log message is there but it looks like group_hosts() [3]
  is returning all my hosts instead of only the ones that run instances
  from the group.

  [1] http://paste.openstack.org/show/45672/
  [2] http://paste.openstack.org/show/45671/
  [3] https://github.com/openstack/nova/blob/60a91f475a352e5e86bbd07b510cb32874110fef/nova/scheduler/driver.py#L137

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