[openstack-dev] [qa] host aggregate's availability zone

Robert Li (baoli) baoli at cisco.com
Tue Dec 23 14:42:26 UTC 2014


Hi Danny,

check this link out.
https://wiki.openstack.org/wiki/Scheduler_Filters

Add the following into your /etc/nova/nova.conf before starting the nova service.

scheduler_default_filters = RetryFilter, AvailabilityZoneFilter, RamFilter, ComputeFilter, ComputeCapabilitiesFilter, ImagePropertiesFilter, ServerGroupAntiAffinityFilter, ServerGroupAffinityFilter, AvailabilityZoneFilter

Or, You can do so in your local.conf
[[post-config|$NOVA_CONF]]
[DEFAULT]
pci_alias={"name":"cisco","vendor_id":"8086","product_id":"10ed"}
scheduler_default_filters = RetryFilter, AvailabilityZoneFilter, RamFilter, ComputeFilter, ComputeCapabilitiesFilter, ImagePropertiesFilter, ServerGroupAntiAffinityFilter, ServerGroupAffinityFilter, AvailabilityZoneFilter


—Robert

On 12/22/14, 9:53 AM, "Danny Choi (dannchoi)" <dannchoi at cisco.com<mailto:dannchoi at cisco.com>> wrote:

Hi Joe,

No, I did not.  I’m not aware of this.

Can you tell me exactly what needs to be done?

Thanks,
Danny

------------------------------

Date: Sun, 21 Dec 2014 11:42:02 -0600
From: Joe Cropper <cropper.joe at gmail.com<mailto:cropper.joe at gmail.com>>
To: "OpenStack Development Mailing List (not for usage questions)"
<openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>>
Subject: Re: [openstack-dev] [qa] host aggregate's availability zone
Message-ID: <B36D2234-BEE0-4C7B-A2B2-A09CC9098416 at gmail.com<mailto:B36D2234-BEE0-4C7B-A2B2-A09CC9098416 at gmail.com>>
Content-Type: text/plain; charset="utf-8"

Did you enable the AvailabilityZoneFilter in nova.conf that the scheduler uses?  And enable the FilterScheduler?  These are two common issues related to this.

- Joe

On Dec 21, 2014, at 10:28 AM, Danny Choi (dannchoi) <dannchoi at cisco.com<mailto:dannchoi at cisco.com>> wrote:
Hi,
I have a multi-node setup with 2 compute hosts, qa5 and qa6.
I created 2 host-aggregate, each with its own availability zone, and assigned one compute host:
localadmin at qa4:~/devstack$ nova aggregate-details host-aggregate-zone-1
+----+-----------------------+-------------------+-------+--------------------------+
| Id | Name                  | Availability Zone | Hosts | Metadata                 |
+----+-----------------------+-------------------+-------+--------------------------+
| 9  | host-aggregate-zone-1 | az-1              | 'qa5' | 'availability_zone=az-1' |
+----+-----------------------+-------------------+-------+--------------------------+
localadmin at qa4:~/devstack$ nova aggregate-details host-aggregate-zone-2
+----+-----------------------+-------------------+-------+--------------------------+
| Id | Name                  | Availability Zone | Hosts | Metadata                 |
+----+-----------------------+-------------------+-------+--------------------------+
| 10 | host-aggregate-zone-2 | az-2              | 'qa6' | 'availability_zone=az-2' |
+----+-----------------------+-------------------+-------+?????????????+
My intent is to control at which compute host to launch a VM via the host-aggregate?s availability-zone parameter.
To test, for vm-1, I specify --availiability-zone=az-1, and --availiability-zone=az-2 for vm-2:
localadmin at qa4:~/devstack$ 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
+--------------------------------------+----------------------------------------------------------------+
| Property                             | Value                                                          |
+--------------------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                                         |
| OS-EXT-AZ:availability_zone          | nova                                                           |
| OS-EXT-SRV-ATTR:host                 | -                                                              |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | -                                                              |
| OS-EXT-SRV-ATTR:instance_name        | instance-00000066                                              |
| OS-EXT-STS:power_state               | 0                                                              |
| OS-EXT-STS:task_state                | -                                                              |
| OS-EXT-STS:vm_state                  | building                                                       |
| OS-SRV-USG:launched_at               | -                                                              |
| OS-SRV-USG:terminated_at             | -                                                              |
| accessIPv4                           |                                                                |
| accessIPv6                           |                                                                |
| adminPass                            | kxot3ZBZcBH6                                                   |
| config_drive                         |                                                                |
| created                              | 2014-12-21T15:59:03Z                                           |
| flavor                               | m1.tiny (1)                                                    |
| hostId                               |                                                                |
| id                                   | 854acae9-b718-4ea5-bc28-e0bc46378b60                           |
| image                                | cirros-0.3.2-x86_64-uec (61409a53-305c-4022-978b-06e55052875b) |
| key_name                             | -                                                              |
| metadata                             | {}                                                             |
| name                                 | vm-1                                                           |
| os-extended-volumes:volumes_attached | []                                                             |
| progress                             | 0                                                              |
| security_groups                      | default                                                        |
| status                               | BUILD                                                          |
| tenant_id                            | 84827057a7444354b0bff11566ccb80b                               |
| updated                              | 2014-12-21T15:59:03Z                                           |
| user_id                              | 9d5fd9947d154a2db396fce177f1f83c                               |
+--------------------------------------+----------------------------------------------------------------+
localadmin at qa4:~/devstack$ 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
+--------------------------------------+----------------------------------------------------------------+
| Property                             | Value                                                          |
+--------------------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                                         |
| OS-EXT-AZ:availability_zone          | nova                                                           |
| OS-EXT-SRV-ATTR:host                 | -                                                              |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | -                                                              |
| OS-EXT-SRV-ATTR:instance_name        | instance-00000067                                              |
| OS-EXT-STS:power_state               | 0                                                              |
| OS-EXT-STS:task_state                | scheduling                                                     |
| OS-EXT-STS:vm_state                  | building                                                       |
| OS-SRV-USG:launched_at               | -                                                              |
| OS-SRV-USG:terminated_at             | -                                                              |
| accessIPv4                           |                                                                |
| accessIPv6                           |                                                                |
| adminPass                            | 2kXQpV2u9TVv                                                   |
| config_drive                         |                                                                |
| created                              | 2014-12-21T15:59:55Z                                           |
| flavor                               | m1.tiny (1)                                                    |
| hostId                               |                                                                |
| id                                   | ce1b5dca-a844-4c59-bb00-39a617646c59                           |
| image                                | cirros-0.3.2-x86_64-uec (61409a53-305c-4022-978b-06e55052875b) |
| key_name                             | -                                                              |
| metadata                             | {}                                                             |
| name                                 | vm-2                                                           |
| os-extended-volumes:volumes_attached | []                                                             |
| progress                             | 0                                                              |
| security_groups                      | default                                                        |
| status                               | BUILD                                                          |
| tenant_id                            | 84827057a7444354b0bff11566ccb80b                               |
| updated                              | 2014-12-21T15:59:55Z                                           |
| user_id                              | 9d5fd9947d154a2db396fce177f1f83c                               |
+--------------------------------------+????????????????????????????????+
However, both VMs ended up at compute host qa5:
localadmin at qa4:~/devstack$ nova hypervisor-servers q
+--------------------------------------+-------------------+---------------+---------------------+
| ID                                   | Name              | Hypervisor ID | Hypervisor Hostname |
+--------------------------------------+-------------------+---------------+---------------------+
| 854acae9-b718-4ea5-bc28-e0bc46378b60 | instance-00000066 | 1             | qa5                 |
| ce1b5dca-a844-4c59-bb00-39a617646c59 | instance-00000067 | 1             | qa5                 |
+--------------------------------------+-------------------+---------------+---------------------+
localadmin at qa4:~/devstack$ nova show vm-1
+--------------------------------------+----------------------------------------------------------------+
| Property                             | Value                                                          |
+--------------------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                                         |
| OS-EXT-AZ:availability_zone          | az-1                                                           |
| OS-EXT-SRV-ATTR:host                 | qa5                                                            |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | qa5                                                            |
| OS-EXT-SRV-ATTR:instance_name        | instance-00000066                                              |
| OS-EXT-STS:power_state               | 1                                                              |
| OS-EXT-STS:task_state                | -                                                              |
| OS-EXT-STS:vm_state                  | active                                                         |
| OS-SRV-USG:launched_at               | 2014-12-21T16:03:15.000000                                     |
| OS-SRV-USG:terminated_at             | -                                                              |
| accessIPv4                           |                                                                |
| accessIPv6                           |                                                                |
| config_drive                         |                                                                |
| created                              | 2014-12-21T15:59:03Z                                           |
| flavor                               | m1.tiny (1)                                                    |
| hostId                               | 89119faac9345b51f185bd8b6c2e091644f1544cd523067ecce64613       |
| id                                   | 854acae9-b718-4ea5-bc28-e0bc46378b60                           |
| image                                | cirros-0.3.2-x86_64-uec (61409a53-305c-4022-978b-06e55052875b) |
| key_name                             | -                                                              |
| metadata                             | {}                                                             |
| name                                 | vm-1                                                           |
| os-extended-volumes:volumes_attached | []                                                             |
| private network                      | 10.0.0.70                                                      |
| progress                             | 0                                                              |
| security_groups                      | default                                                        |
| status                               | ACTIVE                                                         |
| tenant_id                            | 84827057a7444354b0bff11566ccb80b                               |
| updated                              | 2014-12-21T15:59:11Z                                           |
| user_id                              | 9d5fd9947d154a2db396fce177f1f83c                               |
+--------------------------------------+----------------------------------------------------------------+
localadmin at qa4:~/devstack$ nova show vm-2
+--------------------------------------+----------------------------------------------------------------+
| Property                             | Value                                                          |
+--------------------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                                         |
| OS-EXT-AZ:availability_zone          | az-1                                                           |
| OS-EXT-SRV-ATTR:host                 | qa5                                                            |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | qa5                                                            |
| OS-EXT-SRV-ATTR:instance_name        | instance-00000067                                              |
| OS-EXT-STS:power_state               | 0                                                              |
| OS-EXT-STS:task_state                | spawning                                                       |
| OS-EXT-STS:vm_state                  | building                                                       |
| OS-SRV-USG:launched_at               | -                                                              |
| OS-SRV-USG:terminated_at             | -                                                              |
| accessIPv4                           |                                                                |
| accessIPv6                           |                                                                |
| config_drive                         |                                                                |
| created                              | 2014-12-21T15:59:55Z                                           |
| flavor                               | m1.tiny (1)                                                    |
| hostId                               | 89119faac9345b51f185bd8b6c2e091644f1544cd523067ecce64613       |
| id                                   | ce1b5dca-a844-4c59-bb00-39a617646c59                           |
| image                                | cirros-0.3.2-x86_64-uec (61409a53-305c-4022-978b-06e55052875b) |
| key_name                             | -                                                              |
| metadata                             | {}                                                             |
| name                                 | vm-2                                                           |
| os-extended-volumes:volumes_attached | []                                                             |
| private network                      | 10.0.0.71                                                      |
| progress                             | 0                                                              |
| security_groups                      | default                                                        |
| status                               | BUILD                                                          |
| tenant_id                            | 84827057a7444354b0bff11566ccb80b                               |
| updated                              | 2014-12-21T15:59:56Z                                           |
| user_id                              | 9d5fd9947d154a2db396fce177f1f83c                               |
+--------------------------------------+----------------------------------------------------------------+
Is it supposed to work this way?  Do I missed something here?
Thanks,
Danny
_______________________________________________
OpenStack-dev mailing list
OpenStack-dev at lists.openstack.org<mailto:OpenStack-dev at lists.openstack.org>
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20141221/5b4ed1d8/attachment-0001.html>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20141223/347b7965/attachment.html>


More information about the OpenStack-dev mailing list