-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to change default SchedulerAlgorithm via Api #8070
Comments
I tested this using the payload you included above and it worked fine. I'm a little curious as to why the |
Hi @cgbaker This is a 3 server cluster (The acl tokens are transient so I don't mind them being here). The result of nomad server members is: root [ /home/vagrant ]# /usr/local/bin/nomad server members The nomad server logs don't seem to change prior or post these operations - here's the logs 2020-05-28T16:06:02.652Z [WARN] agent.plugin_loader: skipping external plugins since plugin_dir doesn't exist: plugin_dir=/opt/nomad/plugins Here is the first curl call and result: curl --header "X-Nomad-Token: f176d883-d010-6918-fc5a-003f7a7b6688" --request GET http://localhost:4646/v1/operator/scheduler/configuration {"SchedulerConfig":{"PreemptionConfig":{"SystemSchedulerEnabled":true,"BatchSchedulerEnabled":false,"ServiceSchedulerEnabled":false},"CreateIndex":5,"ModifyIndex":270},"Index":270,"LastContact":0,"KnownLeader":true} Then the next call: http://localhost:4646/v1/operator/scheduler/configuration?cas=270 And the final call: curl --header "X-Nomad-Token: f176d883-d010-6918-fc5a-003f7a7b6688" --request GET http://localhost:4646/v1/operator/scheduler/configuration These calls are made back to back with NO jobs schedule and just the cluster running idle. Here is a server config: log_level = "INFO" consul { server { NOTE: The server config stanza looked as follows at the time the cluster was created server { |
I ran the command a few more times and i can confirm that if I set the file to { and switch to { |
@cgbaker i switched the servers over to debug and grabbed the leader logs for the entire duration. Maybe this sheds some light, but nothing stands out to me edit: I also tried declaring the temp.json file contents as { But I got the similar behavior except now I don't see the expected change in SystemSchedulerEnabled (so the behavior of my original temp file is better) - so I get a success save but no change on the get. {"SchedulerConfig":{"PreemptionConfig":{"SystemSchedulerEnabled":false,"BatchSchedulerEnabled":false,"ServiceSchedulerEnabled":false},"CreateIndex":5,"ModifyIndex":54},"Index":54,"LastContact":0,"KnownLeader":true} |
Realized we are 0.11.1 not 0.11.2 so I updated the main post accordingly. |
@cgbaker is it possible this is simply a response missing some content ( SchedulerAlgorithm )? Since we're seeing the boolean value for SystemSchedulerEnabled flip back and forth - it just got me wondering, or did you see the value in your tests? |
Problem between the keyboard and chair :( We are running 0.11.1 and 0.11.2 has the scheduling feature. Sorry! |
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
Nomad version
Nomad 0.11.1
Operating system and Environment details
Photon OS3
Issue
We have a cluster that has been stood up and bootstrapped with ACLS (no default scheduler was set at the time of creation.
The results of the api call /v1/operator/scheduler/configuration referenced here: https://www.nomadproject.io/api-docs/operator/#update-scheduler-configuration is:
{"SchedulerConfig":{"PreemptionConfig":{"SystemSchedulerEnabled":false,"BatchSchedulerEnabled":false,"ServiceSchedulerEnabled":false},"CreateIndex":5,"ModifyIndex":167},"Index":167,"LastContact":0,"KnownLeader":true}
When calling PUT OR POST on http://localhost:4646/v1/operator/scheduler/configuration?cas=167 we receive:
"Updated":true,"Index":177}
but when requerying /v1/operator/scheduler/configuration we receive
{"SchedulerConfig":{"PreemptionConfig":{"SystemSchedulerEnabled":true,"BatchSchedulerEnabled":false,"ServiceSchedulerEnabled":false},"CreateIndex":5,"ModifyIndex":179},"Index":179,"LastContact":0,"KnownLeader":true}
The modification index has incremented as expected but we aren't seeing the value of the scheduler being updated.
The file contents for the PUT are
{
"SchedulerAlgorithm": "spread",
"PreemptionConfig": {
"SystemSchedulerEnabled": true,
"BatchSchedulerEnabled": false,
"ServiceSchedulerEnabled": false
}
}
The text was updated successfully, but these errors were encountered: