Revert "[rabbitmq] Use short rabbitmq node name"

Rabbitmqcluster does not work with short node names, as
there is unresolvable dependency in dns resolution, it is
not possible to resolve only pod name svc must be added.

This reverts commit bb7580944a.

Change-Id: I42b25ba4f569bae94bbc2939a1022bd14e66e527
This commit is contained in:
Vasyl Saienko 2024-09-24 15:33:59 +00:00
parent 0b1ae682e0
commit 9e2b9d9780
5 changed files with 7 additions and 6 deletions

View File

@ -15,6 +15,6 @@ apiVersion: v1
appVersion: v3.12.0
description: OpenStack-Helm RabbitMQ
name: rabbitmq
version: 0.1.41
version: 0.1.42
home: https://github.com/rabbitmq/rabbitmq-server
...

View File

@ -82,7 +82,7 @@ if ! [ "${POD_INCREMENT}" -eq "0" ] && ! [ -d "/var/lib/rabbitmq/mnesia" ] ; the
# Wait for server to join cluster, reset if it does not
POD_INCREMENT=$(echo "${MY_POD_NAME}" | awk -F '-' '{print $NF}')
END=$(($(date +%s) + 180))
while ! rabbitmqctl --node $(get_node_name 0) -q cluster_status | grep -q "$(get_node_name ${POD_INCREMENT})"; do
while ! rabbitmqctl -l --node $(get_node_name 0) -q cluster_status | grep -q "$(get_node_name ${POD_INCREMENT})"; do
sleep 5
NOW=$(date +%s)
[ $NOW -gt $END ] && reset_rabbit

View File

@ -79,7 +79,7 @@ spec:
- name: RABBIT_TIMEOUT
value: "{{ .Values.conf.rabbitmq_exporter.rabbit_timeout }}"
- name: RABBIT_URL
value: {{ printf "%s" $protocol }}://{{ tuple "oslo_messaging" "internal" . | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }}:{{ tuple "oslo_messaging" "internal" $protocol . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
value: {{ printf "%s" $protocol }}://{{ tuple "oslo_messaging" "internal" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }}:{{ tuple "oslo_messaging" "internal" $protocol . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
- name: RABBIT_USER
valueFrom:
secretKeyRef:

View File

@ -245,13 +245,13 @@ spec:
fieldRef:
fieldPath: status.podIP
- name: RABBITMQ_USE_LONGNAME
value: "false"
value: "true"
- name: RABBITMQ_NODENAME
value: "rabbit@$(MY_POD_NAME)"
value: "rabbit@$(MY_POD_NAME).{{ tuple "oslo_messaging" "internal" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }}"
- name: K8S_SERVICE_NAME
value: {{ tuple "oslo_messaging" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
- name: K8S_HOSTNAME_SUFFIX
value: ".{{ tuple "oslo_messaging" "internal" . | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }}"
value: ".{{ tuple "oslo_messaging" "internal" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }}"
- name: RABBITMQ_ERLANG_COOKIE
value: "{{ $envAll.Values.endpoints.oslo_messaging.auth.erlang_cookie }}"
- name: PORT_HTTP

View File

@ -41,4 +41,5 @@ rabbitmq:
- 0.1.39 Allow to bootstrap rabbitmq with initial config
- 0.1.40 Set password for guest user rabbitmq
- 0.1.41 Use short rabbitmq node name
- 0.1.42 Revert Use short rabbitmq node name
...