mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 14:20:22 -07:00
Add default Network timeout values to network troubleshooting guide (#51555)
* add toc and default timeout values * make options more obvious
This commit is contained in:
parent
e284d21139
commit
9c058d3121
1 changed files with 52 additions and 46 deletions
|
@ -4,6 +4,9 @@
|
||||||
Network Debug and Troubleshooting Guide
|
Network Debug and Troubleshooting Guide
|
||||||
***************************************
|
***************************************
|
||||||
|
|
||||||
|
.. contents::
|
||||||
|
:local:
|
||||||
|
|
||||||
|
|
||||||
Introduction
|
Introduction
|
||||||
============
|
============
|
||||||
|
@ -14,8 +17,6 @@ This section discusses how to debug and troubleshoot network modules in Ansible
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
How to troubleshoot
|
How to troubleshoot
|
||||||
===================
|
===================
|
||||||
|
|
||||||
|
@ -442,11 +443,10 @@ of inactivity), simple delete the socket file.
|
||||||
Timeout issues
|
Timeout issues
|
||||||
==============
|
==============
|
||||||
|
|
||||||
Timeouts
|
Persistent connection idle timeout
|
||||||
--------
|
----------------------------------
|
||||||
Persistent connection idle timeout:
|
|
||||||
|
|
||||||
For example:
|
By default, ``ANSIBLE_PERSISTENT_CONNECT_TIMEOUT`` is set to 30 (seconds). You may see the following error if this value is too low:
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
@ -467,8 +467,12 @@ To make this a permanent change, add the following to your ``ansible.cfg`` file:
|
||||||
[persistent_connection]
|
[persistent_connection]
|
||||||
connect_timeout = 60
|
connect_timeout = 60
|
||||||
|
|
||||||
Command timeout:
|
Command timeout
|
||||||
For example:
|
---------------
|
||||||
|
|
||||||
|
By default, ``ANSIBLE_PERSISTENT_COMMAND_TIMEOUT`` is set to 30 (seconds). Prior versions of Ansible had this value set to 10 seconds by default.
|
||||||
|
You may see the following error if this value is too low:
|
||||||
|
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
@ -476,33 +480,33 @@ For example:
|
||||||
|
|
||||||
Suggestions to resolve:
|
Suggestions to resolve:
|
||||||
|
|
||||||
Options 1 (Global command timeout setting):
|
* Option 1 (Global command timeout setting):
|
||||||
Increase value of command timeout in configuration file or by setting environment variable.
|
Increase value of command timeout in configuration file or by setting environment variable.
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
export ANSIBLE_PERSISTENT_COMMAND_TIMEOUT=60
|
export ANSIBLE_PERSISTENT_COMMAND_TIMEOUT=60
|
||||||
|
|
||||||
To make this a permanent change, add the following to your ``ansible.cfg`` file:
|
To make this a permanent change, add the following to your ``ansible.cfg`` file:
|
||||||
|
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
|
|
||||||
[persistent_connection]
|
[persistent_connection]
|
||||||
command_timeout = 60
|
command_timeout = 60
|
||||||
|
|
||||||
Option 2 (Per task command timeout setting):
|
* Option 2 (Per task command timeout setting):
|
||||||
Increase command timeout per task basis. All network modules support a
|
Increase command timeout per task basis. All network modules support a
|
||||||
timeout value that can be set on a per task basis.
|
timeout value that can be set on a per task basis.
|
||||||
The timeout value controls the amount of time in seconds before the
|
The timeout value controls the amount of time in seconds before the
|
||||||
task will fail if the command has not returned.
|
task will fail if the command has not returned.
|
||||||
|
|
||||||
For local connection type:
|
For local connection type:
|
||||||
|
|
||||||
.. FIXME: Detail error here
|
.. FIXME: Detail error here
|
||||||
|
|
||||||
Suggestions to resolve:
|
Suggestions to resolve:
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
- name: save running-config
|
- name: save running-config
|
||||||
ios_command:
|
ios_command:
|
||||||
|
@ -510,13 +514,13 @@ Suggestions to resolve:
|
||||||
provider: "{{ cli }}"
|
provider: "{{ cli }}"
|
||||||
timeout: 30
|
timeout: 30
|
||||||
|
|
||||||
For network_cli, netconf connection type (applicable from 2.7 onwards):
|
For network_cli, netconf connection type (applicable from 2.7 onwards):
|
||||||
|
|
||||||
.. FIXME: Detail error here
|
.. FIXME: Detail error here
|
||||||
|
|
||||||
Suggestions to resolve:
|
Suggestions to resolve:
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
- name: save running-config
|
- name: save running-config
|
||||||
ios_command:
|
ios_command:
|
||||||
|
@ -530,8 +534,10 @@ In this case, changing the timeout value from the default 30 seconds to 60
|
||||||
seconds will prevent the task from failing before the command completes
|
seconds will prevent the task from failing before the command completes
|
||||||
successfully.
|
successfully.
|
||||||
|
|
||||||
Persistent socket connect timeout:
|
Persistent connection retry timeout
|
||||||
For example:
|
-----------------------------------
|
||||||
|
|
||||||
|
By default, ``ANSIBLE_PERSISTENT_CONNECT_RETRY_TIMEOUT`` is set to 15 (seconds). You may see the following error if this value is too low:
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue