can i configure the nova scheduler filters to filter-in neutron physical network compute hosts?

asked 2016-05-23 17:51:22 -0500

yee379 gravatar image

So have have a single openstack controller, with separate availability zones: each one representing a routing domain that the compute nodes are within and as such each group of compute nodes have their own sets of vlans (and networks) that are associated with them.

Specifically, each group of compute nodes have different physical networks: eg for the ml2 and ovs ini files:

HA1:
network_vlan_ranges=rtr1:111:111,rtr1:1111:1111
bridge_mappings=rtr1:br-proxy

HA2:
network_vlan_ranges=rtr2:222:222,rtr2:2222:2222
bridge_mappings=rtr2:br-proxy

so when i spin up an instance, i can just select the appropriate network without selecting an Availability Zone and nova appears intelligent enough to spin up the instance in the correct compute group that has the appropriate physical network.

so i recently added a third routing domain, and hence replicated this on another Host Aggregate.

HA3:
network_vlan_ranges=rtr3:333:333,rtr3:3333:3333
bridge_mappings=rtr3:br-proxy

what i see now is that i have to explicitly select the Availability Zone that HA3 is in in order to spin up instances on the rtr3 networks, ie if i do not select the AZ on instance creation but only the network, it complains that:

Failed to compute_task_build_instances: Exceeded maximum number of retries. Exceeded max scheduling attempts 3 for instance 10a17d54-3cf7-4c61-811b-4379931b00c9

looking at the debug output, this happens because i so happen to have just two nodes in my HA2 (which have a relatively high weight according to nova.scheduler.filter_scheduler) - they are also beefy machines (more memory) compared to hosts in HA1.

what i hypothesise is that as the scheduler tries upto 3 times on different compute nodes to spin up the instance, i see from teh logs that the two nodes in HA2 are always weighted highly; the scheduler attemps to place the vm on those, fails because it doesn't have the correct physical network and attempts to spin up the instance on the next (and final compute node). if the third node does not have the correct physical network, it just gives up and throws an error.

so my question is, is there a way for nova-scheduler to consider the network selected at instance creation time so that the compute nodes without that network are pre-filtered out of the weighted list of compute nodes?

the alternative is to increase the number of retries so that the instance is attempted to spin up on all compute nodes.

edit retag flag offensive close merge delete