mimir icon indicating copy to clipboard operation
mimir copied to clipboard

Error enabling memcached: "IP address lookup yielded no results. No host found or no addresses found" host=mimir-results-cache.default-namespace.svc

Open cha2lenger opened this issue 2 years ago • 2 comments

Describe the bug

I've got an error when I tried to deploy mimir-distributed-3.3.0 helm chart on Kubernetes cluster. Somehow mimir/operations/helm/charts/mimir-distributed/templates/_helpers.tpl when it defines hostnames for memcached services does not add suffix .{{ .Values.global.clusterDomain }} resolving to .cluster.local to them.

{{- define "mimir.chunksCacheAddress" -}}
dns+{{ template "mimir.fullname" . }}-chunks-cache.{{ .Release.Namespace }}.svc:{{ (index .Values "chunks-cache").port }}
{{- end -}}

{{- define "mimir.indexCacheAddress" -}}
dns+{{ template "mimir.fullname" . }}-index-cache.{{ .Release.Namespace }}.svc:{{ (index .Values "index-cache").port }}
{{- end -}}

{{- define "mimir.metadataCacheAddress" -}}
dns+{{ template "mimir.fullname" . }}-metadata-cache.{{ .Release.Namespace }}.svc:{{ (index .Values "metadata-cache").port }}
{{- end -}}

{{- define "mimir.resultsCacheAddress" -}}
dns+{{ template "mimir.fullname" . }}-results-cache.{{ .Release.Namespace }}.svc:{{ (index .Values "results-cache").port }}
{{- end -}}

Is it possible to change it to the following?

{{- define "mimir.chunksCacheAddress" -}}
dns+{{ template "mimir.fullname" . }}-chunks-cache.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}:{{ (index .Values "chunks-cache").port }}
{{- end -}}

{{- define "mimir.indexCacheAddress" -}}
dns+{{ template "mimir.fullname" . }}-index-cache.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}:{{ (index .Values "index-cache").port }}
{{- end -}}

{{- define "mimir.metadataCacheAddress" -}}
dns+{{ template "mimir.fullname" . }}-metadata-cache.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}:{{ (index .Values "metadata-cache").port }}
{{- end -}}

{{- define "mimir.resultsCacheAddress" -}}
dns+{{ template "mimir.fullname" . }}-results-cache.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}:{{ (index .Values "results-cache").port }}
{{- end -}}

Thank you.

cha2lenger avatar Jan 30 '23 22:01 cha2lenger

Thanks for reporting this! If you have time to contribute I'd be happy to review a PR to fix it.

Logiraptor avatar Jan 31 '23 00:01 Logiraptor

Let me try...

cha2lenger avatar Jan 31 '23 01:01 cha2lenger