Skip to content

start_move_batch returns 500 (EntryNotFound) on reclaim moves with no current schedule #739

Description

@sadsfae

Environment

  • quads-stage-3.0.0-20260930.noarch on quads2-stage.rdu2.scalelab.redhat.com

Problem

quads --move-hosts (cron) logs on every reclaim:

Failed to start move batch: Check the flask server logs

Traceback (quads-server):

File ".../blueprints/moves.py", line 125, in start_move_batch
    result = ScheduleDao.start_move_batch(hostnames)
File ".../server/dao/schedule.py", line 430, in start_move_batch
    raise EntryNotFound
quads.server.dao.baseDao.EntryNotFound

Reproduced 2026-09-30 18:25 UTC shrinking cloud05 (e28-h26-000-r650, f30-h17-000-dl360 moved cloud05 -> cloud01 after schedule 465 ended at 18:20) and earlier at 16:01 (cloud03 -> cloud01). 8 EntryNotFound occurrences in journal since deployment.

Root cause

  • GET /api/v3/moves (ScheduleDao.get_moves) intentionally reports hosts with NO current schedule as a move to host.default_cloud (reclaim after assignment end).
  • POST /api/v3/moves/progress/batch (ScheduleDao.start_move_batch, added in "feat: polling/status API" [RFE] Tracking and Polling API #661) requires get_current_schedule(host) to return a row and raises EntryNotFound otherwise. Reclaim moves never have a current schedule by definition, so every reclaim 500s.
  • Impact: move still executes (switch config + move_and_rebuild complete), but move progress is not tracked and the CLI warns; any consumer of schedule_ids is silently skipped.

Expected

start_move_batch should not fail for valid reclaim moves. Hosts without a current schedule should be skipped (no schedule row to mark pending); host-not-found should still raise.

Proposed fix

In ScheduleDao.start_move_batch, continue (skip) when get_current_schedule returns empty instead of raising EntryNotFound.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions