-
Notifications
You must be signed in to change notification settings - Fork 91
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
SL generic attribute keys, even nested, are breaking my node search #150
Comments
I do not currently use sumologic (as I recently switched employers and they do not use it) but continue to maintain the cookbook when I have time so apologies for the delayed response. Thanks for reporting, I am familiar with the issue you speak of but I have not encountered it for several years because I architected the issue away in my last few organizations so I am unsure on chefs current stance. If I had to guess it would be like you said and unlikely to want to change. I need to think about this as this would most likely be a breaking change and it currently defaults to
[1]: need to vet
Can you elaborate on this? Do you have a github issue, slack/irc transcript, blog post, etc? Like I said I have not had to deal with this issue in years so even reading an old issue would be helpful to refresh my memory on the nuances of it. The only way I can think of making this backwards compatible is to leave the old namespace intact and introduce a new attribute which could be used and would also default to
I have not looked at the code yet (as github search blows and I don't currently have it local) and wanted to respond and gather some information before deciding what to do. Assuming that something like the above will work I think this is the best of both worlds. It fixes a real problem, avoids breaking people in the short term, warns them about future changes, and gives us a clear upgrade/deprecation path. |
Environment Information
Please include the following:
All of my cookbooks that use search() functionality.
Expected Behavior
knife search node name:mongo\* -i
should return nodes matching that pattern, and not nodes whose names do not match that patternActual Behavior
All of my nodes that have the sumlogic-collector cookbook loaded are also returning in those search results.
Steps to Reproduce
Define a
source
that looks for aname
of mongod.log on a node whose name does not match ^mongo.*Do a knife search on node for name:mongo*
Non-matching node will appear
Important Factoids
Fundamentally, this is a chef-server search functionality bug due to flattened attribute trees indexed to provide wildcard search capabilities. They're making noises that sound like "wontfix" even though it's a pretty bad design, so I would sure appreciate it if someone would take a few minutes to switch things like
sources
andname
tosumosources
orsumoname
or something like that.Yes I realize this is potentially a breaking change, but now I'm having to write select{|n| ...} statements for all my node name searches because node_default['sumologic']['sources']['name'] = 'mongod.log' is breaking my existing search calls.
References
Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:
The text was updated successfully, but these errors were encountered: