edelight / chef-solo-search

Data bag search for Chef Solo
Apache License 2.0
177 stars 2 forks source link

warning: already initialized constant Lucene::SEP #69

Open NikolayMurha opened 9 years ago

NikolayMurha commented 9 years ago

Hello.

I have warning:

  /tmp/vagrant-chef-3/chef-solo-1/cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/lucene_nodes.rb:22: warning: already initialized constant Lucene::SEP`

Chef 12.0.3

Rud5G commented 9 years ago

*** Chef 12.0.3 *** ==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/lucene_nodes.rb:22: warning: already initialized constant Lucene::SEP ==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/lucene_nodes.rb:22: warning: previous definition of SEP was here

michaelglass commented 9 years ago

as far as I know -- chef 12 in local mode has search without needing chef-solo-search.

Part of upgrading to --local-mode instead of chef-solo should be migrating away from chef-solo-search.

have not used --local-mode but that's my understanding

see: https://www.chef.io/blog/2014/06/24/from-solo-to-zero-migrating-to-chef-client-local-mode/

sigil66 commented 9 years ago

I am trying to track this down as well. Using in conjunction with the user cookbook. With chef 12 it seems to be including the library twice...

michaelglass commented 9 years ago

curious about why anyone would use chef-solo with chef 12?

Rud5G commented 9 years ago

@michaelglass @sigil66 i make use of the https://supermarket.chef.io/cookbooks/users cookbook which will only present a warning when using chef-solo without chef-solo-search. Although i use chef-zero, the config value "Chef::Config[:solo]" is set to true.

sigil66 commented 9 years ago

"Local mode behaves exactly like Chef Solo except that, during a run, it starts up a local Chef Zero server bound to localhost, uploads all local cookbooks & recipes to it, runs Chef Client, and then terminates the Chef Zero server. The end user experience is identical to Solo."

I see no reason to bother starting a chef server, local or remote, when our chef code is distributed with packages. I really only use the search for the users cookbook.

michaelglass commented 9 years ago

@sigil66 fwiw, this repo is mostly unmaintained now that chef zero supports search

sigil66 commented 9 years ago

Understood. I just pulled it down internally and:

SEP ||= "="

Because after an hour of digging I still couldn't figure out why 'search/parser' was being loaded twice...

dkinzer commented 9 years ago

I'm having same issue as @Rud5G. I use chef_zero but Chef::Config[:solo] is true. And the users mdoule basically forces us to use this cookbook. @Rud5G did you find a work around for this issue?

dkinzer commented 9 years ago

@Rud5G part of this is a vagrant issue, see: https://github.com/mitchellh/vagrant/issues/5619

Once that get's fix then I think we wont need to use this cookbook to make users work.