ansible-collections / community.network

Ansible Community Network Collection
http://galaxy.ansible.com/community/network
Other
124 stars 89 forks source link

sros_command fails with ansible-core>=2.13.4 #544

Closed mitchmahan closed 9 months ago

mitchmahan commented 1 year ago
SUMMARY

Unable to call community.network.sros_command using ansible-core versions higher or equal to 2.13.4. When using ansible-core >=2.13.4 sros_command raises an exception.

The full traceback is: Traceback (most recent call last): File "/Users/mitchmahan/.ansible/collections/ansible_collections/ansible/netcommon/plugins/plugin_utils/connection_base.py", line 42, in getattr return self.dict[name] KeyError: '_nonetype'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/executor/task_executor.py", line 1009, in _set_plugin_options plugin = getattr(self.connection, '%s' % plugin_type) File "/Users/mitchmahan/.ansible/collections/ansible_collections/ansible/netcommon/plugins/plugin_utils/connection_base.py", line 50, in getattr raise AttributeError( AttributeError: 'Connection' object has no attribute '_nonetype'

ISSUE TYPE
COMPONENT NAME

sros_command

ANSIBLE VERSION
ansible [core 2.13.4]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/Users/mitchmahan/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible
  ansible collection location = /Users/mitchmahan/.ansible/collections:/usr/share/ansible/collections
  executable location = /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/bin/ansible
  python version = 3.9.16 (main, Dec  7 2022, 10:02:13) [Clang 14.0.0 (clang-1400.0.29.202)]
  jinja version = 3.1.2
  libyaml = False
COLLECTION VERSION
Collection        Version
----------------- -------
community.network 5.0.0  
CONFIGURATION
DEFAULT_ROLES_PATH(/etc/ansible/ansible.cfg) = ['/Users/mitchmahan/.ansible/roles', '/usr/share/ansible/roles', '/etc/ansible/roles']
OS / ENVIRONMENT

Reproduced in MacOS and Linux OS, multiple versions of community.network

STEPS TO REPRODUCE

Use sros_command with ansible-core==2.13.4 and the command will fail. Using sros_command with ansible-core==2.13.3 and the command runs successfully.

---
- name: Test sros_command
  hosts: sros
  gather_facts: False

  tasks:
  - name: show version
    community.network.sros_command:
      commands: "show version"
EXPECTED RESULTS

Show version command should run successfully.

ACTUAL RESULTS

Command fails with any version above 2.13.3. Works fine with 2.13.3. pip install ansible-core==2.13.4

 24854 1683737187.99505: starting run
ansible-playbook [core 2.13.4]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/Users/mitchmahan/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible
  ansible collection location = /Users/mitchmahan/.ansible/collections:/usr/share/ansible/collections
  executable location = /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/bin/ansible-playbook
  python version = 3.9.16 (main, Dec  7 2022, 10:02:13) [Clang 14.0.0 (clang-1400.0.29.202)]
  jinja version = 3.1.2
  libyaml = False
Using /etc/ansible/ansible.cfg as config file
 24854 1683737187.99672: Added group all to inventory
 24854 1683737187.99674: Added group ungrouped to inventory
 24854 1683737187.99676: Group all now contains ungrouped
 24854 1683737187.99680: Examining possible inventory source: /Users/mitchmahan/git/automation-gateway/test/ansible/sros.ini
setting up inventory plugins
 24854 1683737187.99759: trying /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/cache
 24854 1683737187.99839: Loading CacheModule 'memory' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/cache/memory.py
 24854 1683737187.99853: trying /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/inventory
 24854 1683737187.99977: Loading InventoryModule 'host_list' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/inventory/host_list.py
 24854 1683737188.00152: Loaded config def from plugin (inventory/script)
 24854 1683737188.00155: Loading InventoryModule 'script' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/inventory/script.py
 24854 1683737188.00247: Loading InventoryModule 'auto' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/inventory/auto.py
 24854 1683737188.00447: Loaded config def from plugin (inventory/yaml)
 24854 1683737188.00449: Loading InventoryModule 'yaml' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/inventory/yaml.py
 24854 1683737188.00692: Loading InventoryModule 'ini' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/inventory/ini.py
 24854 1683737188.00957: Loading InventoryModule 'toml' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/inventory/toml.py
 24854 1683737188.00960: Attempting to use plugin host_list (/Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/inventory/host_list.py)
host_list declined parsing /Users/mitchmahan/git/automation-gateway/test/ansible/sros.ini as it did not pass its verify_file() method
 24854 1683737188.00964: Attempting to use plugin script (/Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/inventory/script.py)
script declined parsing /Users/mitchmahan/git/automation-gateway/test/ansible/sros.ini as it did not pass its verify_file() method
 24854 1683737188.00971: Attempting to use plugin auto (/Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/inventory/auto.py)
auto declined parsing /Users/mitchmahan/git/automation-gateway/test/ansible/sros.ini as it did not pass its verify_file() method
 24854 1683737188.00972: Attempting to use plugin yaml (/Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/inventory/yaml.py)
yaml declined parsing /Users/mitchmahan/git/automation-gateway/test/ansible/sros.ini as it did not pass its verify_file() method
 24854 1683737188.00981: Attempting to use plugin ini (/Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/inventory/ini.py)
 24854 1683737188.01035: Added group sros to inventory
 24854 1683737188.01064: set inventory_file for 172.20.100.204
 24854 1683737188.01068: set inventory_dir for 172.20.100.204
 24854 1683737188.01069: Added host 172.20.100.204 to inventory
 24854 1683737188.01070: Added host 172.20.100.204 to group sros
 24854 1683737188.01071: set ansible_connection for 172.20.100.204
 24854 1683737188.01072: set ansible_network_os for 172.20.100.204
 24854 1683737188.01073: set ansible_user for 172.20.100.204
 24854 1683737188.01074: set ansible_password for 172.20.100.204
 24854 1683737188.01074: set ansible_become for 172.20.100.204
 24854 1683737188.01075: set ansible_ssh_common_args for 172.20.100.204
 24854 1683737188.01076: set ansible_host_key_auto_add for 172.20.100.204
 24854 1683737188.01077: set ansible_host_key_checking for 172.20.100.204
Parsed /Users/mitchmahan/git/automation-gateway/test/ansible/sros.ini inventory source with ini plugin
 24854 1683737188.01079: Reconcile groups and hosts in inventory.
 24854 1683737188.01082: Group all now contains sros
 24854 1683737188.01417: trying /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments
 24854 1683737188.01456: Loading ModuleDocFragment 'vars_plugin_staging' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/vars_plugin_staging.py
 24854 1683737188.01555: Loaded config def from plugin (vars/host_group_vars)
 24854 1683737188.01557: Loading VarsModule 'host_group_vars' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/vars/host_group_vars.py
 24854 1683737188.01786: Loading ModuleDocFragment 'vars_plugin_staging' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/vars_plugin_staging.py (found_in_cache=True, class_only=False)
 24854 1683737188.01878: Loaded config def from plugin (vars/host_group_vars)
 24854 1683737188.01880: Loading VarsModule 'host_group_vars' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
 24854 1683737188.02101: Loading ModuleDocFragment 'vars_plugin_staging' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/vars_plugin_staging.py (found_in_cache=True, class_only=False)
 24854 1683737188.02193: Loaded config def from plugin (vars/host_group_vars)
 24854 1683737188.02194: Loading VarsModule 'host_group_vars' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
 24854 1683737188.02418: Loading ModuleDocFragment 'vars_plugin_staging' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/vars_plugin_staging.py (found_in_cache=True, class_only=False)
 24854 1683737188.02511: Loaded config def from plugin (vars/host_group_vars)
 24854 1683737188.02513: Loading VarsModule 'host_group_vars' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
 24854 1683737188.02578: Loading CacheModule 'memory' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/cache/memory.py (found_in_cache=True, class_only=False)
 24854 1683737188.03761: Loading ModuleDocFragment 'connection_pipelining' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/connection_pipelining.py
 24854 1683737188.03916: Loaded config def from plugin (connection/local)
 24854 1683737188.03921: Loading Connection 'local' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/connection/local.py (found_in_cache=False, class_only=True)
 24854 1683737188.04838: Loaded config def from plugin (connection/paramiko_ssh)
 24854 1683737188.04842: Loading Connection 'paramiko_ssh' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/connection/paramiko_ssh.py (found_in_cache=False, class_only=True)
 24854 1683737188.06760: Loading ModuleDocFragment 'connection_pipelining' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/connection_pipelining.py (found_in_cache=True, class_only=False)
 24854 1683737188.06909: Loaded config def from plugin (connection/psrp)
 24854 1683737188.06912: Loading Connection 'psrp' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/connection/psrp.py (found_in_cache=False, class_only=True)
 24854 1683737188.09299: Loading ModuleDocFragment 'connection_pipelining' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/connection_pipelining.py (found_in_cache=True, class_only=False)
 24854 1683737188.09439: Loaded config def from plugin (connection/ssh)
 24854 1683737188.09442: Loading Connection 'ssh' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/connection/ssh.py (found_in_cache=False, class_only=True)
 24854 1683737188.10538: Loading ModuleDocFragment 'connection_pipelining' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/connection_pipelining.py (found_in_cache=True, class_only=False)
 24854 1683737188.10679: Loaded config def from plugin (connection/winrm)
 24854 1683737188.10681: Loading Connection 'winrm' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/connection/winrm.py (found_in_cache=False, class_only=True)
 24854 1683737188.10787: Loading ModuleDocFragment 'shell_windows' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/shell_windows.py
 24854 1683737188.10999: Loaded config def from plugin (shell/cmd)
 24854 1683737188.11001: Loading ShellModule 'cmd' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/shell/cmd.py (found_in_cache=False, class_only=True)
 24854 1683737188.11055: Loading ModuleDocFragment 'shell_windows' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/shell_windows.py (found_in_cache=True, class_only=False)
 24854 1683737188.11267: Loaded config def from plugin (shell/powershell)
 24854 1683737188.11268: Loading ShellModule 'powershell' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/shell/powershell.py (found_in_cache=False, class_only=True)
 24854 1683737188.11334: Loading ModuleDocFragment 'shell_common' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/shell_common.py
 24854 1683737188.11937: Loaded config def from plugin (shell/sh)
 24854 1683737188.11943: Loading ShellModule 'sh' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/shell/sh.py (found_in_cache=False, class_only=True)
 24854 1683737188.12383: Loaded config def from plugin (become/runas)
 24854 1683737188.12385: Loading BecomeModule 'runas' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/become/runas.py (found_in_cache=False, class_only=True)
 24854 1683737188.12934: Loaded config def from plugin (become/su)
 24854 1683737188.12936: Loading BecomeModule 'su' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/become/su.py (found_in_cache=False, class_only=True)
 24854 1683737188.13396: Loaded config def from plugin (become/sudo)
 24854 1683737188.13400: Loading BecomeModule 'sudo' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/become/sudo.py (found_in_cache=False, class_only=True)
 24854 1683737188.13435: Loading data from /Users/mitchmahan/git/automation-gateway/test/ansible/sros_test_connection.yml
Loading collection community.network from /Users/mitchmahan/.ansible/collections/ansible_collections/community/network
 24854 1683737188.28387: trying /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/callback
 24854 1683737188.28509: Loading ModuleDocFragment 'default_callback' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/default_callback.py
 24854 1683737188.29083: Loading ModuleDocFragment 'result_format_callback' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/result_format_callback.py
 24854 1683737188.29336: Loaded config def from plugin (callback/default)
 24854 1683737188.29339: Loading CallbackModule 'default' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/callback/default.py
Loading callback plugin default of type stdout, v2.0 from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/callback/default.py
 24854 1683737188.29435: Loading ModuleDocFragment 'default_callback' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/default_callback.py (found_in_cache=True, class_only=False)
 24854 1683737188.29971: Loading ModuleDocFragment 'result_format_callback' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/result_format_callback.py (found_in_cache=True, class_only=False)
 24854 1683737188.30217: Loaded config def from plugin (callback/default)
 24854 1683737188.30219: Loading CallbackModule 'default' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/callback/default.py (found_in_cache=True, class_only=True)
 24854 1683737188.31029: Loaded config def from plugin (callback/junit)
 24854 1683737188.31035: Loading CallbackModule 'junit' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/callback/junit.py (found_in_cache=False, class_only=True)
 24854 1683737188.31111: Loading ModuleDocFragment 'result_format_callback' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/result_format_callback.py (found_in_cache=True, class_only=False)
 24854 1683737188.31351: Loaded config def from plugin (callback/minimal)
 24854 1683737188.31353: Loading CallbackModule 'minimal' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/callback/minimal.py (found_in_cache=False, class_only=True)
 24854 1683737188.31406: Loading CallbackModule 'oneline' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/callback/oneline.py (found_in_cache=False, class_only=True)
 24854 1683737188.31552: Loaded config def from plugin (callback/tree)
 24854 1683737188.31554: Loading CallbackModule 'tree' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/callback/tree.py (found_in_cache=False, class_only=True)
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: sros_test_connection.yml ***************************************************************************************************************************************************
Positional arguments: sros_test_connection.yml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/Users/mitchmahan/git/automation-gateway/test/ansible/sros.ini',)
forks: 5
1 plays in sros_test_connection.yml
 24854 1683737188.31574: in VariableManager get_vars()
 24854 1683737188.31601: done with get_vars()
 24854 1683737188.31605: in VariableManager get_vars()
 24854 1683737188.31609: done with get_vars()
 24854 1683737188.31612: variable 'omit' from source: magic vars
 24854 1683737188.31627: in VariableManager get_vars()
 24854 1683737188.31633: done with get_vars()
 24854 1683737188.31642: variable 'omit' from source: magic vars

PLAY [Test sros_command] *************************************************************************************************************************************************************
 24854 1683737188.33815: trying /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/strategy
 24854 1683737188.33855: Loading StrategyModule 'linear' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/strategy/linear.py
 24854 1683737188.33880: getting the remaining hosts for this loop
 24854 1683737188.33882: done getting the remaining hosts for this loop
 24854 1683737188.33889: building list of next tasks for hosts
 24854 1683737188.33890: getting the next task for host 172.20.100.204
 24854 1683737188.33894: done getting next task for host 172.20.100.204
 24854 1683737188.33897:  ^ task is: TASK: meta (flush_handlers)
 24854 1683737188.33899:  ^ state is: HOST STATE: block=1, task=1, rescue=0, always=0, run_state=IteratingStates.TASKS, fail_state=FailedStates.NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
 24854 1683737188.33900: done building task lists
 24854 1683737188.33901: counting tasks in each state of execution
 24854 1683737188.33902: done counting tasks in each state of execution:
        num_setups: 0
        num_tasks: 1
        num_rescue: 0
        num_always: 0
 24854 1683737188.33903: advancing hosts in TASKS
 24854 1683737188.33904: starting to advance hosts
 24854 1683737188.33905: done advancing hosts to next task
 24854 1683737188.33906: getting variables
 24854 1683737188.33907: in VariableManager get_vars()
 24854 1683737188.33924: Calling all_inventory to load vars for 172.20.100.204
 24854 1683737188.33927: Calling groups_inventory to load vars for 172.20.100.204
 24854 1683737188.33928: Calling all_plugins_inventory to load vars for 172.20.100.204
 24854 1683737188.34195: Loading ModuleDocFragment 'vars_plugin_staging' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/vars_plugin_staging.py (found_in_cache=True, class_only=False)
 24854 1683737188.34296: Loaded config def from plugin (vars/host_group_vars)
 24854 1683737188.34299: Loading VarsModule 'host_group_vars' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
 24854 1683737188.34318: Calling all_plugins_play to load vars for 172.20.100.204
 24854 1683737188.34555: Loading ModuleDocFragment 'vars_plugin_staging' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/vars_plugin_staging.py (found_in_cache=True, class_only=False)
 24854 1683737188.34657: Loaded config def from plugin (vars/host_group_vars)
 24854 1683737188.34659: Loading VarsModule 'host_group_vars' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
 24854 1683737188.34674: Calling groups_plugins_inventory to load vars for 172.20.100.204
 24854 1683737188.34910: Loading ModuleDocFragment 'vars_plugin_staging' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/vars_plugin_staging.py (found_in_cache=True, class_only=False)
 24854 1683737188.35007: Loaded config def from plugin (vars/host_group_vars)
 24854 1683737188.35009: Loading VarsModule 'host_group_vars' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
 24854 1683737188.35020: Calling groups_plugins_play to load vars for 172.20.100.204
 24854 1683737188.35248: Loading ModuleDocFragment 'vars_plugin_staging' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/vars_plugin_staging.py (found_in_cache=True, class_only=False)
 24854 1683737188.35345: Loaded config def from plugin (vars/host_group_vars)
 24854 1683737188.35346: Loading VarsModule 'host_group_vars' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
 24854 1683737188.35587: Loading ModuleDocFragment 'vars_plugin_staging' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/vars_plugin_staging.py (found_in_cache=True, class_only=False)
 24854 1683737188.35683: Loaded config def from plugin (vars/host_group_vars)
 24854 1683737188.35685: Loading VarsModule 'host_group_vars' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
 24854 1683737188.35939: Loading ModuleDocFragment 'vars_plugin_staging' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/vars_plugin_staging.py (found_in_cache=True, class_only=False)
 24854 1683737188.36040: Loaded config def from plugin (vars/host_group_vars)
 24854 1683737188.36043: Loading VarsModule 'host_group_vars' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
 24854 1683737188.36107: done with get_vars()
 24854 1683737188.36114: done getting variables
 24854 1683737188.36201: trying /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/action
 24854 1683737188.36237: trying /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/action/__pycache__
META: ran handlers
 24854 1683737188.36281: done queuing things up, now waiting for results queue to drain
 24854 1683737188.36283: results queue empty
 24854 1683737188.36284: checking for any_errors_fatal
 24854 1683737188.36287: done checking for any_errors_fatal
 24854 1683737188.36288: checking for max_fail_percentage
 24854 1683737188.36289: done checking for max_fail_percentage
 24854 1683737188.36289: checking to see if all hosts have failed and the running result is not ok
 24854 1683737188.36290: done checking to see if all hosts have failed
 24854 1683737188.36291: getting the remaining hosts for this loop
 24854 1683737188.36292: done getting the remaining hosts for this loop
 24854 1683737188.36295: building list of next tasks for hosts
 24854 1683737188.36296: getting the next task for host 172.20.100.204
 24854 1683737188.36298: done getting next task for host 172.20.100.204
 24854 1683737188.36299:  ^ task is: TASK: show version
 24854 1683737188.36300:  ^ state is: HOST STATE: block=2, task=1, rescue=0, always=0, run_state=IteratingStates.TASKS, fail_state=FailedStates.NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
 24854 1683737188.36302: done building task lists
 24854 1683737188.36302: counting tasks in each state of execution
 24854 1683737188.36304: done counting tasks in each state of execution:
        num_setups: 0
        num_tasks: 1
        num_rescue: 0
        num_always: 0
 24854 1683737188.36305: advancing hosts in TASKS
 24854 1683737188.36305: starting to advance hosts
 24854 1683737188.36306: done advancing hosts to next task
 24854 1683737188.36307: getting variables
 24854 1683737188.36308: in VariableManager get_vars()
 24854 1683737188.36313: Calling all_inventory to load vars for 172.20.100.204
 24854 1683737188.36315: Calling groups_inventory to load vars for 172.20.100.204
 24854 1683737188.36317: Calling all_plugins_inventory to load vars for 172.20.100.204
 24854 1683737188.36561: Loading ModuleDocFragment 'vars_plugin_staging' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/vars_plugin_staging.py (found_in_cache=True, class_only=False)
 24854 1683737188.36656: Loaded config def from plugin (vars/host_group_vars)
 24854 1683737188.36658: Loading VarsModule 'host_group_vars' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
 24854 1683737188.36670: Calling all_plugins_play to load vars for 172.20.100.204
 24854 1683737188.36894: Loading ModuleDocFragment 'vars_plugin_staging' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/vars_plugin_staging.py (found_in_cache=True, class_only=False)
 24854 1683737188.36986: Loaded config def from plugin (vars/host_group_vars)
 24854 1683737188.36988: Loading VarsModule 'host_group_vars' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
 24854 1683737188.36998: Calling groups_plugins_inventory to load vars for 172.20.100.204
 24854 1683737188.37228: Loading ModuleDocFragment 'vars_plugin_staging' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/vars_plugin_staging.py (found_in_cache=True, class_only=False)
 24854 1683737188.37325: Loaded config def from plugin (vars/host_group_vars)
 24854 1683737188.37327: Loading VarsModule 'host_group_vars' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
 24854 1683737188.37342: Calling groups_plugins_play to load vars for 172.20.100.204
 24854 1683737188.37563: Loading ModuleDocFragment 'vars_plugin_staging' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/vars_plugin_staging.py (found_in_cache=True, class_only=False)
 24854 1683737188.37656: Loaded config def from plugin (vars/host_group_vars)
 24854 1683737188.37658: Loading VarsModule 'host_group_vars' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
 24854 1683737188.37891: Loading ModuleDocFragment 'vars_plugin_staging' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/vars_plugin_staging.py (found_in_cache=True, class_only=False)
 24854 1683737188.37991: Loaded config def from plugin (vars/host_group_vars)
 24854 1683737188.37994: Loading VarsModule 'host_group_vars' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
 24854 1683737188.38230: Loading ModuleDocFragment 'vars_plugin_staging' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/vars_plugin_staging.py (found_in_cache=True, class_only=False)
 24854 1683737188.38322: Loaded config def from plugin (vars/host_group_vars)
 24854 1683737188.38324: Loading VarsModule 'host_group_vars' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
 24854 1683737188.38354: done with get_vars()
 24854 1683737188.38360: done getting variables
 24854 1683737188.38377: sending task start callback, copying the task so we can template it temporarily
 24854 1683737188.38379: done copying, going to template now
 24854 1683737188.38380: done templating
 24854 1683737188.38381: here goes the callback...

TASK [show version] ******************************************************************************************************************************************************************
task path: /Users/mitchmahan/git/automation-gateway/test/ansible/sros_test_connection.yml:7
 24854 1683737188.38388: sending task start callback
 24854 1683737188.38390: entering _queue_task() for 172.20.100.204/community.network.sros_command
 24854 1683737188.38392: Creating lock for community.network.sros_command
 24854 1683737188.38606: worker is 1 (out of 1 available)
 24854 1683737188.38650: exiting _queue_task() for 172.20.100.204/community.network.sros_command
 24854 1683737188.38704: done queuing things up, now waiting for results queue to drain
 24854 1683737188.38706: waiting for pending results...
 24864 1683737188.38755: running TaskExecutor() for 172.20.100.204/TASK: show version
 24864 1683737188.38805: in run() - task 16e497b0-2aa3-d996-a806-000000000008
 24864 1683737188.38816: variable 'ansible_search_path' from source: unknown
 24864 1683737188.38855: calling self._execute()
 24864 1683737188.38889: variable 'ansible_connection' from source: host vars for '172.20.100.204'
 24864 1683737188.38892: variable 'ansible_user' from source: host vars for '172.20.100.204'
 24864 1683737188.38893: variable 'ansible_password' from source: host vars for '172.20.100.204'
 24864 1683737188.38894: variable 'ansible_network_os' from source: host vars for '172.20.100.204'
 24864 1683737188.38895: variable 'ansible_ssh_common_args' from source: host vars for '172.20.100.204'
 24864 1683737188.38897: variable 'ansible_become' from source: host vars for '172.20.100.204'
 24864 1683737188.38902: variable 'omit' from source: magic vars
 24864 1683737188.38959: variable 'omit' from source: magic vars
 24864 1683737188.38972: variable 'omit' from source: magic vars
 24864 1683737188.38989: variable 'ansible_connection' from source: host vars for '172.20.100.204'
 24864 1683737188.38990: variable 'ansible_connection' from source: host vars for '172.20.100.204'
 24864 1683737188.39014: trying /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/connection
 24864 1683737188.39037: trying /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/connection/__pycache__
redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
Loading collection ansible.netcommon from /Users/mitchmahan/.ansible/collections/ansible_collections/ansible/netcommon
Loading collection ansible.utils from /Users/mitchmahan/.ansible/collections/ansible_collections/ansible/utils
 24864 1683737188.42229: Loading ModuleDocFragment 'ansible_collections.ansible.netcommon.plugins.doc_fragments.connection_persistent' from /Users/mitchmahan/.ansible/collections/ansible_collections/ansible/netcommon/plugins/doc_fragments/connection_persistent.py
 24864 1683737188.42627: Loaded config def from plugin (connection/ansible_collections.ansible.netcommon.plugins.connection.network_cli)
 24864 1683737188.42634: Loading Connection 'ansible_collections.ansible.netcommon.plugins.connection.network_cli' from /Users/mitchmahan/.ansible/collections/ansible_collections/ansible/netcommon/plugins/connection/network_cli.py (searched paths: /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/connection:/Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/connection/__pycache__)
 24864 1683737188.42646: trying /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/shell
 24864 1683737188.42715: Loading ModuleDocFragment 'shell_common' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/shell_common.py (found_in_cache=True, class_only=False)
 24864 1683737188.43310: Loaded config def from plugin (shell/sh)
 24864 1683737188.43312: Loading ShellModule 'sh' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
 24864 1683737188.43364: Loading ModuleDocFragment 'shell_common' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/shell_common.py (found_in_cache=True, class_only=False)
 24864 1683737188.43968: Loaded config def from plugin (shell/sh)
 24864 1683737188.43973: Loading ShellModule 'sh' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
 24864 1683737188.44048: Loading ModuleDocFragment 'connection_pipelining' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/connection_pipelining.py (found_in_cache=True, class_only=False)
 24864 1683737188.44187: Loaded config def from plugin (connection/local)
 24864 1683737188.44190: Loading Connection 'local' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/connection/local.py (searched paths: /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/connection:/Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/connection/__pycache__) (found_in_cache=True, class_only=False)
 24864 1683737188.44241: Loading ModuleDocFragment 'shell_common' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/shell_common.py (found_in_cache=True, class_only=False)
 24864 1683737188.44819: Loaded config def from plugin (shell/sh)
 24864 1683737188.44821: Loading ShellModule 'sh' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
 24864 1683737188.44870: Loading ModuleDocFragment 'shell_common' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/shell_common.py (found_in_cache=True, class_only=False)
 24864 1683737188.45458: Loaded config def from plugin (shell/sh)
 24864 1683737188.45462: Loading ShellModule 'sh' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
 24864 1683737188.49981: Loading ModuleDocFragment 'connection_pipelining' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/connection_pipelining.py (found_in_cache=True, class_only=False)
 24864 1683737188.50127: Loaded config def from plugin (connection/ssh)
 24864 1683737188.50130: Loading Connection 'ssh' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/connection/ssh.py (searched paths: /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/connection:/Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/connection/__pycache__) (found_in_cache=True, class_only=True)
 24864 1683737188.50210: trying /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/terminal
 24864 1683737188.50216: trying /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/terminal/__pycache__
redirecting (type: terminal) ansible.builtin.sros to community.network.sros
 24864 1683737188.50272: Loading TerminalModule 'ansible_collections.community.network.plugins.terminal.sros' from /Users/mitchmahan/.ansible/collections/ansible_collections/community/network/plugins/terminal/sros.py (searched paths: /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/terminal/__pycache__:/Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/terminal)
 24864 1683737188.50309: trying /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/cliconf
 24864 1683737188.50314: trying /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/cliconf/__pycache__
 24864 1683737188.50326: variable 'ansible_become' from source: host vars for '172.20.100.204'
 24864 1683737188.50328: variable 'ansible_become' from source: host vars for '172.20.100.204'
 24864 1683737188.50334: variable 'inventory_hostname' from source: host vars for '172.20.100.204'
 24864 1683737188.50335: variable 'ansible_network_os' from source: host vars for '172.20.100.204'
 24864 1683737188.50336: variable 'ansible_user' from source: host vars for '172.20.100.204'
 24864 1683737188.50337: variable 'ansible_password' from source: host vars for '172.20.100.204'
 24864 1683737188.50338: variable 'ansible_become' from source: host vars for '172.20.100.204'
 24864 1683737188.50339: variable 'ansible_host_key_checking' from source: host vars for '172.20.100.204'
 24864 1683737188.51265: Loaded config def from plugin (connection/paramiko_ssh)
 24864 1683737188.51273: Loading Connection 'paramiko_ssh' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/connection/paramiko_ssh.py (searched paths: /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/connection:/Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/connection/__pycache__) (found_in_cache=True, class_only=False)
 24864 1683737188.51331: Loading ModuleDocFragment 'shell_common' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/shell_common.py (found_in_cache=True, class_only=False)
 24864 1683737188.51966: Loaded config def from plugin (shell/sh)
 24864 1683737188.51971: Loading ShellModule 'sh' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
 24864 1683737188.52026: Loading ModuleDocFragment 'shell_common' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/doc_fragments/shell_common.py (found_in_cache=True, class_only=False)
 24864 1683737188.52617: Loaded config def from plugin (shell/sh)
 24864 1683737188.52618: Loading ShellModule 'sh' from /Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
 24864 1683737188.52681: done running TaskExecutor() for 172.20.100.204/TASK: show version [16e497b0-2aa3-d996-a806-000000000008]
 24864 1683737188.52683: sending task result for task 16e497b0-2aa3-d996-a806-000000000008
 24864 1683737188.52702: done sending task result for task 16e497b0-2aa3-d996-a806-000000000008
 24864 1683737188.52714: WORKER PROCESS EXITING
 24854 1683737188.52818: marking 172.20.100.204 as failed
 24854 1683737188.52836: marking host 172.20.100.204 failed, current state: HOST STATE: block=2, task=1, rescue=0, always=0, run_state=IteratingStates.TASKS, fail_state=FailedStates.NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
 24854 1683737188.52846: ^ failed state is now: HOST STATE: block=2, task=1, rescue=0, always=0, run_state=IteratingStates.COMPLETE, fail_state=FailedStates.TASKS, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
 24854 1683737188.52849: getting the next task for host 172.20.100.204
 24854 1683737188.52851: host 172.20.100.204 is done iterating, returning
The full traceback is:
Traceback (most recent call last):
  File "/Users/mitchmahan/.ansible/collections/ansible_collections/ansible/netcommon/plugins/plugin_utils/connection_base.py", line 42, in __getattr__
    return self.__dict__[name]
KeyError: '_nonetype'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/executor/task_executor.py", line 1009, in _set_plugin_options
    plugin = getattr(self._connection, '_%s' % plugin_type)
  File "/Users/mitchmahan/.ansible/collections/ansible_collections/ansible/netcommon/plugins/plugin_utils/connection_base.py", line 50, in __getattr__
    raise AttributeError(
AttributeError: 'Connection' object has no attribute '_nonetype'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/mitchmahan/.ansible/collections/ansible_collections/ansible/netcommon/plugins/plugin_utils/connection_base.py", line 42, in __getattr__
    return self.__dict__[name]
KeyError: 'nonetype'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/executor/task_executor.py", line 158, in run
    res = self._execute()
  File "/Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/executor/task_executor.py", line 574, in _execute
    plugin_vars = self._set_connection_options(cvars, templar)
  File "/Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/executor/task_executor.py", line 1091, in _set_connection_options
    varnames.extend(self._set_plugin_options(plugin_type, variables, templar, task_keys))
  File "/Users/mitchmahan/.local/share/virtualenvs/automation-gateway-tZUugwBO/lib/python3.9/site-packages/ansible/executor/task_executor.py", line 1012, in _set_plugin_options
    plugin = getattr(self._connection, plugin_type)
  File "/Users/mitchmahan/.ansible/collections/ansible_collections/ansible/netcommon/plugins/plugin_utils/connection_base.py", line 50, in __getattr__
    raise AttributeError(
AttributeError: 'Connection' object has no attribute 'nonetype'
fatal: [172.20.100.204]: FAILED! => {
    "msg": "Unexpected failure during module execution.",
    "stdout": ""
}
 24854 1683737188.52920: no more pending results, returning what we have
 24854 1683737188.52922: results queue empty
 24854 1683737188.52923: checking for any_errors_fatal
 24854 1683737188.52925: done checking for any_errors_fatal
 24854 1683737188.52926: checking for max_fail_percentage
 24854 1683737188.52927: done checking for max_fail_percentage
 24854 1683737188.52928: checking to see if all hosts have failed and the running result is not ok
 24854 1683737188.52929: done checking to see if all hosts have failed
 24854 1683737188.52930: getting the remaining hosts for this loop
 24854 1683737188.52932: done getting the remaining hosts for this loop
 24854 1683737188.52936: building list of next tasks for hosts
 24854 1683737188.52938: getting the next task for host 172.20.100.204
 24854 1683737188.52938: host 172.20.100.204 is done iterating, returning
 24854 1683737188.52939: done building task lists
 24854 1683737188.52940: counting tasks in each state of execution
 24854 1683737188.52943: done counting tasks in each state of execution:
        num_setups: 0
        num_tasks: 0
        num_rescue: 0
        num_always: 0
 24854 1683737188.52944: all hosts are done, so returning None's for all hosts
 24854 1683737188.52945: done queuing things up, now waiting for results queue to drain
 24854 1683737188.52946: results queue empty
 24854 1683737188.52947: checking for any_errors_fatal
 24854 1683737188.52947: done checking for any_errors_fatal
 24854 1683737188.52948: checking for max_fail_percentage
 24854 1683737188.52949: done checking for max_fail_percentage
 24854 1683737188.52949: checking to see if all hosts have failed and the running result is not ok
 24854 1683737188.52950: done checking to see if all hosts have failed
 24854 1683737188.52951: getting the next task for host 172.20.100.204
 24854 1683737188.52952: host 172.20.100.204 is done iterating, returning
 24854 1683737188.52953: running handlers

PLAY RECAP ***************************************************************************************************************************************************************************
172.20.100.204             : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

 24854 1683737188.53012: RUNNING CLEANUP
Andersson007 commented 1 year ago

@mitchmahan hello, thanks for reporting the issue!

@privateip ,as its author, would you like to take a look?

If anyone else wants to fix this, there's the quick start guide.

mitchmahan commented 1 year ago

I found a commit in ansible-core that may or may not be related to the underlying issue: https://github.com/ansible/ansible/commit/bf1ef5a1f3562c9a59168adbc78750304c3e4309

lib/ansible/executor/task_executor.py

Looks like the def _set_plugin_options(self, plugin_type, variables, templar, task_keys): method was updated:

sub = getattr(self._connection, '_sub_plugin', None)
if sub is not None and sub.get('type') != 'external':
    plugin_type = get_plugin_class(sub.get("obj"))
    varnames.extend(self._set_plugin_options(plugin_type, variables, templar, task_keys)) # This line explodes when plugin_type is “nonetype”

I am not sure where "_sub_plugin" should be coming from in regards to the SROS / community.network module? Perhaps something undefined? Would be curious what the solution is!

sub = getattr(self._connection, '_sub_plugin', None) # this returns "nonetype" and not just "None" which explodes task_executor.
Andersson007 commented 1 year ago

@mitchmahan as the author does not respond, the issue would welcome any help from interested folks. Quick-start dev guide.

JCTechSol commented 1 year ago

I'm trying to wrap my brain around this issue as I'm experiencing it with both the sros_command.py and sros_config.py As far I understand these modules use the network_cil.py plugin. You can see where it could get the _sub_plugin information here: https://github.com/ansible-collections/ansible.netcommon/blob/main/plugins/connection/network_cli.py#L385

But my understanding is that the sros modules use terminal.sros.py (I could wrong here, I'm struggling to grasp everything)

Looking at https://github.com/ansible-collections/ansible.netcommon/blob/main/plugins/connection/network_cli.py#L380 it looks like there is no _sub_plugin for terminal plugins (maybe I'm misunderstanding this if statement)

This may be the root of the issue but if so are terminal connections suppose to have a _sub_plugin?

I just don't know enough about ansible under the hood...

JCTechSol commented 1 year ago

Looks like there may be a possible 'grandfathered-in' fix in the works but it appears to have grown stale :-( https://github.com/ansible/ansible/issues/79371

Andersson007 commented 1 year ago

@JCTechSol thanks for trying to investigate the issue! was on PTO i, not being involved in development of network stuff, am not able to take part in the discussion efficiently. the reason can be some breaking changes introduced in ansible.netcommon. how about asking its devs directly in https://matrix.to/#/#network:ansible.com. it's very straightforward to join, see in the communication guide how

Andersson007 commented 1 year ago

FYI if someone submits a fix for this issue, i can review (for general things like SemVer compliance and docs) and merge it

JCTechSol commented 1 year ago

This PR should address this issue https://github.com/ansible-collections/ansible.netcommon/pull/569

Andersson007 commented 1 year ago

@JCTechSol thanks for the info! do you think if we can close the issue here then?

mitchmahan commented 9 months ago

https://github.com/ansible/ansible/issues/79371

This change may also address/fix this defect.

Andersson007 commented 9 months ago

@mitchmahan thanks for closing the issue!