Commit fc8a771b authored by Antoine Millet's avatar Antoine Millet Committed by Antoine Millet
Browse files

Fixed bug where elector allow a vm to be migrated on its current hypervisor

parent e027897c
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -204,12 +204,11 @@ class Elector(object):
                returned.append(hv)
        return returned

    @tags('id')
    @tags('p')
    def _filter_not_source_hv(self, vm, hvs):
        returned = []
        hv_id, _, _ = vm['id'].partition('.')
        for hv in hvs:
            if hv['id'] != hv_id:
            if hv['id'] != vm['p']:
                returned.append(hv)
        return returned