<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Did you enable the AvailabilityZoneFilter in nova.conf that the scheduler uses? And enable the FilterScheduler? These are two common issues related to this.</div><div><br></div><div>- Joe<br></div><div><br>On Dec 21, 2014, at 10:28 AM, Danny Choi (dannchoi) <<a href="mailto:dannchoi@cisco.com">dannchoi@cisco.com</a>> wrote:<br><br></div><blockquote type="cite"><div>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<div style="font-size: 14px; font-family: Calibri, sans-serif; color: rgb(0, 0, 0);">
Hi,</div>
<div style="font-size: 14px; font-family: Calibri, sans-serif; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-size: 14px; font-family: Calibri, sans-serif; color: rgb(0, 0, 0);">
I have a multi-node setup with 2 compute hosts, qa5 and qa6.</div>
<div style="font-size: 14px; font-family: Calibri, sans-serif; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-size: 14px; font-family: Calibri, sans-serif; color: rgb(0, 0, 0);">
I created 2 host-aggregate, each with its own availability zone, and assigned one compute host:</div>
<div style="font-size: 14px; font-family: Calibri, sans-serif; color: rgb(0, 0, 0);">
<br>
</div>
<div>
<p style="margin: 0px;">localadmin@qa4:~/devstack$ nova aggregate-details host-aggregate-zone-1</p>
<p style="margin: 0px;">+----+-----------------------+-------------------+-------+--------------------------+</p>
<p style="margin: 0px;">| Id | Name | Availability Zone | Hosts | Metadata |</p>
<p style="margin: 0px;">+----+-----------------------+-------------------+-------+--------------------------+</p>
<p style="margin: 0px;">| 9 | <b>host-aggregate-zone-1</b> | <b>az-1</b> | '<b>qa5</b>' | 'availability_zone=az-1' |</p>
<p style="margin: 0px;">+----+-----------------------+-------------------+-------+--------------------------+</p>
<p style="margin: 0px;">localadmin@qa4:~/devstack$ nova aggregate-details host-aggregate-zone-2</p>
<p style="margin: 0px;">+----+-----------------------+-------------------+-------+--------------------------+</p>
<p style="margin: 0px;">| Id | Name | Availability Zone | Hosts | Metadata |</p>
<p style="margin: 0px;">+----+-----------------------+-------------------+-------+--------------------------+</p>
<p style="margin: 0px;">| 10 | <b>host-aggregate-zone-2</b> | <b>az-2 </b> | '<b>qa6</b>' | 'availability_zone=az-2' |</p>
<p style="margin: 0px;">+----+-----------------------+-------------------+-------+—————————————+</p>
<p style="margin: 0px;"><br>
</p>
<p style="margin: 0px;">My intent is to control at which compute host to launch a VM via the host-aggregate’s availability-zone parameter.</p>
<p style="margin: 0px;"><br>
</p>
<p style="margin: 0px;">To test, for vm-1, I specify --availiability-zone=az-1, and --availiability-zone=az-2 for vm-2:</p>
<p style="margin: 0px;"><br>
</p>
<p style="margin: 0px;">localadmin@qa4:~/devstack$ <b>nova boot --image cirros-0.3.2-x86_64-uec --flavor 1 --nic net-id=5da9d715-19fd-47c7-9710-e395b5b90442 --availability-zone az-1 vm-1</b></p>
<p style="margin: 0px;">+--------------------------------------+----------------------------------------------------------------+</p>
<p style="margin: 0px;">| Property | Value |</p>
<p style="margin: 0px;">+--------------------------------------+----------------------------------------------------------------+</p>
<p style="margin: 0px;">| OS-DCF:diskConfig | MANUAL |</p>
<p style="margin: 0px;">| OS-EXT-AZ:availability_zone | nova |</p>
<p style="margin: 0px;">| OS-EXT-SRV-ATTR:host | - |</p>
<p style="margin: 0px;">| OS-EXT-SRV-ATTR:hypervisor_hostname | - |</p>
<p style="margin: 0px;">| OS-EXT-SRV-ATTR:instance_name | instance-00000066 |</p>
<p style="margin: 0px;">| OS-EXT-STS:power_state | 0 |</p>
<p style="margin: 0px;">| OS-EXT-STS:task_state | - |</p>
<p style="margin: 0px;">| OS-EXT-STS:vm_state | building |</p>
<p style="margin: 0px;">| OS-SRV-USG:launched_at | - |</p>
<p style="margin: 0px;">| OS-SRV-USG:terminated_at | - |</p>
<p style="margin: 0px;">| accessIPv4 | |</p>
<p style="margin: 0px;">| accessIPv6 | |</p>
<p style="margin: 0px;">| adminPass | kxot3ZBZcBH6 |</p>
<p style="margin: 0px;">| config_drive | |</p>
<p style="margin: 0px;">| created | 2014-12-21T15:59:03Z |</p>
<p style="margin: 0px;">| flavor | m1.tiny (1) |</p>
<p style="margin: 0px;">| hostId | |</p>
<p style="margin: 0px;">| id | 854acae9-b718-4ea5-bc28-e0bc46378b60 |</p>
<p style="margin: 0px;">| image | cirros-0.3.2-x86_64-uec (61409a53-305c-4022-978b-06e55052875b) |</p>
<p style="margin: 0px;">| key_name | - |</p>
<p style="margin: 0px;">| metadata | {} |</p>
<p style="margin: 0px;">| name | vm-1 |</p>
<p style="margin: 0px;">| os-extended-volumes:volumes_attached | [] |</p>
<p style="margin: 0px;">| progress | 0 |</p>
<p style="margin: 0px;">| security_groups | default |</p>
<p style="margin: 0px;">| status | BUILD |</p>
<p style="margin: 0px;">| tenant_id | 84827057a7444354b0bff11566ccb80b |</p>
<p style="margin: 0px;">| updated | 2014-12-21T15:59:03Z |</p>
<p style="margin: 0px;">| user_id | 9d5fd9947d154a2db396fce177f1f83c |</p>
<p style="margin: 0px;">+--------------------------------------+----------------------------------------------------------------+</p>
<p style="margin: 0px;">localadmin@qa4:~/devstack$ <b>nova boot --image cirros-0.3.2-x86_64-uec --flavor 1 --nic net-id=5da9d715-19fd-47c7-9710-e395b5b90442 --availability-zone az-2 vm-2</b></p>
<p style="margin: 0px;">+--------------------------------------+----------------------------------------------------------------+</p>
<p style="margin: 0px;">| Property | Value |</p>
<p style="margin: 0px;">+--------------------------------------+----------------------------------------------------------------+</p>
<p style="margin: 0px;">| OS-DCF:diskConfig | MANUAL |</p>
<p style="margin: 0px;">| OS-EXT-AZ:availability_zone | nova |</p>
<p style="margin: 0px;">| OS-EXT-SRV-ATTR:host | - |</p>
<p style="margin: 0px;">| OS-EXT-SRV-ATTR:hypervisor_hostname | - |</p>
<p style="margin: 0px;">| OS-EXT-SRV-ATTR:instance_name | instance-00000067 |</p>
<p style="margin: 0px;">| OS-EXT-STS:power_state | 0 |</p>
<p style="margin: 0px;">| OS-EXT-STS:task_state | scheduling |</p>
<p style="margin: 0px;">| OS-EXT-STS:vm_state | building |</p>
<p style="margin: 0px;">| OS-SRV-USG:launched_at | - |</p>
<p style="margin: 0px;">| OS-SRV-USG:terminated_at | - |</p>
<p style="margin: 0px;">| accessIPv4 | |</p>
<p style="margin: 0px;">| accessIPv6 | |</p>
<p style="margin: 0px;">| adminPass | 2kXQpV2u9TVv |</p>
<p style="margin: 0px;">| config_drive | |</p>
<p style="margin: 0px;">| created | 2014-12-21T15:59:55Z |</p>
<p style="margin: 0px;">| flavor | m1.tiny (1) |</p>
<p style="margin: 0px;">| hostId | |</p>
<p style="margin: 0px;">| id | ce1b5dca-a844-4c59-bb00-39a617646c59 |</p>
<p style="margin: 0px;">| image | cirros-0.3.2-x86_64-uec (61409a53-305c-4022-978b-06e55052875b) |</p>
<p style="margin: 0px;">| key_name | - |</p>
<p style="margin: 0px;">| metadata | {} |</p>
<p style="margin: 0px;">| name | vm-2 |</p>
<p style="margin: 0px;">| os-extended-volumes:volumes_attached | [] |</p>
<p style="margin: 0px;">| progress | 0 |</p>
<p style="margin: 0px;">| security_groups | default |</p>
<p style="margin: 0px;">| status | BUILD |</p>
<p style="margin: 0px;">| tenant_id | 84827057a7444354b0bff11566ccb80b |</p>
<p style="margin: 0px;">| updated | 2014-12-21T15:59:55Z |</p>
<p style="margin: 0px;">| user_id | 9d5fd9947d154a2db396fce177f1f83c |</p>
<p style="margin: 0px;">+--------------------------------------+————————————————————————————————+</p>
<p style="margin: 0px;"><br>
</p>
<p style="margin: 0px;">However, both VMs ended up at compute host qa5:</p>
<p style="margin: 0px;"><br>
</p>
<p style="margin: 0px;">localadmin@qa4:~/devstack$ nova hypervisor-servers q</p>
<p style="margin: 0px;">+--------------------------------------+-------------------+---------------+---------------------+</p>
<p style="margin: 0px;">| ID | Name | Hypervisor ID | Hypervisor Hostname |</p>
<p style="margin: 0px;">+--------------------------------------+-------------------+---------------+---------------------+</p>
<p style="margin: 0px;">| 854acae9-b718-4ea5-bc28-e0bc46378b60 | instance-00000066 | 1 | qa5 |</p>
<p style="margin: 0px;">| ce1b5dca-a844-4c59-bb00-39a617646c59 | instance-00000067 | 1 | qa5 |</p>
<p style="margin: 0px;"></p>
<p style="margin: 0px;">+--------------------------------------+-------------------+---------------+---------------------+</p>
<p style="margin: 0px;">localadmin@qa4:~/devstack$ nova show vm-1</p>
<p style="margin: 0px;">+--------------------------------------+----------------------------------------------------------------+</p>
<p style="margin: 0px;">| Property | Value |</p>
<p style="margin: 0px;">+--------------------------------------+----------------------------------------------------------------+</p>
<p style="margin: 0px;">| OS-DCF:diskConfig | MANUAL |</p>
<p style="margin: 0px;">| OS-EXT-AZ:availability_zone | az-1 |</p>
<p style="margin: 0px;">| OS-EXT-SRV-ATTR:host | qa5 |</p>
<p style="margin: 0px;">| OS-EXT-SRV-ATTR:hypervisor_hostname | qa5 |</p>
<p style="margin: 0px;">| OS-EXT-SRV-ATTR:instance_name | instance-00000066 |</p>
<p style="margin: 0px;">| OS-EXT-STS:power_state | 1 |</p>
<p style="margin: 0px;">| OS-EXT-STS:task_state | - |</p>
<p style="margin: 0px;">| OS-EXT-STS:vm_state | active |</p>
<p style="margin: 0px;">| OS-SRV-USG:launched_at | 2014-12-21T16:03:15.000000 |</p>
<p style="margin: 0px;">| OS-SRV-USG:terminated_at | - |</p>
<p style="margin: 0px;">| accessIPv4 | |</p>
<p style="margin: 0px;">| accessIPv6 | |</p>
<p style="margin: 0px;">| config_drive | |</p>
<p style="margin: 0px;">| created | 2014-12-21T15:59:03Z |</p>
<p style="margin: 0px;">| flavor | m1.tiny (1) |</p>
<p style="margin: 0px;">| hostId | 89119faac9345b51f185bd8b6c2e091644f1544cd523067ecce64613 |</p>
<p style="margin: 0px;">| id | 854acae9-b718-4ea5-bc28-e0bc46378b60 |</p>
<p style="margin: 0px;">| image | cirros-0.3.2-x86_64-uec (61409a53-305c-4022-978b-06e55052875b) |</p>
<p style="margin: 0px;">| key_name | - |</p>
<p style="margin: 0px;">| metadata | {} |</p>
<p style="margin: 0px;">| name | vm-1 |</p>
<p style="margin: 0px;">| os-extended-volumes:volumes_attached | [] |</p>
<p style="margin: 0px;">| private network | 10.0.0.70 |</p>
<p style="margin: 0px;">| progress | 0 |</p>
<p style="margin: 0px;">| security_groups | default |</p>
<p style="margin: 0px;">| status | ACTIVE |</p>
<p style="margin: 0px;">| tenant_id | 84827057a7444354b0bff11566ccb80b |</p>
<p style="margin: 0px;">| updated | 2014-12-21T15:59:11Z |</p>
<p style="margin: 0px;">| user_id | 9d5fd9947d154a2db396fce177f1f83c |</p>
<p style="margin: 0px;">+--------------------------------------+----------------------------------------------------------------+</p>
<p style="margin: 0px;">localadmin@qa4:~/devstack$ nova show vm-2</p>
<p style="margin: 0px;">+--------------------------------------+----------------------------------------------------------------+</p>
<p style="margin: 0px;">| Property | Value |</p>
<p style="margin: 0px;">+--------------------------------------+----------------------------------------------------------------+</p>
<p style="margin: 0px;">| OS-DCF:diskConfig | MANUAL |</p>
<p style="margin: 0px;">| OS-EXT-AZ:availability_zone | az-1 |</p>
<p style="margin: 0px;">| OS-EXT-SRV-ATTR:host | qa5 |</p>
<p style="margin: 0px;">| OS-EXT-SRV-ATTR:hypervisor_hostname | qa5 |</p>
<p style="margin: 0px;">| OS-EXT-SRV-ATTR:instance_name | instance-00000067 |</p>
<p style="margin: 0px;">| OS-EXT-STS:power_state | 0 |</p>
<p style="margin: 0px;">| OS-EXT-STS:task_state | spawning |</p>
<p style="margin: 0px;">| OS-EXT-STS:vm_state | building |</p>
<p style="margin: 0px;">| OS-SRV-USG:launched_at | - |</p>
<p style="margin: 0px;">| OS-SRV-USG:terminated_at | - |</p>
<p style="margin: 0px;">| accessIPv4 | |</p>
<p style="margin: 0px;">| accessIPv6 | |</p>
<p style="margin: 0px;">| config_drive | |</p>
<p style="margin: 0px;">| created | 2014-12-21T15:59:55Z |</p>
<p style="margin: 0px;">| flavor | m1.tiny (1) |</p>
<p style="margin: 0px;">| hostId | 89119faac9345b51f185bd8b6c2e091644f1544cd523067ecce64613 |</p>
<p style="margin: 0px;">| id | ce1b5dca-a844-4c59-bb00-39a617646c59 |</p>
<p style="margin: 0px;">| image | cirros-0.3.2-x86_64-uec (61409a53-305c-4022-978b-06e55052875b) |</p>
<p style="margin: 0px;">| key_name | - |</p>
<p style="margin: 0px;">| metadata | {} |</p>
<p style="margin: 0px;">| name | vm-2 |</p>
<p style="margin: 0px;">| os-extended-volumes:volumes_attached | [] |</p>
<p style="margin: 0px;">| private network | 10.0.0.71 |</p>
<p style="margin: 0px;">| progress | 0 |</p>
<p style="margin: 0px;">| security_groups | default |</p>
<p style="margin: 0px;">| status | BUILD |</p>
<p style="margin: 0px;">| tenant_id | 84827057a7444354b0bff11566ccb80b |</p>
<p style="margin: 0px;">| updated | 2014-12-21T15:59:56Z |</p>
<p style="margin: 0px;">| user_id | 9d5fd9947d154a2db396fce177f1f83c |</p>
<p style="margin: 0px;">+--------------------------------------+----------------------------------------------------------------+</p>
<p style="margin: 0px;"><br>
</p>
<p style="margin: 0px;">Is it supposed to work this way? Do I missed something here?</p>
<p style="margin: 0px;"><br>
</p>
<p style="margin: 0px;">Thanks,</p>
<p style="margin: 0px;">Danny</p>
</div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>OpenStack-dev mailing list</span><br><span><a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a></span><br><span><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a></span><br></div></blockquote></body></html>