Commit 8439a5c4 authored by Qarnot computing's avatar Qarnot computing

Reject migration requests that start in the past

parent fa4fb118
......@@ -228,6 +228,13 @@ class ITLBClientDaemon:
async def _handle_relocate_plan(self, eo_plan_impl: EOPlanImplementation) -> Tuple[List[MigrationRequestItem], str]:"Start handling relocate plan")
eo_plan = eo_plan_impl.eo_plan
now =
if eo_plan.relocate.move_from_date < now:
log.warning("Relocate plan %s requires moving ITL from %s, which is in the past. Ignore.",
eo_plan.aggregate_id, eo_plan.relocate.move_from_date)
return None, "move_from_date is in the past"
available_it_loads = await self._db_api_client.get_it_loads()
available_it_loads = [itl for itl in available_it_loads if not itl.already_gone]
ips_to_offer = []
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment