← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1201277] Re: aggregate_get_by_host returns aggregates from other hosts

 

** Changed in: nova/grizzly
       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/1201277

Title:
  aggregate_get_by_host returns aggregates from other hosts

Status in OpenStack Compute (Nova):
  Fix Committed
Status in OpenStack Compute (nova) grizzly series:
  Fix Released

Bug description:
  This is basically a continuation of:

  https://bugs.launchpad.net/nova/+bug/1187708

  The fix for that bug seems to only fix the case of aggregates with no
  hosts being included. If aggregates with a different host exist they
  are also included in the returned list. An inner joinedload happened
  to fix the no-hosts case but the host filter is still applied
  inconsistently due to the lack of an explicit join on AggregateHost.
  By the look of the query generated it also returns deleted hosts.

  
  rmm0811's comment from the other bug:
  """
  I encountered the same problem on grizzly version. And I change the api.py follow the commited.
  Howerver, it is also not work well.

  According the document of sqlalchemy, query options.(joinedload(c)) is not really join.
  query.filter(models.AggregateHost.host == host) can not work.

  http://github.com/openstack/nova/commit/7fadc012939faf063bbe9ad3a2f35067ce16a4b2

  nova/db/sqlalchemy/api.py
  The line number 4625 need to change like this:
  query = query.join("_host").filter(models.AggregateHost.host == host)

  nova/tests/db/test_db_api.py
  need to add the assert " as is not in result set"
  """

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