e2e/qa: poll for device pubkey before running Ansible restart#3646
Merged
ben-malbeclabs merged 1 commit intomainfrom May 1, 2026
Merged
e2e/qa: poll for device pubkey before running Ansible restart#3646ben-malbeclabs merged 1 commit intomainfrom
ben-malbeclabs merged 1 commit intomainfrom
Conversation
After a delete+recreate cycle, the RPC may not have propagated the new device yet. The Ansible restart tasks query the ledger for the pubkey via the CLI; if the query returns null, the daemon gets configured with -pubkey null and crashes. Poll until the CLI returns the expected pubkey before invoking Ansible.
elitegreg
approved these changes
May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
doublezero device listand getsnull, configuring the daemon with-pubkey nullContext
Follow-up to #3641. After the provisioning test delete+recreates a device,
RunAnsibleAgentRestartimmediately invokes Ansible which queries the ledger for the pubkey. In testing, the RPC hadn't caught up yet —device listreturned an empty array,jqproducednull, and the daemon was configured with-pubkey null.The fix polls
doublezero device list --code <code> --jsonvia SSH to the bm host until it returns the expected pubkey (up to 2 minutes, 5s intervals) before invoking Ansible.Testing Verification
-pubkey nullin the daemon config despite Ansible runninggo build -tags=qa ./e2e/internal/qa/compiles cleanly