Skip to content

[9.1] fix (WMS): stop the StalledJobAgent rescheduling jobs that have just been matched - #8852

Open
chrisburr wants to merge 2 commits into
DIRACGrid:integrationfrom
chrisburr:fix/stalled-agent-matched-race-integration
Open

chrisburr wants to merge 2 commits into
DIRACGrid:integrationfrom
chrisburr:fix/stalled-agent-matched-race-integration

Conversation

@chrisburr

Copy link
Copy Markdown
Member

Port of #8851 to integration.

BEGINRELEASENOTES

*WorkloadManagement
FIX: set the job Status and LastUpdateTime atomically so that the StalledJobAgent does not reschedule jobs that have just been matched
FIX: StalledJobAgent re-checks stuck jobs before rescheduling them and records itself as the source

ENDRELEASENOTES

When setJobAttributes is called with update=True and a Status, the status
and the LastUpdateTime were written by two separate statements. In between,
a freshly matched job that had been waiting for longer than MatchedTime
looked like a job stuck in Matched, and the StalledJobAgent could
reschedule it while the pilot went on to run it. The job then stays in
Checking forever, as the state machine rejects the pilot's updates.
Jobs selected as stuck in Matched or Rescheduled may have moved on by the
time they are rescheduled, so check each one again just before acting.
Also record the StalledJobAgent as the source of the reschedule in the
job logging.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant