PreferredAI / helm-charts

Preferred.AI Helm Chart Repository
https://charts.preferred.ai
Apache License 2.0
6 stars 7 forks source link

[solr] ZK connection string (2 hosts) is different from the dynamic ensemble config (3 hosts) #31

Closed xrow closed 3 years ago

xrow commented 3 years ago

Affected chart Lastest version and before

Describe the bug

When

is set it will lead to a warning in the solr backend. I think this can be improved.

The idea might be to hand over all svcs instead of the headless service.

The warning is:

Errors: Your ZK connection string (2 hosts) is different from the dynamic ensemble config (3 hosts). Solr does not currently support dynamic reconfiguration and will only be able to connect to the zk hosts in your connection string. ZK connection string: zookeeper-headless:2181,zookeeper-headless:2181 Ensemble size: 3 Ensemble mode: ensemble Dynamic reconfig enabled: true

To Reproduce Use Config

        - name: "ZK_HOST"
          value: "{{ include "solr.zookeeper-service-name" . }}:2181,{{ include "solr.zookeeper-service-name" . }}:2181"

Expected behavior

No warning in SOLR backend

Screenshots If applicable, add screenshots to help explain your problem.

Helm and Kubernetes: does not matter

Additional context https://issues.apache.org/jira/browse/SOLR-14371

lwj5 commented 3 years ago

Hi there, I think you are looking at the wrong issue, it should be https://issues.apache.org/jira/browse/SOLR-13801 which is duplicated by https://issues.apache.org/jira/browse/SOLR-14389 mentioned in SOLR-14371 you provided.

This issue is mentioned in the chart README.md

The idea might be to hand over all svcs instead of the headless service.

What do you mean by "hand over all svcs"?

xrow commented 3 years ago

Here is a sample of what i did for varnish for a ENV parameter

  HTTPCACHE_PURGE_SERVER: "{{- range $index, $v := until ( int .Values.varnish.replicas ) -}}http://{{ include "call-nested" (list $ "varnish" "varnish.fullname") }}-{{$index}}.{{ include "call-nested" (list $ "varnish" "varnish.fullname") }}.{{ $.Release.Namespace }}.svc.cluster.local:6081{{- if ne (add $index 1) ( int $.Values.varnish.replicas) -}},{{- end -}}{{- end -}}"
lwj5 commented 3 years ago

It’s a possible solution. But there is a drawback.

If auto scaling were to be enabled on ZK for example, then the connection string will not change, which can be an issue. Using the current way will allow Solr to randomly connect to any number of ZK.

Like I’ve addressed in the README.md it is merely a cosmetic issue, I don’t see the value of resolving a cosmetic issue and incurring a functional drawback.

xrow commented 3 years ago

Ok I though i better raise the finding. I thought it is some defect.

lwj5 commented 3 years ago

No worries! Good to be on the safe side. Thanks for understanding

lwj5 commented 3 years ago

If you would like to know more refer to #21