flux-sched
flux-sched copied to clipboard
support TOML queue configuration described in RFC 33
Problem: fluxion queues are currently configured on the qmanager command line as in t1006-qmanager-multiqueue.t, but a framework wide queue TOML configuration was proposed in RFC 33.
The RFC 31 style configuration will need to be implemented in fluxion.
For a workaround, the qmanager module command line options also work from TOML, e.g.
[sched-fluxion-qmanager]
queues = "batch debug"
queue-policy-per-queue="batch:easy debug:fcfs"
If we initially require queues to be configured both here and in flux-core, we can get queues working without modifying fluxion.
In the meeting today we discussed whether we should try to do this in the context of the qmanager_opts_t class or use the C approach used throughout flux-core, the gist of which is
- call
flux_get_conf (h)to get the broker "config object", aflux_conf_t - unpack what you need, for example the "queues" table as a jansson json object, with
flux_conf_unpack() - continue to parse using regular jansson tools
- for extra credit (probably not needed here) you can implement the
config-reloadRPC handler to allow the config to be changed on the fly
Here's a simple example with no config-reload support
There are also examples of detailed parsers for [queues] and [policy] in the broker
RFC 33 defines the [queues] table and the global and per-queue [policy] tables.
To get the list of queues, you would just get the list of keys in the [queues] table.
We haven't used the "scheduler" policy key yet but it's here to support scheduler-specific stuff like the easy/fcfs in the example above. The global value would be in the [policy] table, while the per-queue values would be in the [queues] table, under each queue name, e.g.
[policy]
scheduler.queue-policy = "fcfs"
[queues.batch]
policy.scheduler.queue-policy = "easy"
[queues.debug]
# Use the default fcfs
(I made up the queue-policy key name. This name space is owned by the scheduler so feel free to ad lib).
p.s. ping to @milroy per request
Just noticed that there are a couple more "per-queue" configuration variables in fluxion e.g.
policy-params-per-queue = "batch:max-reservation-depth=100000,reservation-depth=64"
queue-params-per-queue = "debug:queue-depth=16"
Presumably we will need to map these into policy.scheduler as well. And in addition, the "global" policy should work as described for these parameters.
This is getting a bit complicated. I propose that we allow this issue to be closed by simply transitioning fluxion's queues = parameter to RFC 33 [queues] and we assume for now that all configured queues will use the same policy and parameters. We can then open another issue to finish the job.