wiki:AssignedWork

Version 3 (modified by davea, 16 years ago) (diff)

--

Assigned work

This mechanism serves two purposes:

  • To assign a particular job to a particular host.
  • To assign a particular job to be done on ALL hosts for which an app version exists. This could be used to run application-specific benchmarks, test for hardware or softwar features, or test CPUs.

A host with assigned jobs won't get any other jobs until the assigned ones are finished and reported.

Assigned jobs are not validated or assimilated. You must develop your own scripts or programs to process and clean up finished jobs.

To enable this feature you must add

<enable_assignment>1</enable_assignment>

to your config.xml file.

Creating assigned work

The '''create_work''' script and function take an optional host_id argument. If -1 it means assign the job to all hosts. If positive it means assign the job to the host with that ID.

The names of workunits for assigned jobs must include the string asgw (this prevents them from being validated or assimilated).

Management tools

The assignment.php script (in ops/) manages assigned work. It shows a list of assignments and their status, and lets you remove assignments (the WU and result records remain in the database).

Implementation

Results for assigned workunits are created on demand (in the scheduler) rather than by the transitioner.

Assignments are stored in an assignments table. Each record contains a host ID (or -1) and a WU ID.

If <enable_assigment> is set in the config file, the scheduler checks for assignment records for the given host. If it finds any for which the result has not already been reported and the job is not in progress, it creates a result record and sends it to the host.