[Openstack] [Sahara] Anti-Affinity Broke?

Joe Topjian joe at topjian.net
Tue Jun 12 17:39:05 UTC 2018


I was unable to get anti-affinity to work in Sahara. The logs were
reporting a Heat error that u'' was not a valid UUID. Upon further
investigation, I think I found several errors in the
`sahara/service/heat/templates.py` file. I'm working with Sahara 7.0.0 but
the master branch still exhibits these problems.

I figured I would start with posting to the general openstack list rather
than -dev or opening a bug report just to check my sanity on this. If these
findings are correct, then anti-affinity is broke and has been for some
time. The alternative is that I've missed some configuration somewhere --
which is entirely possible :)

1. ng.count is either invalid, always returns 0, or isn't being set
somewhere else.


Instead, I've used

ng_count = self.node_groups_extra[ng.id]['node_count']

2. an uninitialized Python key.


3. Incorrect bounds in range():


I believe this should be:

for i in range(0, self.cluster.anti_affinity_ratio):


I believe this should be:

for i in range(0, ng_count):

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20180612/2f7919e7/attachment.html>

More information about the Openstack mailing list