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

"eos_snmp_server" gets stuck with no errors #533

Open
ivanchakarov opened this issue Apr 22, 2024 · 3 comments
Open

"eos_snmp_server" gets stuck with no errors #533

ivanchakarov opened this issue Apr 22, 2024 · 3 comments
Labels
needs_info This issue requires further information. Please answer any outstanding questions.

Comments

@ivanchakarov
Copy link

ivanchakarov commented Apr 22, 2024

SUMMARY

The "eos_snmp_server" collection is not working at all - when I run a task (the parameters doesn't matter) it always get stuck with no error messages and never completes.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

arista.eos.eos_snmp_server

ANSIBLE VERSION
ansible [core 2.15.8]
  config file = /home/ichakarov/arista-switches/ansible.cfg
  configured module search path = ['/home/ichakarov/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /home/ichakarov/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (/usr/bin/python3)
  jinja version = 3.0.3
  libyaml = True
COLLECTION VERSION
# /home/ichakarov/.ansible/collections/ansible_collections
Collection Version
---------- -------
arista.eos 9.0.0  
CONFIGURATION
CONFIG_FILE() = /home/ichakarov/arista-switches/ansible.cfg
OS / ENVIRONMENT

Arista vEOS-lab
Software image version: 4.31.1F

STEPS TO REPRODUCE

Run a play including the collection "eos_snmp_server" - the provided parameters don't matter. This is most probably the easiest scenario - gather the device's SNMP config:

- name: SNMP test
  arista.eos.eos_snmp_server:
    config:
    state: gathered
EXPECTED RESULTS

The main expected result is the task completion.

ACTUAL RESULTS

Unfortunately, in never finishes and gets stuck at "redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli"

I observe the same behavior if I provide configuration parameters as well (state: merged, for example).

TASK [snmp : SNMP test] ***********************************************************************************************************************************************************************************************
task path: /home/ichakarov/arista-switches/roles/snmp/tasks/main.yaml:1
redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli   
@Ruchip16
Copy link
Contributor

@ivanchakarov can you provide persistent logs ?

@Ruchip16 Ruchip16 added the needs_info This issue requires further information. Please answer any outstanding questions. label Apr 24, 2024
@ivanchakarov
Copy link
Author

2024-04-24 11:24:22,329 p=5722 u=ichakarov n=ansible | [WARNING]: Persistent connection logging is enabled for xxx.xxx.xxx.xxx. This will log ALL interactions to /home/ichakarov/ansible.log and WILL NOT redact sensitive configuration like passwords. USE WITH
CAUTION!

2024-04-24 11:24:22,530 p=5744 u=ichakarov n=ansible | jsonrpc request: b'{"jsonrpc": "2.0", "method": "get_capabilities", "id": "904d9a23-896b-462e-b252-38b6f228c99b", "params": [[], {}]}'
2024-04-24 11:24:22,530 p=5744 u=ichakarov n=ansible | <xxx.xxx.xxx.xxx> USING PYLIBSSH VERSION 1.1.0
2024-04-24 11:24:22,531 p=5744 u=ichakarov n=ansible | <xxx.xxx.xxx.xxx> ESTABLISH LIBSSH CONNECTION FOR USER: admin on PORT 22 TO xxx.xxx.xxx.xxx
2024-04-24 11:24:22,531 p=5744 u=ichakarov n=ansible | [DEPRECATION WARNING]: The connection's stdin object is deprecated. Call 
display.prompt_until(msg) instead. This feature will be removed in version 
2.19. Deprecation warnings can be disabled by setting 
deprecation_warnings=False in ansible.cfg.
2024-04-24 11:24:24,486 p=5744 u=ichakarov n=ansible | ssh connection is OK: <pylibsshext.session.Session object at 0x7f8052fc28e0>
2024-04-24 11:24:27,860 p=5744 u=ichakarov n=ansible | jsonrpc response: {"jsonrpc": "2.0", "id": "904d9a23-896b-462e-b252-38b6f228c99b", "result": "{\"rpc\": [\"edit_config\", \"enable_response_logging\", \"get\", \"get_capabilities\", \"get_config\", \"disable_response_logging\", \"run_commands\", \"commit\", \"discard_changes\", \"get_diff\", \"run_commands\", \"supports_sessions\"], \"device_info\": {\"network_os\": \"eos\", \"network_os_version\": \"4.31.1F\", \"network_os_model\": \"vEOS-lab\", \"network_os_hostname\": \"pal01-sw01\", \"network_os_image\": \"flash:/vEOS-lab.swi\"}, \"network_api\": \"cliconf\", \"device_operations\": {\"supports_diff_replace\": true, \"supports_commit\": true, \"supports_rollback\": false, \"supports_defaults\": false, \"supports_onbox_diff\": true, \"supports_commit_comment\": false, \"supports_multiline_delimiter\": false, \"supports_diff_match\": true, \"supports_diff_ignore_lines\": true, \"supports_generate_diff\": false, \"supports_replace\": true}, \"format\": [\"text\", \"json\"], \"diff_match\": [\"line\", \"strict\", \"exact\", \"none\"], \"diff_replace\": [\"line\", \"block\", \"config\"], \"output\": [\"text\", \"json\"]}"}
2024-04-24 11:24:27,862 p=5744 u=ichakarov n=ansible | jsonrpc request: b'{"jsonrpc": "2.0", "method": "get", "id": "83172513-9ba3-41f4-ab53-7c4dd4bc19b9", "params": [["show running-config | section snmp-server"], {}]}'
2024-04-24 11:24:28,238 p=5744 u=ichakarov n=ansible | jsonrpc response: {"jsonrpc": "2.0", "id": "83172513-9ba3-41f4-ab53-7c4dd4bc19b9", "result": "snmp-server ipv4 access-list SNMP-ACL\nsnmp-server engineID local f5717f080027930d8100\nsnmp-server local-interface Vlan10\nsnmp-server group TestGroup v3 priv\nsnmp-server user TestUser TestGroup v3 localized f5717f080027930d8100 auth sha512 6040c078d2b9dd0dbf904cfe588bb086ec13c0426f7354350bb7ac00d9fb557044aece668c5714794b11ac70d9692c40c9cc2f726d5548234e7659159f8f7965 priv aes256 6040c078d2b9dd0dbf904cfe588bb086ec13c0426f7354350bb7ac00d9fb5570"}
2024-04-24 11:24:58,241 p=5744 u=ichakarov n=ansible | persistent connection idle timeout triggered, timeout value is 30 secs.
See the timeout setting options in the Network Debug and Troubleshooting Guide.
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | invoked shell using ssh_type: libssh
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | ssh connection done, setting terminal
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | loaded terminal plugin for network_os arista.eos.eos
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | command: None
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | response-1: b'Last login: Wed Apr 24 14:23:47 2024 from 10.101.40.253\r\r\n'
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | response-2: b'\x1b[5n'
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | response-3: b'pal01-sw01#'
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | matched cli prompt 'b'[5npal01-sw01#'' with regex 'b'[\\r\\n]?[\\w+\\-\\.:\\/\\[\\]]+(?:\\([^\\)]+\\)){,3}(?:>|#) ?$'' from response 'b'Last login: Wed Apr 24 14:23:47 2024 from 10.101.40.253\r\r\n\x1b[5npal01-sw01#''
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | firing event: on_open_shell()
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | send command: b'terminal length 0\r'
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | command: b'terminal length 0'
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | response-1: b'terminal length 0\r\n'
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | response-2: b'Pagination disabled.\r\npal01-sw01#'
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | matched cli prompt 'b'\npal01-sw01#'' with regex 'b'[\\r\\n]?[\\w+\\-\\.:\\/\\[\\]]+(?:\\([^\\)]+\\)){,3}(?:>|#) ?$'' from response 'b'terminal length 0\r\nPagination disabled.\r\npal01-sw01#''
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | send command: b'terminal width 512\r'
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | command: b'terminal width 512'
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | response-1: b'term'
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | response-2: b'inal width 512\r\nWidth set to 512 columns.\r\n'
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | response-3: b'pal01-sw01#'
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | matched cli prompt 'b'\npal01-sw01#'' with regex 'b'[\\r\\n]?[\\w+\\-\\.:\\/\\[\\]]+(?:\\([^\\)]+\\)){,3}(?:>|#) ?$'' from response 'b'terminal width 512\r\nWidth set to 512 columns.\r\npal01-sw01#''
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | ssh connection has completed successfully
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | send command: b'show version | json\r'
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | command: b'show version | json'
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | response-1: b'show vers'
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | response-2: b'ion | json\r\n'
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | response-3: b'{\r\n    "mfgName": "Arista",\r\n    "modelName": "vEOS-lab",\r\n    "hardwareRevision": "",\r\n    "serialNumber": "B5D43FB588D2C12240601BD7E6CEFF5E",\r\n    "systemMacAddress": "08:00:27:93:0d:81",\r\n    "hwMacAddress": "00:00:00:00:00:00",\r\n    "configMacAddress": "00:00:00:00:00:00",\r\n    "version": "4.31.1F",\r\n    "architecture": "x86_64",\r\n    "internalVersion": "4.31.1F-34556000.4311F",\r\n    "internalBuildId": "4ec9ea68-7736-4f7f-aaa0-fe5489192d09",\r\n    "imageFormatVersion": "1.0",\r\n    "imageOptimization": "None",\r\n    "bootupTimestamp": 1713967624.350171,\r\n    "uptime": 1040.49,\r\n    "memTotal": 1979732,\r\n    "memFree": 688836,\r\n    "isIntlVersion": false\r\n}\r\npal01-sw01#'
2024-04-24 11:24:58,343 p=5744 u=ichakarov n=ansible | matched cli prompt 'b'\npal01-sw01#'' with regex 'b'[\\r\\n]?[\\w+\\-\\.:\\/\\[\\]]+(?:\\([^\\)]+\\)){,3}(?:>|#) ?$'' from response 'b'show version | json\r\n{\r\n    "mfgName": "Arista",\r\n    "modelName": "vEOS-lab",\r\n    "hardwareRevision": "",\r\n    "serialNumber": "B5D43FB588D2C12240601BD7E6CEFF5E",\r\n    "systemMacAddress": "08:00:27:93:0d:81",\r\n    "hwMacAddress": "00:00:00:00:00:00",\r\n    "configMacAddress": "00:00:00:00:00:00",\r\n    "version": "4.31.1F",\r\n    "architecture": "x86_64",\r\n    "internalVersion": "4.31.1F-34556000.4311F",\r\n    "internalBuildId": "4ec9ea68-7736-4f7f-aaa0-fe5489192d09",\r\n    "imageFormatVersion": "1.0",\r\n    "imageOptimization": "None",\r\n    "bootupTimestamp": 1713967624.350171,\r\n    "uptime": 1040.49,\r\n    "memTotal": 1979732,\r\n    "memFree": 688836,\r\n    "isIntlVersion": false\r\n}\r\npal01-sw01#''
2024-04-24 11:24:58,344 p=5744 u=ichakarov n=ansible | send command: b'show hostname | json\r'
2024-04-24 11:24:58,344 p=5744 u=ichakarov n=ansible | command: b'show hostname | json'
2024-04-24 11:24:58,344 p=5744 u=ichakarov n=ansible | response-1: b'show hostname | json\r\n'
2024-04-24 11:24:58,344 p=5744 u=ichakarov n=ansible | response-2: b'{\r\n    "hostname": "pal01-sw01",\r\n    "fqdn": "pal01-sw01"\r\n}\r\n'
2024-04-24 11:24:58,344 p=5744 u=ichakarov n=ansible | response-3: b'pal01-sw01#'
2024-04-24 11:24:58,344 p=5744 u=ichakarov n=ansible | matched cli prompt 'b'\npal01-sw01#'' with regex 'b'[\\r\\n]?[\\w+\\-\\.:\\/\\[\\]]+(?:\\([^\\)]+\\)){,3}(?:>|#) ?$'' from response 'b'show hostname | json\r\n{\r\n    "hostname": "pal01-sw01",\r\n    "fqdn": "pal01-sw01"\r\n}\r\npal01-sw01#''
2024-04-24 11:24:58,344 p=5744 u=ichakarov n=ansible | send command: b'bash timeout 5 cat /mnt/flash/boot-config\r'
2024-04-24 11:24:58,344 p=5744 u=ichakarov n=ansible | command: b'bash timeout 5 cat /mnt/flash/boot-config'
2024-04-24 11:24:58,344 p=5744 u=ichakarov n=ansible | response-1: b'bash timeout 5 cat /mnt/flash/boot-config\r\n'
2024-04-24 11:24:58,344 p=5744 u=ichakarov n=ansible | response-2: b'SWI=flash:/vEOS-lab.swi\r\n'
2024-04-24 11:24:58,345 p=5744 u=ichakarov n=ansible | response-3: b'pal01-sw01#'
2024-04-24 11:24:58,345 p=5744 u=ichakarov n=ansible | matched cli prompt 'b'\npal01-sw01#'' with regex 'b'[\\r\\n]?[\\w+\\-\\.:\\/\\[\\]]+(?:\\([^\\)]+\\)){,3}(?:>|#) ?$'' from response 'b'bash timeout 5 cat /mnt/flash/boot-config\r\nSWI=flash:/vEOS-lab.swi\r\npal01-sw01#''
2024-04-24 11:24:58,345 p=5744 u=ichakarov n=ansible | send command: b'show configuration sessions\r'
2024-04-24 11:24:58,345 p=5744 u=ichakarov n=ansible | command: b'show configuration sessions'
2024-04-24 11:24:58,345 p=5744 u=ichakarov n=ansible | response-1: b'show configuration sessions\r\n'
2024-04-24 11:24:58,345 p=5744 u=ichakarov n=ansible | response-2: b'Maximum number of completed sessions: 1\r\nMaximum number of pending sessions: 5\r\nMerge on commit is disabled\r\n\r\n  Name    State       User    Terminal\r\n  ---- ----------- ---------- --------\r\n\r\n'
2024-04-24 11:24:58,345 p=5744 u=ichakarov n=ansible | response-3: b'pal01-sw01#'
2024-04-24 11:24:58,345 p=5744 u=ichakarov n=ansible | matched cli prompt 'b'\npal01-sw01#'' with regex 'b'[\\r\\n]?[\\w+\\-\\.:\\/\\[\\]]+(?:\\([^\\)]+\\)){,3}(?:>|#) ?$'' from response 'b'show configuration sessions\r\nMaximum number of completed sessions: 1\r\nMaximum number of pending sessions: 5\r\nMerge on commit is disabled\r\n\r\n  Name    State       User    Terminal\r\n  ---- ----------- ---------- --------\r\n\r\npal01-sw01#''
2024-04-24 11:24:58,345 p=5744 u=ichakarov n=ansible | send command: b'show running-config | section snmp-server\r'
2024-04-24 11:24:58,345 p=5744 u=ichakarov n=ansible | command: b'show running-config | section snmp-server'
2024-04-24 11:24:58,345 p=5744 u=ichakarov n=ansible | response-1: b'show running-config | section snmp-server\r\n'
2024-04-24 11:24:58,345 p=5744 u=ichakarov n=ansible | response-2: b'snmp-server ipv4 access-list SNMP-ACL\r\nsnmp-server engineID local f5717f080027930d8100\r\nsnmp-server local-interface Vlan10\r\nsnmp-server group TestGroup v3 priv\r\nsnmp-server user TestUser TestGroup v3 localized f5717f080027930d8100 auth sha512 6040c078d2b9dd0dbf904cfe588bb086ec13c0426f7354350bb7ac00d9fb557044aece668c5714794b11ac70d9692c40c9cc2f726d5548234e7659159f8f7965 priv aes256 6040c078d2b9dd0dbf904cfe588bb086ec13c0426f7354350bb7ac00d9fb5570\r\n'
2024-04-24 11:24:58,345 p=5744 u=ichakarov n=ansible | response-3: b'pal01-sw01#'
2024-04-24 11:24:58,345 p=5744 u=ichakarov n=ansible | matched cli prompt 'b'\npal01-sw01#'' with regex 'b'[\\r\\n]?[\\w+\\-\\.:\\/\\[\\]]+(?:\\([^\\)]+\\)){,3}(?:>|#) ?$'' from response 'b'show running-config | section snmp-server\r\nsnmp-server ipv4 access-list SNMP-ACL\r\nsnmp-server engineID local f5717f080027930d8100\r\nsnmp-server local-interface Vlan10\r\nsnmp-server group TestGroup v3 priv\r\nsnmp-server user TestUser TestGroup v3 localized f5717f080027930d8100 auth sha512 6040c078d2b9dd0dbf904cfe588bb086ec13c0426f7354350bb7ac00d9fb557044aece668c5714794b11ac70d9692c40c9cc2f726d5548234e7659159f8f7965 priv aes256 6040c078d2b9dd0dbf904cfe588bb086ec13c0426f7354350bb7ac00d9fb5570\r\npal01-sw01#''
2024-04-24 11:24:58,345 p=5744 u=ichakarov n=ansible | closing ssh connection to device
2024-04-24 11:24:58,346 p=5744 u=ichakarov n=ansible | firing event: on_close_shell()
2024-04-24 11:24:58,346 p=5744 u=ichakarov n=ansible | cli session is now closed
2024-04-24 11:24:58,346 p=5744 u=ichakarov n=ansible | ssh connection has been closed successfully
2024-04-24 11:24:58,346 p=5744 u=ichakarov n=ansible | shutdown complete

@bmhughes
Copy link

bmhughes commented Jul 7, 2024

I'm seeing the same behaviour, the python process just pegs a CPU at 100% and never completes or outputs anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_info This issue requires further information. Please answer any outstanding questions.
Projects
None yet
Development

No branches or pull requests

3 participants