How to Create or Modify Availability Zone Programmably

Asked by Tong Da

I have known that to set an Availability Zone, I should set the node_availability_zone field in nova.conf. But I have two questions about the Availability Zone.

1. How to create or modify Availability Zone by api? The nova command line tool only support availability-zone-list command, lacking creating and modifying command. If this is by design, why?

2. When a host firstly register to controller node as nova zone, modifying the nova.conf to set node_availability_zone to "test_zone" cannot change metadata. The zone is still named as nova in "nova availability-zone-list" and the compute node still belong to nova zone in "nova-manage service list". Is there a way to change a host to another availability zone?

Thanks for your reading and sorry for my poor English.

Question information

English Edit question
OpenStack Compute (nova) Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Xiang Hui (xianghui) said :

1. Seems there's not Availability Zone by api, maybe it will be considered to be added into the extension, I think the reason is it is not one of the most import api at first.

2. I don't know which openstack version you are using now? "node_availability_zone" is used on folsom,
set default_availability_zone=<zone-name> in /etc/nova/nova.conf on compute node works on havana, you can try it on grizzly.

Revision history for this message
Tong Da (tongda) said :

I found that using "nova create-aggregate" can assign an availability zone, if not exist, a new one will be created. So this may be a way to manipulate availability zones.

Can you help with this problem?

Provide an answer of your own, or ask Tong Da for more information if necessary.

To post a message you must log in.