Nomad MemoryOversubscriptionEnabled unable to set

Hi,

I am unable to change the MemoryOversubscriptionEnabled setting.

Followed the steps from here - Oversubscribe Memory | Nomad - HashiCorp Learn

curl -H "X-Nomad-Token: <BOOTSTRAP_TOKEN>" -s $NOMAD_ADDR/v1/operator/scheduler/configuration | \
  jq '.SchedulerConfig | .MemoryOversubscriptionEnabled=true' | \
  curl -X PUT $NOMAD_ADDR/v1/operator/scheduler/configuration -d @-

Even with bootstrap token (management), I am getting permission denied error.

Create a policy with operator:write access, and still the same result. I am able to read the scheduler configuration fine.

When trying from a cURL client like insomnia, I receive the response like so -

{
	"Updated": true,
	"Index": 6536
}

But MemoryOversubscriptionEnabled still seems to be false when read again.

Nomad v1.3.1

Wondering if I am missing something else.

Thanks

You are only including your token in the first of the two curl commands

1 Like

@maxb that was it. Thank you so much.

Cheers.

Just FYI Nomad v1.3 introduced the nomad operator api command for making these curl-like requests much easier, as Nomad can take care of the environment variable / headers for you.

1 Like