Loading ccserver/election.py +4 −5 Original line number Diff line number Diff line Loading @@ -9,7 +9,8 @@ from __future__ import absolute_import from copy import copy from ccserver.exceptions import UnknownElectionAlgo, UnknownElectionType from ccserver.exceptions import (UnknownElectionAlgo, UnknownElectionType, ElectionError) def tags(*args): ''' Loading Loading @@ -126,10 +127,8 @@ class Elector(object): hv_alloc = {} for vm, hvs in candidates: if not hvs: migration_plan.append({'sid': vm['id'], 'did': '', 'error': 'no destination hv found', 'type': 'error'}) raise ElectionError('No destination found for %r vm' % vm['id']) else: # Try to take an hypervisor that is not already in the plan: for hv in hvs: Loading ccserver/exceptions.py +4 −0 Original line number Diff line number Diff line Loading @@ -56,3 +56,7 @@ class UnknownMigrationType(Exception): class UnknownObjectError(Exception): pass class ElectionError(Exception): pass ccserver/handlers.py +1 −0 Original line number Diff line number Diff line Loading @@ -709,6 +709,7 @@ class CliHandler(OnlineCCHandler): else: errmsg = '%r unknown migration type' % migration['type'] errs.error(migration['sid'], errmsg) continue # Construct the migration properties: migration_properties = { Loading Loading
ccserver/election.py +4 −5 Original line number Diff line number Diff line Loading @@ -9,7 +9,8 @@ from __future__ import absolute_import from copy import copy from ccserver.exceptions import UnknownElectionAlgo, UnknownElectionType from ccserver.exceptions import (UnknownElectionAlgo, UnknownElectionType, ElectionError) def tags(*args): ''' Loading Loading @@ -126,10 +127,8 @@ class Elector(object): hv_alloc = {} for vm, hvs in candidates: if not hvs: migration_plan.append({'sid': vm['id'], 'did': '', 'error': 'no destination hv found', 'type': 'error'}) raise ElectionError('No destination found for %r vm' % vm['id']) else: # Try to take an hypervisor that is not already in the plan: for hv in hvs: Loading
ccserver/exceptions.py +4 −0 Original line number Diff line number Diff line Loading @@ -56,3 +56,7 @@ class UnknownMigrationType(Exception): class UnknownObjectError(Exception): pass class ElectionError(Exception): pass
ccserver/handlers.py +1 −0 Original line number Diff line number Diff line Loading @@ -709,6 +709,7 @@ class CliHandler(OnlineCCHandler): else: errmsg = '%r unknown migration type' % migration['type'] errs.error(migration['sid'], errmsg) continue # Construct the migration properties: migration_properties = { Loading