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

#537 - change solr to no lock #552

Merged
merged 32 commits into from Jan 14, 2019

Conversation

4 participants
@twardnw
Copy link
Member

twardnw commented Aug 9, 2018

No description provided.

@Schnitzel

This comment has been minimized.

Copy link
Member

Schnitzel commented Aug 9, 2018

nice! is this something we need to change on the existing solr containers? of will just a new image fix that also in existing ones?

@twardnw

This comment has been minimized.

Copy link
Member Author

twardnw commented Aug 9, 2018

Folks with customized solr config will need to make this change. I would also like to figure out a way to test this, but as it only seems to happen when a pod is evacuated by a drain, that's escaped me thus far.

@Schnitzel

This comment has been minimized.

Copy link
Member

Schnitzel commented Aug 9, 2018

Isn't the config copied during the entrypoint into a persistent config folder and from that point on always loaded from there and not from what is shipped within the image?

@Schnitzel

This comment has been minimized.

Copy link
Member

Schnitzel commented Aug 15, 2018

So I think we can have two approaches here:
A: either we change the solr system that it always uses the config that is provided from the Image and do not actually copy the config (my preference, as all other images also work like this)
B: We implement an entrypoint which can update an already copied config with some changes (like an update system, but this could lead to errors and other weird stuff)

rtprio and others added some commits Aug 29, 2018

Show resolved Hide resolved images/solr/00-solr-datadir.sh Outdated
Show resolved Hide resolved images/solr/00-solr-datadir.sh Outdated
Show resolved Hide resolved Makefile Outdated
Show resolved Hide resolved docs/using_lagoon/drupal/services/solr.md Outdated
@@ -25,7 +25,8 @@ RUN mkdir -m 700 /git/.ssh && \
git --bare init /git/nginx.git && \
git --bare init /git/features.git && \
git --bare init /git/features-subfolder.git && \
git --bare init /git/elasticsearch.git
git --bare init /git/elasticsearch.git && \
git --bare init /git/solr.git

This comment has been minimized.

@Schnitzel

Schnitzel Sep 17, 2018

Member

I see that we add a new git repo, but is there also a new test for this?

This comment has been minimized.

@rtprio

rtprio Sep 17, 2018

Contributor

I started; but then I realized I wasn't testing the feature that I was developing, only that solr came up and could index and search.

This comment has been minimized.

@Schnitzel

Schnitzel Sep 17, 2018

Member

better than nothing :) how far are you? happy to get this change in and add the tests later

@karlhorky

This comment has been minimized.

Copy link
Member

karlhorky commented Oct 9, 2018

The API data population in the local-dev/api-data/api-data.gql file in this PR will have conflicts with the changes in develop branch (see the develop PR in #675). It's mostly file structure changes (different filename) so it shouldn't be too tough to resolve.

Show resolved Hide resolved images/solr/00-solr-datadir.sh Outdated
Show resolved Hide resolved images/solr/00-solr-datadir.sh Outdated
Show resolved Hide resolved images/solr/00-solr-datadir.sh Outdated

@rtprio rtprio self-assigned this Dec 3, 2018

@Schnitzel Schnitzel added this to ToDo in Lagoon Kanban via automation Dec 6, 2018

@rtprio

This comment has been minimized.

Copy link
Contributor

rtprio commented Dec 7, 2018

testplan

take an existing project with solr. be sure there are some items in the index.

  1. connect to solr, confirm datadir and items in index:
    oc port-forward $(oc get pod -o custom-columns=NAME:.metadata.name --no-headers -l service=solr) 8983
  2. build this branch
  3. push solr to your project:
docker push registry-ch.amazeeio.cloud/drupal-example-master/solr:latest
oc rollout latest solr
  1. update solr deploymentconfig:
oc process \
-p SERVICE_NAME=solr \
-p SAFE_BRANCH=master \
-p SAFE_PROJECT=drupal-example-master \
-p BRANCH=master \
-p PROJECT=drupal-example \
-p LAGOON_GIT_SHA=null \
-p OPENSHIFT_PROJECT=drupal-example=master \
-p REGISTRY=null \
-p SERVICE_IMAGE=docker-registry.default.svc:5000/drupal-example-master/solr \
-f images/oc-build-deploy-dind/openshift-templates/solr/deployment.yml | oc apply -f -
  1. supervise rollout
  2. connect to solr again as step 0; verify datadir has changed, index is still populated. there does not seem to be a way to verify lockType via the ui.

@rtprio rtprio moved this from ToDo to In Progress in Lagoon Kanban Dec 10, 2018

rtprio and others added some commits Dec 20, 2018

refactor solr-datadir entrypoing:
- some more documentation why and how we do things
- rename some env variables
- also handle the case where a solr core is completely empty
- also change lockType to nolock
more refactoring:
- more documentation
- function for fixConfig
- alert user for old way of creating cores

Schnitzel added a commit that referenced this pull request Dec 31, 2018

@Schnitzel Schnitzel merged commit 1364290 into master Jan 14, 2019

1 check passed

continuous-integration/jenkins/pr-merge This commit looks good
Details

Lagoon Kanban automation moved this from In Progress to Done Jan 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment