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

slxos_config unable to save configuration #366

Open
Noc7 opened this issue Jan 21, 2022 · 2 comments · May be fixed by #442
Open

slxos_config unable to save configuration #366

Noc7 opened this issue Jan 21, 2022 · 2 comments · May be fixed by #442
Labels
bug This issue/PR relates to a bug has_pr module module plugins plugin (any type) traceback

Comments

@Noc7
Copy link

Noc7 commented Jan 21, 2022

SUMMARY

When trying to write the configuration on a SLX9640, it fails with the following message:

% ansible-playbook -i inventory/inventory -u XXX -k playbooks/slx_wr.yml -l XXX
SSH password:

PLAY [slx] ***************************************************************************************************************************************************

TASK [save the running config unconditionally] ***************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: See the timeout setting options in the Network Debug and Troubleshooting Guide.
fatal: [XXX]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"/Users/xxx/.ansible/tmp/ansible-local-36617u_7ihkbh/ansible-tmp-1642762121.865495-36620-19882093940858/AnsiballZ_slxos_config.py\", line 100, in <module>\n    _ansiballz_main()\n  File \"/Users/xxx/.ansible/tmp/ansible-local-36617u_7ihkbh/ansible-tmp-1642762121.865495-36620-19882093940858/AnsiballZ_slxos_config.py\", line 92, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/Users/xxx/.ansible/tmp/ansible-local-36617u_7ihkbh/ansible-tmp-1642762121.865495-36620-19882093940858/AnsiballZ_slxos_config.py\", line 40, in invoke_module\n    runpy.run_module(mod_name='ansible_collections.community.network.plugins.modules.slxos_config', init_globals=dict(_module_fqn='ansible_collections.community.network.plugins.modules.slxos_config', _modlib_path=modlib_path),\n  File \"/opt/homebrew/Cellar/python@3.10/3.10.0_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py\", line 209, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/opt/homebrew/Cellar/python@3.10/3.10.0_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py\", line 96, in _run_module_code\n    _run_code(code, mod_globals, init_globals,\n  File \"/opt/homebrew/Cellar/python@3.10/3.10.0_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py\", line 86, in _run_code\n    exec(code, run_globals)\n  File \"/var/folders/3b/6d40b40932g971mcc2g563qc0000gn/T/ansible_community.network.slxos_config_payload_m182nvfl/ansible_community.network.slxos_config_payload.zip/ansible_collections/community/network/plugins/modules/slxos_config.py\", line 461, in <module>\n  File \"/var/folders/3b/6d40b40932g971mcc2g563qc0000gn/T/ansible_community.network.slxos_config_payload_m182nvfl/ansible_community.network.slxos_config_payload.zip/ansible_collections/community/network/plugins/modules/slxos_config.py\", line 402, in main\n  File \"/var/folders/3b/6d40b40932g971mcc2g563qc0000gn/T/ansible_community.network.slxos_config_payload_m182nvfl/ansible_community.network.slxos_config_payload.zip/ansible_collections/community/network/plugins/modules/slxos_config.py\", line 295, in save_config\n  File \"/var/folders/3b/6d40b40932g971mcc2g563qc0000gn/T/ansible_community.network.slxos_config_payload_m182nvfl/ansible_community.network.slxos_config_payload.zip/ansible_collections/community/network/plugins/module_utils/network/slxos/slxos.py\", line 102, in run_commands\n  File \"/var/folders/3b/6d40b40932g971mcc2g563qc0000gn/T/ansible_community.network.slxos_config_payload_m182nvfl/ansible_community.network.slxos_config_payload.zip/ansible/module_utils/connection.py\", line 200, in __rpc__\nansible.module_utils.connection.ConnectionError: command timeout triggered, timeout value is 30 secs.\nSee the timeout setting options in the Network Debug and Troubleshooting Guide.\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

PLAY RECAP ***************************************************************************************************************************************************
XXX.   : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0
ISSUE TYPE
  • Bug Report
COMPONENT NAME

plugins/modules/network/slxos/slxos_config.py

ANSIBLE VERSION
ansible [core 2.11.6]
  config file = /Users/xxx/ansible/ansible.cfg
  configured module search path = ['/Users/xxx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/homebrew/Cellar/ansible/4.8.0/libexec/lib/python3.10/site-packages/ansible
  ansible collection location = /Users/xxx/.ansible/collections:/usr/share/ansible/collections
  executable location = /opt/homebrew/bin/ansible
  python version = 3.10.0 (default, Oct 12 2021, 22:37:59) [Clang 13.0.0 (clang-1300.0.29.3)]
  jinja version = 3.0.2
  libyaml = True
COLLECTION VERSION
Collection        Version
----------------- -------
community.network 3.0.0
CONFIGURATION
DEFAULT_FORKS(/Users/xxx/ansible/ansible.cfg) = 20
DEFAULT_HOST_LIST(/Users/xxx/ansible/ansible.cfg) = ['/Users/xxx/ansible/inventory/inventory']
DEFAULT_TIMEOUT(/Users/xxx/ansible/ansible.cfg) = 10
HOST_KEY_CHECKING(/Users/xxx/ansible/ansible.cfg) = False
OS / ENVIRONMENT
SLX-OS Operating System Version: 20.3.4
Copyright (c) 1995-2022 Extreme Networks, Inc.
Firmware name:      20.3.4
Build Time:         11:50:16 Dec 15, 2021
Install Time:       08:13:47 Jan 20, 2022
Kernel:             4.14.67
Control Processor:  Intel(R) Xeon(R) CPU D-1527 @ 2.20GHz,  4 cores
Microcode Version:  0x7000017
Memory Size:        System Total: 31653 MB
System Uptime:      1days 2hrs 33mins 8secs

Name     Primary/Secondary Versions
------------------------------------------
SLX-OS   20.3.4
         20.3.4
STEPS TO REPRODUCE

ansible-playbook -i inventory/inventory -u xxx -k playbooks/slx_wr.yml

---
- hosts: slx
  gather_facts: no

  tasks:
    - name: save the running config unconditionally
      community.network.slxos_config:
        save_when: always
EXPECTED RESULTS

Saving the configuration.

ACTUAL RESULTS

The configuration was not saved. It took 30s until the task stops with an error.
The reason is that slxos_config.py expects a different text from the CLI.
slxos_config.py:293 "prompt": "This operation will modify your startup configuration. Do you want to continue", "answer": "y"}
On SLX-OS 20.3.4 the text reads: "This operation will back up the current configuration. Do you want to continue? [y/n]:"
The same text is seen on SLX-OS 20.1.x, 20.2.x and 20.3.x as far as I know.

ansible-playbook -i inventory/inventory -u xxx -k playbooks/slx_wr.yml -vvvv
ansible-playbook [core 2.11.6]
  config file = /Users/xxx/ansible/ansible.cfg
  configured module search path = ['/Users/xxx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/homebrew/Cellar/ansible/4.8.0/libexec/lib/python3.10/site-packages/ansible
  ansible collection location = /Users/xxx/.ansible/collections:/usr/share/ansible/collections
  executable location = /opt/homebrew/bin/ansible-playbook
  python version = 3.10.0 (default, Oct 12 2021, 22:37:59) [Clang 13.0.0 (clang-1300.0.29.3)]
  jinja version = 3.0.2
  libyaml = True
Using /Users/xxx/ansible/ansible.cfg as config file
SSH password:
setting up inventory plugins
host_list declined parsing /Users/xxx/ansible/inventory/inventory_core as it did not pass its verify_file() method
script declined parsing /Users/xxx/ansible/inventory/inventory_core as it did not pass its verify_file() method
auto declined parsing /Users/xxx/ansible/inventory/inventory_core as it did not pass its verify_file() method
Parsed /Users/xxx/ansible/inventory/inventory_core inventory source with ini plugin
Loading collection community.network from /opt/homebrew/Cellar/ansible/4.8.0/libexec/lib/python3.10/site-packages/ansible_collections/community/network
Loading callback plugin default of type stdout, v2.0 from /opt/homebrew/Cellar/ansible/4.8.0/libexec/lib/python3.10/site-packages/ansible/plugins/callback/default.py
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: slx_wr.yml *****************************************************************************************************************************************
Positional arguments: playbooks/slx_wr.yml
verbosity: 4
ask_pass: True
remote_user: xxx
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/Users/xxx/ansible/inventory/inventory_core',)
subset: XXX
forks: 20
1 plays in playbooks/slx_wr.yml

PLAY [slx] ***************************************************************************************************************************************************
META: ran handlers

TASK [save the running config unconditionally] ***************************************************************************************************************
task path: /Users/xxx/ansible/playbooks/slx_wr.yml:6
redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
Loading collection ansible.netcommon from /Users/xxx/.ansible/collections/ansible_collections/ansible/netcommon
redirecting (type: terminal) ansible.builtin.slxos to community.network.slxos
redirecting (type: cliconf) ansible.builtin.slxos to community.network.slxos
<xxx> attempting to start connection
<xxx> using connection plugin ansible.netcommon.network_cli
Found ansible-connection at path /opt/homebrew/bin/ansible-connection
<xxx> local domain socket does not exist, starting it
<xxx> control socket path is /Users/xxx/.ansible/pc/fda2f68759
<xxx> redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
<xxx> Loading collection ansible.netcommon from /Users/xxx/.ansible/collections/ansible_collections/ansible/netcommon
<xxx> redirecting (type: terminal) ansible.builtin.slxos to community.network.slxos
<xxx> Loading collection community.network from /opt/homebrew/Cellar/ansible/4.8.0/libexec/lib/python3.10/site-packages/ansible_collections/community/network
<xxx> redirecting (type: cliconf) ansible.builtin.slxos to community.network.slxos
<xxx> local domain socket listeners started successfully
<xxx> loaded cliconf plugin ansible_collections.community.network.plugins.cliconf.slxos from path /opt/homebrew/Cellar/ansible/4.8.0/libexec/lib/python3.10/site-packages/ansible_collections/community/network/plugins/cliconf/slxos.py for network_os slxos
<xxx> ssh type is set to paramiko
<xxx>
<xxx> local domain socket path is /Users/xxx/.ansible/pc/fda2f68759
<xxx> Using network group action community.network.slxos for community.network.slxos_config
<xxx> ANSIBLE_NETWORK_IMPORT_MODULES: disabled
<xxx> ANSIBLE_NETWORK_IMPORT_MODULES: module execution time may be extended
<xxx> ESTABLISH LOCAL CONNECTION FOR USER: xxx
<xxx> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /Users/xxxx/.ansible/tmp/ansible-local-36744s7c2jag2 `"&& mkdir "` echo /Users/xxx/.ansible/tmp/ansible-local-36744s7c2jag2/ansible-tmp-1642764873.889224-36747-56274197009268 `" && echo ansible-tmp-1642764873.889224-36747-56274197009268="` echo /Users/xxx/.ansible/tmp/ansible-local-36744s7c2jag2/ansible-tmp-1642764873.889224-36747-56274197009268 `" ) && sleep 0'
Using module file /opt/homebrew/Cellar/ansible/4.8.0/libexec/lib/python3.10/site-packages/ansible_collections/community/network/plugins/modules/slxos_config.py
<xxx> PUT /Users/xxx/.ansible/tmp/ansible-local-36744s7c2jag2/tmpcpw5snj4 TO /Users/xxx/.ansible/tmp/ansible-local-36744s7c2jag2/ansible-tmp-1642764873.889224-36747-56274197009268/AnsiballZ_slxos_config.py
<xxx> EXEC /bin/sh -c 'chmod u+x /Users/xxx/.ansible/tmp/ansible-local-36744s7c2jag2/ansible-tmp-1642764873.889224-36747-56274197009268/ /Users/xxx/.ansible/tmp/ansible-local-36744s7c2jag2/ansible-tmp-1642764873.889224-36747-56274197009268/AnsiballZ_slxos_config.py && sleep 0'
<xxx> EXEC /bin/sh -c '/opt/homebrew/Cellar/ansible/4.8.0/libexec/bin/python3.10 /Users/xxx/.ansible/tmp/ansible-local-36744s7c2jag2/ansible-tmp-1642764873.889224-36747-56274197009268/AnsiballZ_slxos_config.py && sleep 0'
<xxx> EXEC /bin/sh -c 'rm -f -r /Users/xxx/.ansible/tmp/ansible-local-36744s7c2jag2/ansible-tmp-1642764873.889224-36747-56274197009268/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
  File "/Users/xxx/.ansible/tmp/ansible-local-36744s7c2jag2/ansible-tmp-1642764873.889224-36747-56274197009268/AnsiballZ_slxos_config.py", line 100, in <module>
    _ansiballz_main()
  File "/Users/xxx/.ansible/tmp/ansible-local-36744s7c2jag2/ansible-tmp-1642764873.889224-36747-56274197009268/AnsiballZ_slxos_config.py", line 92, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/Users/xxx/.ansible/tmp/ansible-local-36744s7c2jag2/ansible-tmp-1642764873.889224-36747-56274197009268/AnsiballZ_slxos_config.py", line 40, in invoke_module
    runpy.run_module(mod_name='ansible_collections.community.network.plugins.modules.slxos_config', init_globals=dict(_module_fqn='ansible_collections.community.network.plugins.modules.slxos_config', _modlib_path=modlib_path),
  File "/opt/homebrew/Cellar/python@3.10/3.10.0_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 209, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/opt/homebrew/Cellar/python@3.10/3.10.0_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 96, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/opt/homebrew/Cellar/python@3.10/3.10.0_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/var/folders/3b/6d40b40932g971mcc2g563qc0000gn/T/ansible_community.network.slxos_config_payload_4ql4p5jx/ansible_community.network.slxos_config_payload.zip/ansible_collections/community/network/plugins/modules/slxos_config.py", line 461, in <module>
  File "/var/folders/3b/6d40b40932g971mcc2g563qc0000gn/T/ansible_community.network.slxos_config_payload_4ql4p5jx/ansible_community.network.slxos_config_payload.zip/ansible_collections/community/network/plugins/modules/slxos_config.py", line 402, in main
  File "/var/folders/3b/6d40b40932g971mcc2g563qc0000gn/T/ansible_community.network.slxos_config_payload_4ql4p5jx/ansible_community.network.slxos_config_payload.zip/ansible_collections/community/network/plugins/modules/slxos_config.py", line 295, in save_config
  File "/var/folders/3b/6d40b40932g971mcc2g563qc0000gn/T/ansible_community.network.slxos_config_payload_4ql4p5jx/ansible_community.network.slxos_config_payload.zip/ansible_collections/community/network/plugins/module_utils/network/slxos/slxos.py", line 102, in run_commands
  File "/var/folders/3b/6d40b40932g971mcc2g563qc0000gn/T/ansible_community.network.slxos_config_payload_4ql4p5jx/ansible_community.network.slxos_config_payload.zip/ansible/module_utils/connection.py", line 200, in __rpc__
ansible.module_utils.connection.ConnectionError: command timeout triggered, timeout value is 30 secs.
See the timeout setting options in the Network Debug and Troubleshooting Guide.
fatal: [xxx]: FAILED! => {
    "changed": false,
    "module_stderr": "Traceback (most recent call last):\n  File \"/Users/xxx/.ansible/tmp/ansible-local-36744s7c2jag2/ansible-tmp-1642764873.889224-36747-56274197009268/AnsiballZ_slxos_config.py\", line 100, in <module>\n    _ansiballz_main()\n  File \"/Users/xxx/.ansible/tmp/ansible-local-36744s7c2jag2/ansible-tmp-1642764873.889224-36747-56274197009268/AnsiballZ_slxos_config.py\", line 92, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/Users/xxx/.ansible/tmp/ansible-local-36744s7c2jag2/ansible-tmp-1642764873.889224-36747-56274197009268/AnsiballZ_slxos_config.py\", line 40, in invoke_module\n    runpy.run_module(mod_name='ansible_collections.community.network.plugins.modules.slxos_config', init_globals=dict(_module_fqn='ansible_collections.community.network.plugins.modules.slxos_config', _modlib_path=modlib_path),\n  File \"/opt/homebrew/Cellar/python@3.10/3.10.0_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py\", line 209, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/opt/homebrew/Cellar/python@3.10/3.10.0_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py\", line 96, in _run_module_code\n    _run_code(code, mod_globals, init_globals,\n  File \"/opt/homebrew/Cellar/python@3.10/3.10.0_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py\", line 86, in _run_code\n    exec(code, run_globals)\n  File \"/var/folders/3b/6d40b40932g971mcc2g563qc0000gn/T/ansible_community.network.slxos_config_payload_4ql4p5jx/ansible_community.network.slxos_config_payload.zip/ansible_collections/community/network/plugins/modules/slxos_config.py\", line 461, in <module>\n  File \"/var/folders/3b/6d40b40932g971mcc2g563qc0000gn/T/ansible_community.network.slxos_config_payload_4ql4p5jx/ansible_community.network.slxos_config_payload.zip/ansible_collections/community/network/plugins/modules/slxos_config.py\", line 402, in main\n  File \"/var/folders/3b/6d40b40932g971mcc2g563qc0000gn/T/ansible_community.network.slxos_config_payload_4ql4p5jx/ansible_community.network.slxos_config_payload.zip/ansible_collections/community/network/plugins/modules/slxos_config.py\", line 295, in save_config\n  File \"/var/folders/3b/6d40b40932g971mcc2g563qc0000gn/T/ansible_community.network.slxos_config_payload_4ql4p5jx/ansible_community.network.slxos_config_payload.zip/ansible_collections/community/network/plugins/module_utils/network/slxos/slxos.py\", line 102, in run_commands\n  File \"/var/folders/3b/6d40b40932g971mcc2g563qc0000gn/T/ansible_community.network.slxos_config_payload_4ql4p5jx/ansible_community.network.slxos_config_payload.zip/ansible/module_utils/connection.py\", line 200, in __rpc__\nansible.module_utils.connection.ConnectionError: command timeout triggered, timeout value is 30 secs.\nSee the timeout setting options in the Network Debug and Troubleshooting Guide.\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}

PLAY RECAP ***************************************************************************************************************************************************
XXX   : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0
@ansibullbot
Copy link
Collaborator

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.

click here for bot help

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module module plugins plugin (any type) traceback labels Jan 21, 2022
@patte patte linked a pull request Jun 1, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug has_pr module module plugins plugin (any type) traceback
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants