Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

task timeout failure should indicate timeout for programatic use #83158

Open
1 task done
sivel opened this issue Apr 29, 2024 · 3 comments · May be fixed by #83198 or #83206
Open
1 task done

task timeout failure should indicate timeout for programatic use #83158

sivel opened this issue Apr 29, 2024 · 3 comments · May be fixed by #83198 or #83206
Labels
easyfix This issue is considered easy to fix by aspiring contributors. feature This issue/PR relates to a feature request. has_pr This issue has an associated PR. jira Associated with a Jira

Comments

@sivel
Copy link
Member

sivel commented Apr 29, 2024

Summary

When using the timeout keyword, when a task fails due to timeout, we should provide a timeout or similar key in the task result. Right now it is just failed=True, msg=msg.

AAPRFE-1208

Issue Type

Feature Idea

Component Name

lib/ansible/executor/task_executor.py

Additional Information

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@sivel sivel added the jira Associated with a Jira label Apr 29, 2024
@ansibot ansibot added feature This issue/PR relates to a feature request. needs_triage Needs a first human triage before being processed. labels Apr 29, 2024
@ansibot
Copy link
Contributor

ansibot commented Apr 29, 2024

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the component bot command.

@sivel sivel changed the title task timeout failure should indicate timeout for programtic use task timeout failure should indicate timeout for programatic use Apr 29, 2024
@sivel sivel added the easyfix This issue is considered easy to fix by aspiring contributors. label Apr 29, 2024
@mkrizek mkrizek removed the needs_triage Needs a first human triage before being processed. label Apr 30, 2024
@DivyanshuBist DivyanshuBist linked a pull request May 4, 2024 that will close this issue
@ansibot ansibot added the has_pr This issue has an associated PR. label May 4, 2024
@bcoca
Copy link
Member

bcoca commented May 6, 2024

This is the msg

 msg = 'The %s action failed to execute in the expected time frame (%d) and was terminated' % (self._task.action, self._task.timeout)

Not sure what else is needed? a traceback? the time taken?

@sivel
Copy link
Member Author

sivel commented May 6, 2024

Instead of inspecting the msg, we should just add a new timeout=True or similar to the response.

The original ask was a new callback event, but we instead said we could just add a new key that can be inspected by the current callback events.

@bcoca bcoca linked a pull request May 6, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easyfix This issue is considered easy to fix by aspiring contributors. feature This issue/PR relates to a feature request. has_pr This issue has an associated PR. jira Associated with a Jira
Projects
ansible-core 2.18
  
Awaiting triage
4 participants