You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After Netmiko upgraded to 4.0, we are facing the below exception on our sanity.
we are able to enter a few CLi "terminal length and terminal width" but configure terminal is not applied.
################################### netmiko log ##########################
2023-06-15 05:14:10,480 Debug--- telnet_login [sf-> 10.85.232.102:26719] Reading channel for the first time
2023-06-15 05:14:10,569 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:10,569 Debug--- telnet_login [sf-> 10.85.232.102:26719] Output after reading channel for first time:
2023-06-15 05:14:12,571 Debug--- telnet_login [sf-> 10.85.232.102:26719] output is empty, doing find_prompt()
2023-06-15 05:14:13,072 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:13,074 Debug--- wrapper_decorator [sf-> 10.85.232.102:26719] write_channel: b'\r\n'
2023-06-15 05:14:13,325 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
Thu Jun 15 09:14:17.424 UTC
==================================== ERRORS ====================================
_ ERROR collecting witspace/adsakthi/space_adsakthi_FireX_D4724CAC/infra/ztp/test/it/run.py _
infra/ztp/test/it/run.py:38: in
cafy = Cafy()
infra/ztp/test/it/cafy.py:143: in init
self.device.connect(handle='console', over_write_default=True, read_timeout=600)
/auto/cafy/release/latest/cafykit/lib/topology/devices/device.py:2055: in connect
handle.connect(*args, containers=containers, **kwargs)
/auto/cafy/release/latest/cafykit/lib/topology/connection/haconnection.py:106: in connect
raise (e)
/auto/cafy/release/latest/cafykit/lib/topology/connection/haconnection.py:103: in connect
self._connect(*args, **kwargs)
/auto/cafy/release/latest/cafykit/lib/topology/connection/haconnection.py:170: in _connect
self._disable_logging_console()
/auto/cafy/release/latest/cafykit/lib/topology/connection/haconnection.py:186: in _disable_logging_console
self.config(cmd_list=cmd)
/auto/cafy/release/latest/cafykit/lib/topology/connection/connection.py:1109: in config
raise e
/auto/cafy/release/latest/cafykit/lib/topology/connection/connection.py:1104: in config
clear_inconsistency = clear_inconsistency)
/auto/cafy/release/latest/cafykit/lib/topology/connection/connection.py:851: in _config
raise e
/auto/cafy/release/latest/cafykit/lib/topology/connection/connection.py:843: in _config
read_timeout=read_timeout
/auto/cafy/release/23.24.11/rhel7-23.24.11/lib/python3.6/site-packages/netmiko/cisco/cisco_xr.py:35: in send_config_set
config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs
/auto/cafy/release/23.24.11/rhel7-23.24.11/lib/python3.6/site-packages/netmiko/base_connection.py:2177: in send_config_set
output += self.config_mode()
/auto/cafy/release/23.24.11/rhel7-23.24.11/lib/python3.6/site-packages/netmiko/cisco_base_connection.py:54: in config_mode
config_command=config_command, pattern=pattern, re_flags=re_flags
/auto/cafy/release/23.24.11/rhel7-23.24.11/lib/python3.6/site-packages/netmiko/base_connection.py:2018: in config_mode
raise ValueError("Failed to enter configuration mode.")
E ValueError: Failed to enter configuration mode.
------------------------------- Captured stdout --------------------------------
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
After Netmiko upgraded to 4.0, we are facing the below exception on our sanity.
we are able to enter a few CLi "terminal length and terminal width" but configure terminal is not applied.
################################### netmiko log ##########################
2023-06-15 05:14:10,480 Debug--- telnet_login [sf-> 10.85.232.102:26719] Reading channel for the first time
2023-06-15 05:14:10,569 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:10,569 Debug--- telnet_login [sf-> 10.85.232.102:26719] Output after reading channel for first time:
2023-06-15 05:14:12,571 Debug--- telnet_login [sf-> 10.85.232.102:26719] output is empty, doing find_prompt()
2023-06-15 05:14:13,072 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:13,074 Debug--- wrapper_decorator [sf-> 10.85.232.102:26719] write_channel: b'\r\n'
2023-06-15 05:14:13,325 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#
2023-06-15 05:14:13,915 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:13,915 Debug--- find_prompt [sf-> 10.85.232.102:26719] [find_prompt()]: prompt is RP/0/RP0/CPU0:ios#
2023-06-15 05:14:13,915 Debug--- telnet_login [sf-> 10.85.232.102:26719] Output after doing find_prompt: RP/0/RP0/CPU0:ios#
2023-06-15 05:14:13,916 Debug--- wrapper_decorator [sf-> 10.85.232.102:26719] write_channel: b'\r\n'
2023-06-15 05:14:14,417 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#
2023-06-15 05:14:14,422 Debug--- clear_buffer [sf-> 10.85.232.102:26719] Clear buffer detects data in the channel
2023-06-15 05:14:15,424 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:15,425 Debug--- wrapper_decorator [sf-> 10.85.232.102:26719] write_channel: b'\r\n'
2023-06-15 05:14:15,676 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#
2023-06-15 05:14:16,177 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:16,177 Debug--- find_prompt [sf-> 10.85.232.102:26719] [find_prompt()]: prompt is RP/0/RP0/CPU0:ios#
2023-06-15 05:14:16,678 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:16,678 Debug--- wrapper_decorator [sf-> 10.85.232.102:26719] write_channel: b'\r\n'
2023-06-15 05:14:16,679 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:16,689 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#
2023-06-15 05:14:16,689 Debug--- read_until_pattern [sf-> 10.85.232.102:26719] Pattern found: (#|>) in output:
RP/0/RP0/CPU0:ios#
2023-06-15 05:14:17,190 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:17,191 Debug--- clear_buffer [sf-> 10.85.232.102:26719] Clear buffer detects data in the channel
2023-06-15 05:14:18,192 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:18,192 Debug--- find_prompt [sf-> 10.85.232.102:26719] [find_prompt()]: prompt is RP/0/RP0/CPU0:ios#
2023-06-15 05:14:18,193 Debug--- wrapper_decorator [sf-> 10.85.232.102:26719] write_channel: b'terminal width 511\r\n'
2023-06-15 05:14:18,193 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:18,203 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel: terminal width 511
Thu Jun 15 09:14:17.268 UTC
2023-06-15 05:14:18,204 Debug--- read_until_pattern [sf-> 10.85.232.102:26719] Pattern found: (terminal width 511) in output: terminal width 511
2023-06-15 05:14:18,204 Debug--- disable_paging [sf-> 10.85.232.102:26719] In disable_paging
2023-06-15 05:14:18,204 Debug--- disable_paging [sf-> 10.85.232.102:26719] Command: terminal length 0
2023-06-15 05:14:18,204 Debug--- wrapper_decorator [sf-> 10.85.232.102:26719] write_channel: b'terminal length 0\r\n'
2023-06-15 05:14:18,204 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:18,215 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel: t
2023-06-15 05:14:18,225 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:18,235 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:18,246 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:18,256 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel: erminal length 0
2023-06-15 05:14:18,256 Debug--- read_until_pattern [sf-> 10.85.232.102:26719] Pattern found: (terminal\ length\ 0) in output:
Thu Jun 15 09:14:17.268 UTC
terminal length 0
2023-06-15 05:14:18,256 Debug--- disable_paging [sf-> 10.85.232.102:26719]
Thu Jun 15 09:14:17.268 UTC
terminal length 0
2023-06-15 05:14:18,256 Debug--- disable_paging [sf-> 10.85.232.102:26719] Exiting disable_paging
2023-06-15 05:14:18,257 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:18,267 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel: RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#terminal length 0
2023-06-15 05:14:18,267 Debug--- read_until_pattern [sf-> 10.85.232.102:26719] Pattern found: ([>#]) in output:
RP/0/RP0/CPU0:ios#
2023-06-15 05:14:18,268 Debug--- wrapper_decorator [sf-> 10.85.232.102:26719] write_channel: b'\r\n'
2023-06-15 05:14:18,268 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:18,268 Debug--- read_until_pattern [sf-> 10.85.232.102:26719] Pattern found: ([#$]) in output:
RP/0/RP0/CPU0:ios#
2023-06-15 05:14:18,268 Debug--- wrapper_decorator [sf-> 10.85.232.102:26719] write_channel: b'config terminal\r\n'
2023-06-15 05:14:18,268 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel: T
2023-06-15 05:14:18,279 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:18,289 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:18,299 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:18,309 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:18,320 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel: hu Jun 15 09:14:17.336 UTC
c
2023-06-15 05:14:18,330 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:18,340 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:18,351 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:18,361 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel: onfig terminal
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#config terminal
Thu Jun 15 09:14:17.424 UTC
2023-06-15 05:14:18,361 Debug--- read_until_pattern [sf-> 10.85.232.102:26719] Pattern found: (config\ terminal) in output: terminal length 0
Thu Jun 15 09:14:17.336 UTC
config terminal
2023-06-15 05:14:18,361 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:18,362 Debug--- read_until_pattern [sf-> 10.85.232.102:26719] Pattern found: (RP/0/RP0/CPU0:io) in output:
RP/0/RP0/CPU0:io
2023-06-15 05:14:18,362 Debug--- wrapper_decorator [sf-> 10.85.232.102:26719] write_channel: b'\r\n'
2023-06-15 05:14:18,362 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:18,362 Debug--- read_until_pattern [sf-> 10.85.232.102:26719] Pattern found: ([#$]) in output: s#
2023-06-15 05:14:18,363 Debug--- wrapper_decorator [sf-> 10.85.232.102:26719] write_channel: b'\r\n'
2023-06-15 05:14:18,363 Debug--- read_channel [sf-> 10.85.232.102:26719] read_channel:
2023-06-15 05:14:18,363 Debug--- read_until_pattern [sf-> 10.85.232.102:26719] Pattern found: ([#$]) in output:
RP/0/RP0/CPU0:ios#
###################################################################
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#terminal width 511
Thu Jun 15 09:14:17.268 UTC
terminal length 0
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#terminal length 0
Thu Jun 15 09:14:17.336 UTC
config terminal
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#
RP/0/RP0/CPU0:ios#config terminal
Thu Jun 15 09:14:17.424 UTC
==================================== ERRORS ====================================
_ ERROR collecting witspace/adsakthi/space_adsakthi_FireX_D4724CAC/infra/ztp/test/it/run.py _
infra/ztp/test/it/run.py:38: in
cafy = Cafy()
infra/ztp/test/it/cafy.py:143: in init
self.device.connect(handle='console', over_write_default=True, read_timeout=600)
/auto/cafy/release/latest/cafykit/lib/topology/devices/device.py:2055: in connect
handle.connect(*args, containers=containers, **kwargs)
/auto/cafy/release/latest/cafykit/lib/topology/connection/haconnection.py:106: in connect
raise (e)
/auto/cafy/release/latest/cafykit/lib/topology/connection/haconnection.py:103: in connect
self._connect(*args, **kwargs)
/auto/cafy/release/latest/cafykit/lib/topology/connection/haconnection.py:170: in _connect
self._disable_logging_console()
/auto/cafy/release/latest/cafykit/lib/topology/connection/haconnection.py:186: in _disable_logging_console
self.config(cmd_list=cmd)
/auto/cafy/release/latest/cafykit/lib/topology/connection/connection.py:1109: in config
raise e
/auto/cafy/release/latest/cafykit/lib/topology/connection/connection.py:1104: in config
clear_inconsistency = clear_inconsistency)
/auto/cafy/release/latest/cafykit/lib/topology/connection/connection.py:851: in _config
raise e
/auto/cafy/release/latest/cafykit/lib/topology/connection/connection.py:843: in _config
read_timeout=read_timeout
/auto/cafy/release/23.24.11/rhel7-23.24.11/lib/python3.6/site-packages/netmiko/cisco/cisco_xr.py:35: in send_config_set
config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs
/auto/cafy/release/23.24.11/rhel7-23.24.11/lib/python3.6/site-packages/netmiko/base_connection.py:2177: in send_config_set
output += self.config_mode()
/auto/cafy/release/23.24.11/rhel7-23.24.11/lib/python3.6/site-packages/netmiko/cisco_base_connection.py:54: in config_mode
config_command=config_command, pattern=pattern, re_flags=re_flags
/auto/cafy/release/23.24.11/rhel7-23.24.11/lib/python3.6/site-packages/netmiko/base_connection.py:2018: in config_mode
raise ValueError("Failed to enter configuration mode.")
E ValueError: Failed to enter configuration mode.
------------------------------- Captured stdout --------------------------------
please suggest us what we have to do
Beta Was this translation helpful? Give feedback.
All reactions