Skip to content

Fixes #38238 - Mark timed out Ansible jobs as failed - #114

Merged
adamruzicka merged 1 commit into
theforeman:masterfrom
jakduch:fix/38238
Aug 19, 2026
Merged

Fixes #38238 - Mark timed out Ansible jobs as failed#114
adamruzicka merged 1 commit into
theforeman:masterfrom
jakduch:fix/38238

Conversation

@jakduch

@jakduch jakduch commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

AnsibleRunner#publish_exit_status publishes the stored per-host exit statuses. The timeout handler called it before replacing those statuses with failure, so a job killed after exceeding its execution timeout could still report previously successful statuses.

Set every inventory host's exit status to 2 before publishing the timeout result. A regression test verifies that all hosts are marked failed at publication time.

This pull request was assisted by Codex 5.6 Sol High.

@adamruzicka adamruzicka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One scope creep comment inline, otherwise lgtm

Comment thread lib/smart_proxy_ansible/runner/ansible_runner.rb Outdated
@jakduch

jakduch commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

Updated, thanks. The timeout message now comes from #timeout, so manual cancellations no longer report a timeout.

@adamruzicka

Copy link
Copy Markdown
Contributor

Could you please rebase? Hopefully that should make the test failures go away

@jakduch

jakduch commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

@adamruzicka Rebased and fixed the hash iteration. The latest workflow is waiting for approval after the force-push; could you please approve it?

@adamruzicka adamruzicka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🍏

@adamruzicka
adamruzicka merged commit 98b5370 into theforeman:master Aug 19, 2026
10 checks passed
@adamruzicka

Copy link
Copy Markdown
Contributor

Thank you @jakduch !

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