Aruba OS fails to make configuration changes (fixed in Netmiko >= 3.4.0)
See original GitHub issueGood day,
First of all, thank you for providing the community with this module. Recently when I try to use the following methods/functions from ConnectHandler send_config_set
and send_config_from_file
I get the following traceback
Interactive SSH session established Traceback (most recent call last): File “/usr/local/lib/python3.6/site-packages/paramiko/channel.py”, line 699, in recv out = self.in_buffer.read(nbytes, self.timeout) File “/usr/local/lib/python3.6/site-packages/paramiko/buffered_pipe.py”, line 164, in read raise PipeTimeout() paramiko.buffered_pipe.PipeTimeout
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File “/usr/local/lib/python3.6/site-packages/netmiko/base_connection.py”, line 541, in _read_channel_expect new_data = self.remote_conn.recv(MAX_BUFFER) File “/usr/local/lib/python3.6/site-packages/paramiko/channel.py”, line 701, in recv raise socket.timeout() socket.timeout
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File “prov_ap.py”, line 30, in <module> results = ssh_connect.send_config_from_file(base_config_cmd, cmd_verify=False) File “/usr/local/lib/python3.6/site-packages/netmiko/base_connection.py”, line 1642, in send_config_from_file return self.send_config_set(cfg_file, **kwargs) File “/usr/local/lib/python3.6/site-packages/netmiko/base_connection.py”, line 1704, in send_config_set output = self.config_mode(*cfg_mode_args) File “/usr/local/lib/python3.6/site-packages/netmiko/cisco_base_connection.py”, line 40, in config_mode return super().config_mode(config_command=config_command, pattern=pattern) File “/usr/local/lib/python3.6/site-packages/netmiko/base_connection.py”, line 1598, in config_mode output += self.read_until_pattern(pattern=re.escape(config_command.strip())) File “/usr/local/lib/python3.6/site-packages/netmiko/base_connection.py”, line 618, in read_until_pattern return self._read_channel_expect(*args, **kwargs) File “/usr/local/lib/python3.6/site-packages/netmiko/base_connection.py”, line 552, in _read_channel_expect “Timed-out reading channel, data not available.” netmiko.ssh_exception.NetmikoTimeoutException: Timed-out reading channel, data not available.
It’s important to mention that when I use send_config_set
to send one command it is processed successfully and the change is reflected on the network device. However, if I am looping through data and sending it to the device only the first command is processed and soon after the above error is displayed.
Session logging was enabled in the connection handler and it appears that the data is not being sent to the device as shown below.
cat output.txt (MM-03) *[mynode] # (MM-03) *[mynode] # (MM-03) *[mynode] #no paging (MM-03) *[mynode] # (MM-03) *[mynode] #configure term Enter Configuration commands, one per line. End with CNTL/Z
Therefore, I suffix each line in the config set with a newline; however, that did not resolve the issue, I have also sent cmd_verify=False
but did not resolve the issue.
Any recommendation will be highly appreciated
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (5 by maintainers)
Top GitHub Comments
@ktbyers, thank you very much for your support.
@ktbyers after upgrading to the Netmiko v3.4.0 we no longer experience the error as shown in the test.log.