Fix OST pool grow
Different types of sets were compared to each other:
objects and strings:
current set([<ManagedOst: fs-OST0000>]),
new set([u'fs-OST0000', u'fs-OST0001']),
add set([u'fs-OST0000', u'fs-OST0001']),
remove set([<ManagedOst: fs-OST0000>]).
Make sure to compare strings only.
@@ -1167,7 +1167,7 @@ class JobScheduler(object):
with self._lock:
ostpool = OstPool.objects.get(pk=ostpool_data["id"])
- current = set(ostpool.osts.all())
+ current = set(ostpool.osts.values_list("name", flat=True).all())
to_add = newlist - current
to_remove = current - newlist
