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

fix: limit enodes and enrs to max 20 #289

Merged
merged 5 commits into from
Nov 29, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions roles/ethereum_post_network_setup/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,36 +18,52 @@
# Generate missing network config files
- name: Generate enodes.txt for EL clients
ansible.builtin.copy:
content: |
{% for host in (groups['ethereum_node']) | sort | unique %}
content: |-
content: |-

Check failure on line 22 in roles/ethereum_post_network_setup/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / job

yaml[key-duplicates]

Duplication of key "content" in mapping
{% for host in (groups['ethereum_node'] | sort | unique)[:20] -%}
{% if hostvars[host]['ethereum_node_fact_el_enode'] is defined %}
{{ hostvars[host]['ethereum_node_fact_el_enode'] }}
{%- if not loop.last %}

{% endif %}
{% endif %}
{% endfor %}
dest: "{{ ethereum_genesis_generator_output_dir }}/metadata/enodes.txt"
mode: "0644"
- name: Generate "bootstrap_nodes.txt" for CL clients
ansible.builtin.copy:
content: |
{% for host in (groups['ethereum_node'] + groups['bootnode']) | sort | unique %}
content: |-
{% for host in ((groups['ethereum_node'] + groups['bootnode']) | sort | unique)[:20] -%}
{% if hostvars[host]['cl_bootnode_fact_enr'] is defined %}
{{ hostvars[host]['cl_bootnode_fact_enr'] }}
{%- if not loop.last %}

{% endif %}
{% endif %}
{% if hostvars[host]['ethereum_node_fact_cl_enr'] is defined %}
{{ hostvars[host]['ethereum_node_fact_cl_enr'] }}
{%- if not loop.last %}

{% endif %}
{% endif %}
{% endfor %}
dest: "{{ ethereum_genesis_generator_output_dir }}/metadata/bootstrap_nodes.txt"
mode: "0644"
- name: Generate "bootstrap_nodes.yaml" for Prysm
ansible.builtin.copy:
content: |
{% for host in (groups['ethereum_node'] + groups['bootnode']) | sort | unique %}
content: |-
{% for host in ((groups['ethereum_node'] + groups['bootnode']) | sort | unique)[:20] -%}
{% if hostvars[host]['cl_bootnode_fact_enr'] is defined %}
- {{ hostvars[host]['cl_bootnode_fact_enr'] }}
{%- if not loop.last %}

{% endif %}
{% endif %}
{% if hostvars[host]['ethereum_node_fact_cl_enr'] is defined %}
- {{ hostvars[host]['ethereum_node_fact_cl_enr'] }}
{%- if not loop.last %}

{% endif %}
{% endif %}
{% endfor %}
dest: "{{ ethereum_genesis_generator_output_dir }}/metadata/bootstrap_nodes.yaml"
Expand Down
Loading