0

I'm trying to put together a tool to track Chef instances that have not converged properly. I can find those nodes easily, but I want to exclude nodes that are still pretty new, and so might still be in the process of bootstrapping. I was originally using ohai_time for this, but that wasn't accurate because I'm running Chef as a service, so some nodes would keep failing but keep updating ohai_time. Then I found uptime_seconds, which seems perfect, but it seems to be handled as a string in range searches, i.e. alphabetically. For example:

knife search "uptime_seconds:[0 TO 9]"

returns all my instances, whereas:

knife search "uptime_seconds:[0 TO 10000]"

returns none. Is there any way to handle this correctly using Chef search?

1

No, this is not possible. We store all node attributes in a string field as far as Lucene knows so that TO is a string range search, not a numeric range.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.