AvailabilityZoneFilter keeps all hosts in default availability zone

Bug #1306602 reported by Marc Koderer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Marc Koderer

Bug Description

Problem:
-----------

If a host is part of an availability zone (AZ) it should not be part of the default availability zone.
Otherwise scheduling hosts by default will be spread across AZs if this is not specified in
the CLI.

Steps to reproduce:
--------------------------

 1.) Create AZ:
   nova aggregate-create test01 test01
 2.) Start a vm without the AZ parameter:
  nova boot "testvm" --flavor 1 --image 581a7392-587a-4eac-849d-0536243cd0b4
 3.) VM will (potentially) be started on compute node test01 even though it's not part of the default AZ

Hints:
------
If --availability-zone is not set in CLI the metadata dict will contain {.. availability-zone=None..}.

Marc Koderer (m-koderer)
Changed in nova:
assignee: nobody → Marc Koderer (m-koderer)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/87247

Changed in nova:
status: New → In Progress
Revision history for this message
Huang Zhiteng (zhiteng-huang) wrote :

My understanding is host aggregate is different from availability zone. So this doesn't seem like a valid bug.

Revision history for this message
Marc Koderer (m-koderer) wrote :

Thanks Huang for pointing to the right code snippet.
There is no default setting for default_schedule_zone and that's why the AZ doesn't filter anythig if no parameter is given in the CLI.

Revision history for this message
Marc Koderer (m-koderer) wrote :

@Huang: setting the default_schedule_zone does not solve the problem:

Problem:
-------

 1.) Setting default_schedule_zone to nova:

cat /etc/nova/nova.conf |grep schedule_zone
default_schedule_zone=nova

 2.) The function _handle_availability_zone in nova-api will return "nova" as AZ
 3.) But function host_passes() in availability_zone_filter.py has still "None" as result of props.get('availability_zone')

Revision history for this message
Marc Koderer (m-koderer) wrote :

Setting default_schedule_zone helped. Seems I missed rebooting the nova-api service.

But set to invalid.

Changed in nova:
status: In Progress → Invalid
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.