You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The requirements for value depends on which operator is being used.
The default operator = requires a non-empty value, as indicated in the error message Operator "=" requires an RTarget. Admittedly, it's not obvious that RTarget means value. Perhaps we could improve the documentation here.
A value of "" is technically valid, for example, if operator = "regexp" (although it would effectively match everything, so wouldn't be much of an affinity). If you wanted to accomplish your example, where apparently node.unique.id = "", then I believe this would work:
However in Nomad there is no such thing as an empty Node ID, so this seems pretty odd.
I don't believe we should change the code so that = would work with "", unless you have a specific attribute that would benefit from that, but perhaps we can improve the documentation. Does my explanation make sense to you? Do you have any suggestions for how we might better communicate this in the documentation?
Nomad version
1.8.2
Operating system and Environment details
Ubuntu 22.04
Issue
https://developer.hashicorp.com/nomad/docs/job-specification/affinity#value
Even manual
value=""
does not help.Reproduction steps
Expected Result
No error should occur
Actual Result
Error happened
The text was updated successfully, but these errors were encountered: