[openstack-dev] [nova] ‘az:force_host:force_node’ validation when booting instance

Lingxian Kong anlin.kong at gmail.com
Thu Apr 2 15:12:36 UTC 2015

hi, nova guys:

now I am working on this bug[1], and this is my patch[2], but met some
problems, so have to bring it here to get suggestions from broader

In short, the problem is about validation on the
‘az:force_host:force_node’ parameter when booting instance. As we all
know that, user can specify ‘az:force_host:force_node’ or
‘az:force_host’ or ‘az::force_node’ or ‘az’. So, we need to check:

#1 for ‘az:force_host’ or ‘az:force_host:force_node’: the host must
belong to az;
#2 for 'az::force_node', the host to which the node belongs, must belong to az;

For #2, there is another problem. in one availability zone, there
might be more than one nodes with the same name(belongs to different
hosts). What should we do? Hans Lindgren suggested that, an
InvalidRequestException with appropriate message shoule be raised.
Alex Xu suggested we shouldn't allow the user specify a force_node
without a force_host.

For #1, another workaroud I could think of is, we just let it through
the api layer, and override the 'az' property of instance with the
correct one, at the nova-compute layer.

So, what's your opinion?

[1] https://launchpad.net/bugs/1431194
[2] https://review.openstack.org/#/c/163842/

Lingxian Kong

More information about the OpenStack-dev mailing list