Skip to content

feat(infra): Z→Q migration — Ansible/Terraform/monitoring rename (PR 2/3)#14

Merged
moscowchill merged 1 commit into
devfrom
feat/q-migration-infra
Apr 13, 2026
Merged

feat(infra): Z→Q migration — Ansible/Terraform/monitoring rename (PR 2/3)#14
moscowchill merged 1 commit into
devfrom
feat/q-migration-infra

Conversation

@moscowchill
Copy link
Copy Markdown
Contributor

Summary

  • Renames the QRL execution-client binary gzondgqrl and Ansible role directory to match the upstream project rename (go-zondgo-qrl).
  • Renames all Ansible variables gzond_*gqrl_* (defaults, playbooks, inventory, group_vars), cross-role references (qrysm-beacon, security, monitoring), and the systemd service template.
  • Renames Terraform variables zond_rpc_urlqrl_rpc_url, env ZOND_RPC_URLQRL_RPC_URL across modules (validator-node, backup-node, monitoring-server, testnet env).
  • Renames Prometheus scrape job gzondgqrl, alert rules GzondDown/LowPeers/SyncingGqrl*, Grafana dashboard queries, Alertmanager inhibit rules.
  • Updates infrastructure/README.md, infrastructure/docs/ARCHITECTURE.md, monitoring/README.md, and inline comments.

Scope note

Runbooks and standalone documentation (infrastructure/docs/runbooks/*, DEPLOYMENT.md, validator-integration.md, top-level README.md, docs/architecture.md) are intentionally out of scope and will be covered by PR 3.

Files changed (33)

  • 1 Ansible role dir renamed + service template renamed
  • 14 Ansible files updated
  • 8 Terraform files updated
  • 3 shell scripts updated
  • 5 monitoring config/dashboard files updated
  • 2 top-level README/ARCHITECTURE docs adjacent to infra

Test plan

  • Ansible dry-run on a disposable host: ansible-playbook -i inventory.ini.template playbooks/deploy-node.yml --check --diff
  • terraform -chdir=infrastructure/terraform validate + terraform plan -var-file=environments/testnet/terraform.tfvars
  • promtool check rules monitoring/prometheus/rules/validator-alerts.yml
  • promtool check config monitoring/prometheus/prometheus.yml
  • Grafana dashboard JSON imports cleanly (visual)
  • Grep for residual gzond, Zond, ZOND_ in changed dirs (excluding runbooks/docs) — should be empty

…monitoring

Part 2 of the Z→Q testnet migration. Renames the execution-client binary
(gzond → gqrl), its Ansible role directory, all gzond_* variables, the
systemd service template, cross-role references (qrysm-beacon, security,
monitoring), Terraform variables (zond_rpc_url → qrl_rpc_url, ZOND_RPC_URL →
QRL_RPC_URL), Prometheus scrape job + alert names (Gzond* → Gqrl*),
Grafana dashboard queries, and infrastructure README/ARCHITECTURE comments.

Runbooks and standalone documentation are intentionally out of scope and
will be covered in PR 3.
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request performs a comprehensive rename of the execution client from gzond to gqrl across the entire infrastructure codebase, including Ansible roles, Terraform modules, monitoring, and documentation. Feedback was provided to improve the gqrl Ansible role by ensuring the build task correctly handles binary updates, refining the sync status display for clarity, and utilizing the defined log level variable in the systemd service template.

Comment on lines +45 to +53
- name: Build gqrl from source
shell: |
cd /opt/quantapool/gqrl/source
make gqrl
cp build/bin/gqrl {{ gqrl_binary_path }}
args:
creates: "{{ gqrl_binary_path }}"
when: gqrl_clone.changed or not ansible_check_mode
notify: restart gqrl
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The creates argument in this task will prevent the gqrl binary from being updated when the source code changes. Since the binary already exists at gqrl_binary_path after the first deployment, Ansible will skip this task even if gqrl_clone.changed is true. Additionally, the when condition gqrl_clone.changed or not ansible_check_mode is problematic as it will attempt to run the build on every normal execution (since not ansible_check_mode is true), which is inefficient.

Consider removing creates and using a more robust when condition that checks if the source changed or if the binary is missing.

- name: Build gqrl from source
  shell: |
    cd /opt/quantapool/gqrl/source
    make gqrl
    cp build/bin/gqrl {{ gqrl_binary_path }}
  when: gqrl_clone.changed or not ansible_check_mode
  notify: restart gqrl


- name: Display gqrl sync status
debug:
msg: "gqrl sync status: {{ sync_status.json.result | default('starting') }}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The sync status message is counter-intuitive when the node is fully synced. The eth_syncing RPC method returns false when the node is synced, which results in the message gqrl sync status: False. It would be clearer to explicitly state 'Synced' or 'Syncing'.

    msg: "gqrl sync status: {{ 'Synced' if sync_status.json.result == false else 'Syncing' }}"

--metrics.addr {{ gqrl_metrics_addr }} \
--metrics.port {{ gqrl_metrics_port }} \
{% endif %}
--verbosity 3
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The verbosity level is hardcoded to 3, which ignores the gqrl_log_level variable defined in the role's defaults (infrastructure/ansible/roles/gqrl/defaults/main.yml). It is better to use the variable to allow environment-specific overrides.

  --verbosity {{ gqrl_verbosity | default(3) }}

@moscowchill moscowchill merged commit 872711a into dev Apr 13, 2026
2 checks passed
@moscowchill moscowchill deleted the feat/q-migration-infra branch April 13, 2026 13:14
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

Successfully merging this pull request may close these issues.

1 participant