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

[ansible/xray] archive.yml does not cluster RabbitMQ #412

Open
jonathanwehner opened this issue Oct 16, 2024 · 0 comments
Open

[ansible/xray] archive.yml does not cluster RabbitMQ #412

jonathanwehner opened this issue Oct 16, 2024 · 0 comments

Comments

@jonathanwehner
Copy link

jonathanwehner commented Oct 16, 2024

Is this a BUG REPORT or FEATURE REQUEST? (choose one):
Bug?

Which installer:
Ansible

Which product and version (eg: ansible & collection version - 7.24.2):
Ansible collection/Xray 3.102.3

Which operating system and version(eg: ubuntu & version - 20.4):
Debian Bullseye

Which product license (Enterprise/Pro):
Enterprise+

What happened:
archive.yml does not provide the correct answers to the installer script which add the rabbitmq active node name to secondary node's system.yaml file.

    - {
        "expecting": "are you adding an additional node",
        "sending": "{% if xray_ha_node_type is defined and xray_ha_node_type == 'master' %}n{% else %}y{% endif %}"
      }

The script will answer y to add an additional node and reach the rabbitmq prompts without adding an undocumented value for xray_ha_node_type to the secondary nodes.

    - {
        "expecting": "rabbitmq active node name:",
        "sending": "{{ ansible_machine_id }}"
      }
    - {
        "expecting": "rabbitmq active node ip:",
        "sending": "{{ ansible_host }}"
      }

After adding such a value, these two values refer to the node installing Xray rather than the first node, which we should be clustering RabbitMQ on. The first is the most relevant value, as we would only need the second in Docker Compose installations.

The following does result in a successful clustering:

    - {
        "expecting": "rabbitmq active node name:",
        "sending": "{{ hostvars[groups['xray_servers'][0]]['ansible_hostname'] }}"
      }

What you expected to happen:
The playbook installs an Xray cluster with a clustered RabbitMQ, instead of requiring manual clustering.

How to reproduce it (as minimally and precisely as possible):
Install multiple Xray nodes with the playbook

Anything else we need to know:
No

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

1 participant