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

Danny Choi (dannchoi) dannchoi at cisco.com
Sun Dec 21 16:28:34 UTC 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20141221/57eff427/attachment.html>


More information about the OpenStack-dev mailing list