this  bug doesn't make sense. Furthermore, this is actually a valid behavior 
IMHO.
I don't see why a host can't be part of two AZs.
AZs are internally defined as a special metadata key/value in an aggregate 
(availability_zone key in metadata).
The bug says "Two host aggregates in same AZ(availability zone) have same 
compute node." This doesn't make sense. host aggregates with the 
availability_zone key set in metadata are AZs and cannot 'belong to an AZ'.
So this test, and the related bug are actually creating two host_aggregates 
that represent the same AZ. Which is a bad idea. And then changing one of the 
AZs.

Copied from my comments on the fix:
https://review.openstack.org/#/c/154593/4

** Changed in: nova
       Status: In Progress => Invalid

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

Title:
  A compute node can belong to host aggregates in defferent AZs

Status in OpenStack Compute (Nova):
  Invalid

Bug description:
  Environment:
  nova 2014.2.1
  python-novaclient 2.20.0
  Ubuntu 14.04.1 LTS

  Two host aggregates in same AZ(availability zone) have same compute node.
  And then one host aggregate is updated to a different AZ.
  As a result, the compute node belongs to host aggregates in defferent AZs at 
the same time.

  [Steps to Reproduce]
  stack@devstack-juno:/opt/devstack$ nova aggregate-list
  +----+------+-------------------+
  | Id | Name | Availability Zone |
  +----+------+-------------------+
  | 1  | agg1 | AZ1               |
  | 2  | agg2 | AZ1               |
  +----+------+-------------------+
  stack@devstack-juno:/opt/devstack$ nova aggregate-details agg1
  +----+------+-------------------+-----------------+-------------------------+
  | Id | Name | Availability Zone | Hosts           | Metadata                |
  +----+------+-------------------+-----------------+-------------------------+
  | 1  | agg1 | AZ1               | 'devstack-juno' | 'availability_zone=AZ1' |
  +----+------+-------------------+-----------------+-------------------------+
  stack@devstack-juno:/opt/devstack$ nova aggregate-details agg2
  +----+------+-------------------+-----------------+-------------------------+
  | Id | Name | Availability Zone | Hosts           | Metadata                |
  +----+------+-------------------+-----------------+-------------------------+
  | 2  | agg2 | AZ1               | 'devstack-juno' | 'availability_zone=AZ1' |
  +----+------+-------------------+-----------------+-------------------------+
  stack@devstack-juno:/opt/devstack$ nova aggregate-update agg2 agg2 AZ2
  Aggregate 2 has been successfully updated.
  +----+------+-------------------+-----------------+-------------------------+
  | Id | Name | Availability Zone | Hosts           | Metadata                |
  +----+------+-------------------+-----------------+-------------------------+
  | 2  | agg2 | AZ2               | 'devstack-juno' | 'availability_zone=AZ2' |
  +----+------+-------------------+-----------------+-------------------------+
  stack@devstack-juno:/opt/devstack$ nova aggregate-details agg1
  +----+------+-------------------+-----------------+-------------------------+
  | Id | Name | Availability Zone | Hosts           | Metadata                |
  +----+------+-------------------+-----------------+-------------------------+
  | 1  | agg1 | AZ1               | 'devstack-juno' | 'availability_zone=AZ1' |
  +----+------+-------------------+-----------------+-------------------------+
  stack@devstack-juno:/opt/devstack$ nova aggregate-details agg2
  +----+------+-------------------+-----------------+-------------------------+
  | Id | Name | Availability Zone | Hosts           | Metadata                |
  +----+------+-------------------+-----------------+-------------------------+
  | 2  | agg2 | AZ2               | 'devstack-juno' | 'availability_zone=AZ2' |
  +----+------+-------------------+-----------------+-------------------------+

  Because the cause of the bug is wrong check logic in is_safe_to_update_az 
method in nova/compute/api.py,
  the bug would occur in master.

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to