bjq: add operator set-config ability and ability to manage multiple queues#28078
bjq: add operator set-config ability and ability to manage multiple queues#28078mismithhisler wants to merge 14 commits into
Conversation
allisonlarson
left a comment
There was a problem hiding this comment.
I know I'll have more questions, but starting out with a couple of them
| if b.state == nil { | ||
| b.state = state | ||
| } | ||
| b.createQueues() |
There was a problem hiding this comment.
This seems like its changing my mental model of the queue's lifecycles, but I can't tell if its an issue or not. If we create a new set of queues when this is enabled, do we lose anything? I think at some point there was a comment about rebuilding the state during the SetEnabled call, but that might have been misplaced?
There was a problem hiding this comment.
Yeah similar to eval broker and deployments watcher, the Nomad server isn't going to be doing this work if it's not the leader. Once a server becomes the leader, it's actually going to do the eval broker logic, and in this case, it's going to build it's queue state and actually start processing the queue.
| return | ||
| } | ||
|
|
||
| queue, err := NewQueue(b.state, conf, b.broker, b.logger) |
There was a problem hiding this comment.
If a queue is updated, does it loose all of the queued workloads still waiting? I think thats the nagging question I didn't have words for in my previous review (sorry!)
There was a problem hiding this comment.
It does, but then it would be rebuilt when the new queue gets started. That's probably not as efficient as an in place update of an existing queue, but I figured we could revisit if this actually needs better performance?
But now that I'm looking at this after a couple days I'm noticing some issues with how we wait for job placement and how we use Stop() that need to be fixed.
a76dffa to
a97d40a
Compare
Description
These changes add the batch queue manager which allows the nomad server to manage various queues for both the global scheduler config, and various node pool scheduler configs (Enterprise feature). This change allows the
nomad operator scheduler set-configto update queue's for a running server.Testing & Reproduction steps
Links
Contributor Checklist
changelog entry using the
make clcommand.ensure regressions will be caught.
and job configuration, please update the Nomad product documentation, which is stored in the
web-unified-docsrepo. Refer to theweb-unified-docscontributor guide for docs guidelines.Please also consider whether the change requires notes within the upgrade
guide. If you would like help with the docs, tag the
nomad-docsteam in this PR.Reviewer Checklist
backporting document.
in the majority of situations. The main exceptions are long-lived feature branches or merges where
history should be preserved.
within the public repository.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.