Repository navigation
fix(updater): the internal-key proposal step can no longer abort a node's update (#21343) - #21399
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 9 minutes. View limit details
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. |
✅ SSOT Configuration Compliance: Passing🎉 No new hardcoded values of either class — Known backlog in |
|
Verdict: CHANGES @ 91f8d16 The rescue is the right shape and is safe to continue past, but the PR leaves the actual defect in place, so the credential re-alignment stays dead on every run. One rescue-side hazard is also unaddressed.
Checked and fine:
Not verified: no ansible run; the root cause is a source-reading inference. The single line that would settle it is the rescue report (or the task run without |
… the infrastructure dict (#21343)
|
Round update for the review at 91f8d16, now at 2efc171:
|
|
Verdict: CHANGES @ 2efc171 The rescue hardening looks sound by reading. The URL fix looks like it swaps one templating fatal for another, and the new group_vars expressions are not shown to be safe.
Unproven until a host update runs:
|
|
Round update for the review at 2efc171, now at c4c8522:
|
|
Verdict: CHANGES @ c4c8522 The root-cause fix is now sound for the update path. One tag-selection regression remains, introduced by this PR.
Unproven until a host update runs:
|
|
Round update (febeb38): the vars load now carries the tags of every task that reads its variables ( |
|
Verdict: CHANGES @ febeb38 The commit fixes
Selection table:
Unproven until a host update runs:
|
…ns cannot bypass it (#21343)
|
Round update (fdefeda): the backend vars load is tagged exactly |
|
Verdict: APPROVE @ fdefeda No findings.
Unproven until an update runs on a host:
|
|
Pre-board guard lane failure (guards shard 2/6) was a stale assertion in the test, not a playbook defect: the rescue now binds the failed result to a variable with a default, so the literal spelling the test searched for is gone. The test now pins the behaviour: the rescue binds from the failed result with a default, reads the HTTP status from that binding with a default, reports the field names, and never interpolates the raw result (bare or via to_json); an in-test control confirms each of those 'print it all' spellings is still caught. All other tests in the file were read against the current playbook, claim file and vars files and match. Pushed as 0e6babe; no playbook change. |
|
Verdict: APPROVE @ 0e6babe Conditional on the pre-board guard-lane run on this head ending green or green_with_skips. At the time of writing that run (headSha 0e6babe) was still queued. The only non-merge commit since fdefeda is 0e6babe, and it touches only the test file. At fdefeda the lane's one failure was Findings:
Walk of every assertion against the files at the branch tip, done by loading the YAML and checking each condition:
Unproven until an update runs on a host:
|
Refs #21343
Refs #20750
Thinking Path
Internal key | Propose re-aligning the backend's key to the SLM's (#20750): logged FAILED about 2 ms after its banner on every run (output hidden byno_log), so no remote module ran. Everything after it in Play 2 is skipped (restarts of the backend, Celery, AI stack and workers; module syncs; user-frontend sync and build).failed_when: falseabsorbs only a module result, so an HTTP refusal would have been reported, not fatal. The failure is in templating the task's arguments.slm_host, subnet, gateway). The executor then symlinksinventory/group_vars/beside it, soall.ymlandinfrastructure.ymlload for the groups the node is in.infrastructure(dict)infrastructuregroupinventory/group_vars/infrastructure.yml, linked beside the generated inventoryinfrastructure.hosts.*groups[...][0]backend_portplaybooks/vars/backend-env.ymlis loadedinclude_varsin Play 2vnc_nodesgroupall.ymlalready treats it as optionalinfrastructure.ports.backend; looking upinfrastructuretemplates the whole dict, and itsreserved_1entry indexes thevnc_nodesgroup, which does not exist, so templating raised before any HTTP call. The evidence supports "defined but raising", not "undefined".any_errors_fatal.What Changed
playbooks/update-all-nodes.yml: the key URL (both include sites) and the "Wait for API to be ready" probe usebackend_port, the variable the backend's unit and env are rendered from in this play (playbooks/vars/backend-env.yml). The include of that file moved before the proposal include and is tagged exactlyalways: readers sit underbackend,envandrestart, and a skip tag matches any tag on a task, so any tag other thanalwayscould be skipped while a reader still ran. Its'backend' in group_namescondition is unchanged;--skip-tags alwaysis the one selection that skips it. The probe's hardcoded port is gone, with its stale entry in the hardcoded-values baseline.inventory/group_vars/infrastructure.yml: all 8 host entries use the idiomall.ymluses forvnc_nodes:{{ (hostvars[groups['x'][0]]['ansible_host'] | default('127.0.0.1')) if groups.get('x') else '127.0.0.1' }}. Same value when the group exists._shared/tasks/realign_internal_api_key_claim.yml: the propose/claim unit is a block with a rescue that records a key-free line (HTTP status, result field names, error text only if it holds neither key; braces neutralised; keys cast to strings; every variable defaulted) and prints it.repo_tests/updater_realign_proposal_not_fatal_21343_test.py: guards for the rescue, the URL not using theinfrastructuredict, every URL variable being defined by the vars file loaded before it or by the registry inventory's globals (shared parse cache), the probe using the same variable, the vars load tagged exactlyalwaysand preceding its first reader, and the guarded idiom for each host entry.Verification
infrastructuretemplating was the actual failure; that the guarded idiom behaves as intended on the controller's Ansible version; whether ano_logtask's failed result keepsmsgfor the rescue line; that a rescued failure avoids the play'sany_errors_fatal(the playbook's agent-redeploy rescue relies on it).Model Used
Claude Sonnet 5.5