Skip to content

Introducing 'Scouting' Status in WMS state transitions #7083

Description

@michmx

In our BelleDIRAC extension, we have defined Scout jobs as a small subset of the main jobs that run first, and the rest of the jobs are executed only when scouting is done. Main jobs get the status ‘Scouting’ while waiting for the execution of the subset. Scout jobs were presented in the DIRAC Users Workshop in 2021 (link to contribution).

From DIRAC 7.3, WMS changes the way that statuses change and now state transitions are defined: JobStatus.py#L82

When we migrated our system to DIRAC 7.3, we noticed error messages like

2023-03-09 18:20:12 UTC WorkloadManagement/OptimizationMind ERROR: There was a problem processing task 213431:
getNextState: 'Scouting' is not a valid state

Our Scouting state is very much similar to Staging in the sense that jobs stay in that state before Waiting until some conditions are fulfilled. The transitions that job states with scouting face are:

  • RECEIVED → SCOUTING
  • SCOUTING → CHECKING, WAITING, KILLED, FAILED, STALLED

If you agree, we need to

  1. Define the state “Scouting” at JOB_STATES:
    https://github.com/DIRACGrid/DIRAC/blob/rel-v7r3/src/DIRAC/WorkloadManagementSystem/Client/JobStatus.py#L48

  2. Enable the transitions

    SCOUTING: State(2, [CHECKING, WAITING, FAILED, STALLED, KILLED], defState=SCOUTING),
    CHECKING: State(2, [SCOUTING, STAGING, WAITING, RESCHEDULED, FAILED, DELETED], defState=CHECKING),
    RECEIVED: State(1, [SCOUTING, CHECKING, WAITING, FAILED, DELETED], defState=RECEIVED),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions