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

ansible_mitogen: Templated connection timeout #1201

Merged
merged 4 commits into from
Dec 18, 2024

Conversation

moreati
Copy link
Member

@moreati moreati commented Dec 10, 2024

Ansible >= 4 (ansible-core >= 2.11) the SSH plugin has a timeout option and with variable ansible_ssh_timeout, but not a ansible_timeout variable. The local plugin has no such option or variable(s). However ansible_timeout is backfilled for all conection plugins, by legacy mechanisms that populate the play context attribute:

  • ansible.constants.COMMON_CONNECTION_VARS
  • ansible.constants.MAGIC_VARIABLE_MAPPING

The timeout keyword is for task completion timeout, not connection timeout.

refs #1083

The previous commit (53b4881 in PR 1200) was
not intended to change these values, but some WIP slipped through. This
partially reverts that commit so the two changes (moving the monkey patch,
making the monkey patch more capable) exist in distinct commits.
This will mitigate the impact of mitogen-hq#1185 a little, which causes the job to
continue running without making progress, until it hits this timeout.
Successful jobs are typically completing in 8 - 12 minutes.

refs mitogen-hq#1185
@moreati moreati changed the title WIP ansible_mitogen: Templated connection timeout Dec 10, 2024
@moreati moreati force-pushed the issue1083-timeout branch 25 times, most recently from 29108f1 to cbfaff9 Compare December 15, 2024 17:31
@moreati moreati force-pushed the issue1083-timeout branch 3 times, most recently from 8f25360 to ebc5f4d Compare December 15, 2024 19:32
@moreati
Copy link
Member Author

moreati commented Dec 15, 2024

  • ansible.constants.DEFAULT_TIMEOUT - all Ansible versions, default = 30
  • ansible.plugins.connection.ssh timeout option - ansible-core >= 2.11, default = 10

Ansible >= 4 (ansible-core >= 2.11) the SSH plugin has a `timeout` option and
with variable `ansible_ssh_timeout`, but not a `ansible_timeout` variable.
The local plugin has no such option or variable(s). However `ansible_timeout`
is backfilled for all conection plugins, by legacy mechanisms that populate
the play context attribute:
- `ansible.constants.COMMON_CONNECTION_VARS`
- `ansible.constants.MAGIC_VARIABLE_MAPPING`

The `timeout` keyword is for task completion timeout, not connection timeout.
@moreati moreati marked this pull request as ready for review December 18, 2024 13:33
@moreati moreati merged commit e8005ec into mitogen-hq:master Dec 18, 2024
22 checks passed
@moreati moreati deleted the issue1083-timeout branch December 18, 2024 13:33
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.

1 participant