Skip to content

Commit 81fc74f

Browse files
authored
Merge pull request flux-framework#421 from garlick/rfc27_partial_release
rfc27: support partial release
2 parents f5d0d5b + ee0f60a commit 81fc74f

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

spec_27.rst

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ behalf of jobs.
4444
A scheduler implementation registers the generic service name ``sched``
4545
and provides several well known service methods. The job manager requests
4646
resources from the scheduler with a ``sched.alloc`` request when a job enters
47-
SCHED state. It releases resources with a ``sched.free`` request when a job
48-
enters CLEANUP state.
47+
SCHED state. It releases resources with one or more ``sched.free`` requests
48+
after a job enters CLEANUP state.
4949

5050
The simplest imaginable scheduler satisfies ``sched.alloc`` requests in order
5151
until it is out of resources, then blocks until ``sched.free`` requests
@@ -569,16 +569,22 @@ The request MAY fail, for example if:
569569
Free
570570
====
571571

572-
The job manager SHALL send a ``sched.free`` request when a job that is
573-
holding resources enters CLEANUP state. The request payload consists of
572+
The job manager SHALL send one or more ``sched.free`` requests to release
573+
allocated resources to the scheduler. The request payload consists of
574574
a JSON object with the following REQUIRED keys:
575575

576576
id
577577
(integer) job ID
578578

579579
R
580580
(object) RFC 20 resource set from which the ``scheduling`` key MAY be
581-
omitted.
581+
omitted. This resource set MAY be a subset of the original allocation.
582+
583+
and the following OPTIONAL key:
584+
585+
final
586+
(boolean) If present and true, this free request is the final one for the
587+
job. If absent or false, more free requests are forthcoming for the job.
582588

583589
Example:
584590

@@ -597,11 +603,16 @@ Example:
597603
"expiration": 1710076122
598604
}
599605
}
606+
"final":true
600607
}
601608
602609
603-
Upon receipt of the ``sched.free`` request, the scheduler SHOULD mark the
604-
job's resources as available for reuse.
610+
Upon receipt of a ``sched.free`` request, the scheduler SHOULD mark the
611+
designated resources as available for reuse.
612+
613+
When a job's resources are released with multiple ``sched.free`` requests,
614+
the scheduler MAY assume that the resources associated with a given rank
615+
in the original allocation are never split over multiple free requests.
605616

606617
There is no response.
607618

0 commit comments

Comments
 (0)