Skip to content
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

Solr container might not have a /tmp/cores directory and solr-sync will fail #32

Open
idiazroncero opened this issue Jun 29, 2022 · 3 comments

Comments

@idiazroncero
Copy link

On a clean Solr container install, i've found repeated times this error when executing make solr-sync (or the script solr-sync.sh) for the first time:

./scripts/solr-sync.sh myproject  
+ PROJECT_NAME=myproject
+ SOLR_CONTAINER=' solr'
+ CORES=' default'
+ for core in ${CORES}
++ docker ps --filter 'name=^myproject_solr' --format '{{ .ID }}'
+ docker cp solr/cores/default b9e7179c6e99:/tmp/cores/default
Error: No such container:path: b9e7179c6e99:/tmp/cores
make: *** [Makefile:69: solr-sync] Error 1

The error points that the directory tmp/cores is nonexistent, and it's right: I had to sh into the container and manually create the directory.

This is happening with the Solr tag 8-4.7.5, but in the past i've reproduced it on other wodby-solr container versions.

The solution might be to try to check if the directory exists and proceed to create it if not.

@omarlopesino
Copy link
Member

I see that the bash sentences are from previous version of Scripthor, this has been refactored at d6cffc2 , @idiazroncero please try using the latest Scripthor version and check if it fixes the problem for you.

In addition to this, I see that currently the cores folder is created in each iteration: https://github.com/Metadrop/scripthor/blob/2.x/bin/solr-sync.sh#L8 but it can be moved out of the loop. Working on a PR for this.

@omarlopesino
Copy link
Member

@idiazroncero may you try to check also this PR and confirm it works to you? #33 . It is just a minor fix.

@omarlopesino
Copy link
Member

@idiazroncero I've tested it by myself and it works fine. Please check the latest Scripthor version whenever you can and confirm everything works okay.

cc @rsanzante the last change done in 2.x (#33) is ready to do a release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants