netmiko icon indicating copy to clipboard operation
netmiko copied to clipboard

save_config with dell sonic

Open cliff-ha opened this issue 1 year ago • 6 comments

When using save_config() on a dell sonic device it fails as the expected commands to be send is: copy running-configuration startup-configuration or write memory

cliff-ha avatar May 04 '23 09:05 cliff-ha

@cliff-ha Can you show what this looks like from the CLI (so I can see the behavior and potentially implement it)?

ktbyers avatar May 04 '23 16:05 ktbyers

@ktbyers When I run the save_config() I get this output: netmiko.exceptions.ReadTimeout:

Pattern not detected: 'copy\ running\-config\ startup\-config' in output.

Things you might try to fix this:

  1. Adjust the regex pattern to better identify the terminating string. Note, in many situations the pattern is automatically based on the network device's prompt.
  2. Increase the read_timeout to a larger value.

You can also look at the Netmiko session_log or debug log for more information.

So it seams that there is a problem with reading the result of the command.

It need to use one of these commands instead: copy running-configuration startup-configuration or write memory

It looks like the same change have been done for the dell_force10: https://github.com/ktbyers/netmiko/blob/develop/netmiko/dell/dell_force10_ssh.py

cliff-ha avatar May 08 '23 20:05 cliff-ha

I might have same/similar issue with Dell OS6 switches.

Using ".save_config()" enters the following commands: copy running-configuration startup-configuration

The commands should be: copy running-config startup-config

Nicklarose avatar May 17 '23 15:05 Nicklarose

@Nicklarose Can you show the command and output from the CLI.

Also can you post your show version output (or equivalent for that platform) here?

ktbyers avatar May 18 '23 16:05 ktbyers

So sorry I didn't see this until now..

N1524P-LD#show version

Machine Description............... Dell Networking Switch System Model ID................... N1524P Machine Type...................... Dell Networking N1524P Serial Number..................... TW0YYTHYDNG000BG6019A00 Manufacturer...................... 0xbc00 Burned In MAC Address............. F0D4.E24E.61BB System Object ID.................. 1.3.6.1.4.1.674.10895.3064 SOC Version....................... BCM56150_A0 HW Version........................ 3 CPLD Version...................... 16

unit active backup current-active next-active


1 6.3.3.14 6.3.3.14 6.3.3.14 6.3.3.14

N1524P-LD#copy running-configuration startup-configuration

Invalid url specified! Use tftp:////<fileName>, ftp://@<ipaddr|hostname>//, scp://@<ipaddr|hostname>//, sftp://@<ipaddr|hostname>//, flash://

N1524P-LD# N1524P-LD# N1524P-LD#copy running-config startup-config

This operation may take few minutes. Management interfaces will not be available during this time.

Are you sure you want to save? (y/n)

Nicklarose avatar Jun 29 '23 14:06 Nicklarose

Okay, looks like a Netmiko bug.

ktbyers avatar Jul 14 '23 23:07 ktbyers