Can anybody tell me why a data bag search wouldn't return all the items that it should return? Previously this same search returned all our users, and now it returns only a small number of users. Eg:
chef (14.10.9)> search('users', '*:*').length
=> 6
Versus:
$ knife data bag show users | wc -l
42
Thanks.
Hi,
Can you let me know where did you run the fist command from?
search('users', ':').length
Is it from inside the recipe file?
Thanks,
M
Well, i still have no clue why knife data bag show users
returned different results than search(...
showed me, but after doing knife data bag from file users data_bags/users/*
, search does now show me the expected results.
Problem solved I guess.
I used search('users', ':').length
in chef-shell just as a diagnostic. My real usage of search
is inside a recipe, yes, specifically this: https://github.com/sous-chefs/openvpn/blob/v2.0.4/recipes/users.rb#L23
And I still have no clue why search
returned different results than knife data bag
returned, but after re-uploading all my user's data bags search
is working as expected now. Weird, but it's working again.