Skip to content

Improved control over queue usage #1124

@mattias-p

Description

@mattias-p

Backend has a feature to put jobs into different queues. Each zm-testagent instance is configured to process jobs in some queues and ignore others.

Today job_create and batch_create each has a queue parameter. We do not validate queue arguments actually matches a queue the administrator intends to be used. In practice we just expect everyone to use the default queue unless told otherwise. There's no way to make sure users don't put jobs in queues with special purposes or where they otherwise don't belong.

I propose we simplify the queue selection in the following way.

  • Add a configuration property RPCAPI.default_job_queue accepting an integer, defaulting to 0.
  • Add a configuration property RPCAPI.default_batch_queue accepting an integer, defaulting to 0.
  • Add a configuration property RPCAPI.additional_job_queues accepting a set of integers, defaulting to the empty set.
  • Add a configuration property RPCAPI.additional_batch_queues accepting a set of integers, defaulting to the empty set.
  • Make job_create validate its queue arguments against RPCAPI.default_job_queue and RPCAPI.additional_job_queues.
  • Make batch_create validate its queue arguments against RPCAPI.default_batch_queue and RPCAPI.additional_batch_queues.

Edit history

  • 2023-07-23: Issue created.
  • 2023-11-17: Minor clarification.
  • 2024-02-12: Update problem statement and design proposal taking into account what I've learned from discussing with @matsstralbergiis and @matsduf.

Stabilization

Tracking issue

Affected interfaces

Additions:

  • RPCAPI.default_job_queue
  • RPCAPI.default_batch_queue
  • RPCAPI.additional_job_queues
  • RPCAPI.additional_batch_queues

Compatibly changed:

  • job_create
  • batch_create

Dependencies

None

Overlapping proposals

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions