Hello, I originally posted this to the general openstack list to get a sanity check on what I was seeing. Jeremy F reached out and confirmed that, so I'm going to re-post the details here to begin a discussion.
>From what I can see, anti-affinity is not working at all in Sahara. I was able to get it working locally by making the following changes: 1. ng.count is either invalid, always returns 0, or isn't being set somewhere else. https://github.com/openstack/sahara/blob/master/sahara/service/heat/templates.py#L276 Instead, I've used ng_count = self.node_groups_extra[ng.id]['node_count'] 2. An uninitialized Python key: https://github.com/openstack/sahara/blob/master/sahara/service/heat/templates.py#L283 3. Incorrect bounds in range(): https://github.com/openstack/sahara/blob/master/sahara/service/heat/templates.py#L255-L256 I believe this should be: for i in range(0, self.cluster.anti_affinity_ratio): resources.update(self._serialize_aa_server_group(i+1)) https://github.com/openstack/sahara/blob/master/sahara/service/heat/templates.py#L278 I believe this should be: for i in range(0, ng_count): With the above in place, anti-affinity began working. The above changes were all quick fixes to get it up and running, so there might be better ways of going about this. I can also create something on StoryBoard for this, too. Thanks, Joe
__________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev