Fail playbook when Ironic node reaches deploy failed state#32
Fail playbook when Ironic node reaches deploy failed state#32agonzalezrh merged 1 commit intomainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughA failure condition was added to the "Wait for node to reach active state" task in the Ironic node configuration playbook: the task now fails immediately if the node provisioning state becomes "deploy failed", while existing retry/until behavior remains unchanged. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@playbooks/tasks/configure_hardware_ironic_node.yaml`:
- Line 192: The current per-host loop uses the failed_when condition checking
node_state.json.provision_state == "deploy failed", which causes the loop to
bail out and prevent subsequent cleanup tasks like wait_for_deployment.yaml from
running; modify the playbook so the loop body remains the same (keep the
failed_when check) but wrap the entire per-host loop in an Ansible block with an
always: section (or use block/rescue/always) so that cleanup tasks (e.g.,
wait_for_deployment.yaml and the Ironic detach/virtual media cleanup tasks) are
executed regardless of a deploy failure; ensure references to the failed_when
condition, node_state.json.provision_state, and wait_for_deployment.yaml are
preserved so the semantics and logging remain unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: dcae7010-c833-4213-a8d8-39c9bcf96b21
📒 Files selected for processing (1)
playbooks/tasks/configure_hardware_ironic_node.yaml
|
@agonzalezrh this change as it's now it's failing the playbook when the node goes to |
2c65a27 to
5349652
Compare
Stop silently accepting 'deploy failed' as a successful deployment outcome. Add failed_when so the task fails immediately when the node reaches that state, while still exiting the retry loop early.
5349652 to
bc97dc2
Compare
Stop silently accepting 'deploy failed' as a successful deployment outcome.
Add
failed_whenso the task fails immediately when the node reaches that state, while still exiting the retry loop early.Summary by CodeRabbit