collective / collective.recipe.solrinstance

Buildout recipe to configure a Solr instance
https://pypi.python.org/pypi/collective.recipe.solrinstance
5 stars 13 forks source link

Recipe does not work with Solr 5.2 #42

Open saily opened 9 years ago

saily commented 9 years ago

Solr 5.2 provides a new start script which is not compatible with current recipe implementation. We need again to add different option for different versions.

I'd recommend to skip older versions to keep this recipe easier to maintain. Should we drop 3.x?

tisto commented 9 years ago

+1 for dropping 3.x support. Supporting two versions at a time (4/5) should be enough.

saily commented 9 years ago

Our current startup script does not work with Solr 5.2 as mentioned in the issue title. Since Solr 5 there's a new startup script in its bin/ folder, which would makes sense to use - instead of creating our own. I did some test and looks very good.

The script allows to use some Environment file - similar to systemd. ./solr.in.sh makes solr configuration a lot easier. I'd refactored the recipe to configure such a solr.in.sh file out of a template which brings migration effort close down to zero, but some options are no longer required and/or possible. Still need some more time to test and further more - fix our tests :-)

mauritsvanrees commented 7 years ago

I tried c.r.solrinstance master with Solr 5.2 today. The problems already start when running the buildout, because the 5.2 download has a very different structure. parts/solr-download for 5.1 has this:

CHANGES.txt
LICENSE.txt
LUCENE_CHANGES.txt
NOTICE.txt
README.txt
bin
contrib
dist
docs
example
licenses
server

For 5.2 it is this:

LICENSE.txt
NOTICE.txt
README.txt
build.xml
dev-tools
extra-targets.xml
lucene
solr

Running buildout fails on this line because basedir (parts/solr-instance/solr) does not exist: https://github.com/collective/collective.recipe.solrinstance/blob/6.0.0b3/collective/recipe/solrinstance/__init__.py#L577 That can easily be fixed with a condition. When I do that, it goes wrong a few lines later: https://github.com/collective/collective.recipe.solrinstance/blob/6.0.0b3/collective/recipe/solrinstance/__init__.py#L580-L597 There, dist and contrib are not found in the download, so nothing is copied. And then we try to write jetty.xml in a directory that does not exist.

I don't know how difficult it is to fix this. But for now we should say to users that Solr 5.2 is not supported. I have created pull request #59 for this.

gforcada commented 7 years ago

@mauritsvanrees and others, as Solr 6.3.0 is already out, maybe we can skip the 5.x series and focus already on the 6.x versions... we will never catch up anyway :-/