Skip to content

fix(ansible): enable gather_facts for HP masternode play#731

Open
ktechmidas wants to merge 1 commit intov1.0-devfrom
fix/gather-facts-and-infra-docs
Open

fix(ansible): enable gather_facts for HP masternode play#731
ktechmidas wants to merge 1 commit intov1.0-devfrom
fix/gather-facts-and-infra-docs

Conversation

@ktechmidas
Copy link
Contributor

@ktechmidas ktechmidas commented Feb 26, 2026

Summary

  • Changed gather_facts from false to true in the HP masternodes play to fix geerlingguy.filebeat role which requires ansible_facts.os_family
  • Added INFRA.MD documenting dashmate operations, common fixes, and deployment procedures

Test plan

  • Verified full (non-fast) dashmate deploy works with gather_facts: true
  • Confirm no performance regression on full fleet deploy

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Added comprehensive testnet infrastructure operations guide covering architecture overview, dashmate commands, restart procedures, troubleshooting common issues, ProTx lifecycle workflows, deployment commands, IP management, and current node statuses.
  • Chores

    • Updated infrastructure automation configuration to enable system fact collection for improved task execution and variable resolution.

…A.MD

- Changed gather_facts from false to true in the HP masternodes play
  to fix geerlingguy.filebeat role which needs ansible_facts.os_family
- Added INFRA.MD documenting dashmate operations, common fixes, and
  deployment procedures

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Feb 26, 2026

📝 Walkthrough

Walkthrough

Added comprehensive testnet infrastructure operations documentation covering architecture, dashmate commands, common issues, ProTx lifecycle, and AWS management procedures. Modified Ansible deployment configuration to enable fact gathering for HP masternodes during deployment execution.

Changes

Cohort / File(s) Summary
Documentation
INFRA.MD
New infrastructure operations guide with architecture overview, dashmate commands, common issues and fixes, ProTx lifecycle workflows, Ansible deployment procedures, AWS management, and current node status snapshot.
Ansible Configuration
ansible/deploy.yml
Changed HP masternodes play to enable fact gathering (gather_facts: true) instead of skipping it, allowing dynamic variable resolution and condition evaluation during deployment.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Hop, hop, the docs now shine so bright,
Infrastructure paths laid clear in sight,
Ansible facts now gather with delight,
The testnet runs through day and night! 🚀

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change in the PR: enabling gather_facts for the HP masternode Ansible play, which is the primary fix. The addition of INFRA.MD documentation is secondary.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/gather-facts-and-infra-docs

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
INFRA.MD (1)

258-258: Remove hardcoded source line references from runbook text.

The “line 338” reference will drift on future edits and become inaccurate. Reference the play name instead.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@INFRA.MD` at line 258, Remove the hardcoded "line 338" reference and instead
refer to the specific Ansible play in deploy.yml that sets gather_facts (the
play that configures/installs geerlingguy.filebeat); update the wording to say
"the deploy.yml play that sets gather_facts for the Filebeat role" or similar so
future edits won't break the pointer and readers can locate the setting by play
name rather than a line number.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@ansible/deploy.yml`:
- Line 338: Change the play to keep gather_facts: false, add strategy: free and
the dashmate_deploy tag on the play, and create a pre-task that runs the ansible
setup module to collect only required facts (e.g., ansible_facts.os_family)
instead of full facts; update the play header (gather_facts → false, add
strategy: free and tags: [dashmate_deploy]) and add a lightweight setup pre-task
using the setup module with the filter parameter to fetch only the minimal facts
downstream roles need.

In `@INFRA.MD`:
- Around line 283-293: The "Current Node Status" table in INFRA.MD exposes
concrete hostnames and an IP (e.g., rows referencing hp-masternode-3,
hp-masternode-4, hp-masternode-6, hp-masternode-16, hp-masternode-18,
hp-masternode-22, hp-masternode-29 and the IP 68.67.122.3); remove or redact
these identifiers and the public IP from the committed doc and either move the
detailed operational status to a private runbook or replace the table with
non-identifying examples (e.g., "masternode-A", "masternode-B", status examples)
and a note pointing to the secure runbook for real values so no live
infrastructure details remain in the public repo.

---

Nitpick comments:
In `@INFRA.MD`:
- Line 258: Remove the hardcoded "line 338" reference and instead refer to the
specific Ansible play in deploy.yml that sets gather_facts (the play that
configures/installs geerlingguy.filebeat); update the wording to say "the
deploy.yml play that sets gather_facts for the Filebeat role" or similar so
future edits won't break the pointer and readers can locate the setting by play
name rather than a line number.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3cf17de and 8f72bf0.

📒 Files selected for processing (2)
  • INFRA.MD
  • ansible/deploy.yml

hosts: hp_masternodes
become: true
gather_facts: false
gather_facts: true
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Keep gather_facts disabled; gather only required facts explicitly.

Turning this on breaks the fast-deploy baseline for this play. Keep gather_facts: false and add a minimal setup pre-task to fetch only the facts needed by downstream roles (for example OS family).

Proposed change
 - name: Set up core and platform on HP masternodes
   hosts: hp_masternodes
   become: true
-  gather_facts: true
+  gather_facts: false
   # Using strategy: free for parallel execution to improve deployment speed
   # This is intentional for performance optimization
   strategy: free  # noqa: run-once[play]
   serial: 0
   pre_tasks:
+    - name: Gather required OS fact for role conditionals/templates
+      ansible.builtin.setup:
+        filter:
+          - ansible_os_family
     - name: Check inventory for HP masternodes
       ansible.builtin.set_fact:
         node: "{{ hp_masternodes[inventory_hostname] }}"

As per coding guidelines "ansible/deploy.yml: Add dashmate_deploy tag, set gather_facts: false, and use strategy: free in ansible/deploy.yml to enable fast, parallel deployments".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ansible/deploy.yml` at line 338, Change the play to keep gather_facts: false,
add strategy: free and the dashmate_deploy tag on the play, and create a
pre-task that runs the ansible setup module to collect only required facts
(e.g., ansible_facts.os_family) instead of full facts; update the play header
(gather_facts → false, add strategy: free and tags: [dashmate_deploy]) and add a
lightweight setup pre-task using the setup module with the filter parameter to
fetch only the minimal facts downstream roles need.

Comment on lines +283 to +293
## Current Node Status (as of 2026-02-26)

| Node | Status | Notes |
|------|--------|-------|
| hp-masternode-3 | READY, PoSe=0, Platform syncing | Freshly registered with new IP 68.67.122.3 |
| hp-masternode-4 | READY, PoSe=0, Platform syncing | Re-registered in previous session |
| hp-masternode-6 | READY, PoSe=0, Platform syncing | Re-registered in previous session |
| hp-masternode-16 | READY, PoSe=0, Platform up | rs-dapi metrics config updated |
| hp-masternode-18 | Syncing (99.97%) | Recently unbanned, waiting for core sync |
| hp-masternode-22 | Rebuilding chainstate | EvoDB corruption + disk full, logs truncated, rebuilding |
| hp-masternode-29 | Rebuilding chainstate | Stuck on conflicting block, evoDB wiped, rebuilding |
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Avoid committing live node status and concrete infrastructure identifiers.

This section exposes operational state and host mapping (including a concrete public IP). Move this to a private runbook or redact to non-identifying examples to reduce reconnaissance risk.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@INFRA.MD` around lines 283 - 293, The "Current Node Status" table in INFRA.MD
exposes concrete hostnames and an IP (e.g., rows referencing hp-masternode-3,
hp-masternode-4, hp-masternode-6, hp-masternode-16, hp-masternode-18,
hp-masternode-22, hp-masternode-29 and the IP 68.67.122.3); remove or redact
these identifiers and the public IP from the committed doc and either move the
detailed operational status to a private runbook or replace the table with
non-identifying examples (e.g., "masternode-A", "masternode-B", status examples)
and a note pointing to the secure runbook for real values so no live
infrastructure details remain in the public repo.

Copy link
Collaborator

@vivekgsharma vivekgsharma left a comment

Choose a reason for hiding this comment

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

LGTM

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.

2 participants