On 3/14/2019 12:29 AM, Boxiang Zhu wrote:
My openstack all-in-one environment is setup by devstack. I created a server-group with anti-affinity policy. Then an instance was created with this server-group successfully with command[1]. Another instance was also created with this server-group and with force_host successfully with command[2]. But if I did not specify the force_host, the instance failed to create[3].
I think the second instance had broken the anti-affinity server-group.
So my question is that whether the result is within design scope or it is a issue and needs to be discussed : )
[1] nova boot <instance-name> --flavor <flavor> --image <image> --availability-zone <az> --security-groups <sec-group> --nic net-id=<net-id> --hint group=<server-group> [2] nova boot <instance-name> --flavor <flavor> --image <image> --availability-zone <az>:<host> --security-groups <sec-group> --nic net-id=<net-id> --hint group=<server-group> [3] nova boot <instance-name> --flavor <flavor> --image <image> --availability-zone <az> --security-groups <sec-group> --nic net-id=<net-id> --hint group=<server-group>
I assume [2] works because force_hosts is an administrative override during server create. Did you create [2] after [1]? Or concurrently? It does seem odd that [2] would pass the ServerGroupAntiAffinityFilter even with the forced host. Seems that should be a 409 or 400 type of case. The behavior with [3] is what I would expect, but haven't dug into the code. Maybe the forced_host is overriding the requested server group? -- Thanks, Matt