Config download script does not appear in Inventory Manager DropDown-Menu

  • 0
  • 1
  • Problem
  • Updated 2 years ago
  • Solved

I'm trying to figure out an issue with download Extreme XOS Deviceconfigs via NetSight InventoryManager. The Device I want to backup is a Summit X440-Device with XOS 15.3.1.4-patch1-41 running on it. NetSight always tells File not Found. While searching this error I found:


https://gtacknowledge.extremenetworks.com/articles/Solution/Inventory-Manager-unable-to-backup-XOS-switch


Now I want to build a script with @receive 15 in it. No Problem with that, but after I have copied this script to .../NetSight_Instal_path/NetSight/appdata/InventoryMgr/properties/devicefiles I cannot see the script in the DropDown-Menu of InventoryManager. The whole Server has already been restarted.


Anyone an idea?


Here is the script which has been saved as .txt and .cfg without success...


-- Use these scripts to manage Extreme XOS devices
name="ExtremeXOSReceive15 - TFTP"
desc="Extreme SSH/TFTP Scripts using VR-Default interface"
protocol=TFTP
--
separator=UNIX_FILE_SEPARATOR
advanced_script_support=true
-- Recheck script output for success even if there was an error.
perform_success_test_always=true
--
-----BEGIN SCRIPT "Configuration Upload"-----
save configuration primary
Y

@receive 15
save configuration as-script nms
@key y
@key %0d
@RECEIVEUNTIL 30 ".*done!.*"
@receive 15
%EXTR_DYNAMIC_COMMANDS%
@receive 15
exit
-----END SCRIPT-----
-----BEGIN SUCCESS "Configuration Upload"-----
Uploading.*done!
-----END SUCCESS-----
-----BEGIN FAILURE MAPPINGS "Configuration Upload"-----
Error: timeout=The device was unable to contact the TFTP server. Check that the TFTP server is running and connectivity is okay.
Network is unreachable=The device was unable to download the configuration.  Check that the correct VR is being used.
.*to switch... failed=Backup of the configuration failed.  Verify that the TFTP server is running and connectivity is okay.
-----END FAILURE MAPPINGS-----
--
-----BEGIN SCRIPT "Configuration Download"-----
save configuration primary
Y
%EXTR_DYNAMIC_COMMANDS%
@receive 10
use configuration primary
reboot
y
exit
-----END SCRIPT-----
-----BEGIN SUCCESS "Configuration Download"-----
Downloading.*(to switch|on.*MSM|on.*MM).+ done!
The selected configuration will take effect after the next switch reboot.
-----END SUCCESS-----
-----BEGIN FAILURE MAPPINGS "Configuration Download"-----
Error: timeout=The device was unable to contact the TFTP server. Check that the TFTP server is running and connectivity is okay.
Network is unreachable=The device was unable to download the configuration.  Check that the correct VR is being used.
Downloading.*to switch... failed=Restore of the configuration failed.  Verify that the TFTP server is running and connectivity is okay.
-----END FAILURE MAPPINGS-----
--
-----BEGIN SCRIPT "Firmware Download"-----
%SET_IMAGE_PARTITION_BEFORE_INSTALL%

@# Remove any debug files from internal-memory before upgrade
rm internal-memory *
@key y
@key %0d
@receive 15

download image %TFTP_IP% %RELATIVE_TARGET_FILE_PATH% vr "%VR_VAR%"
@key y
@COMMANDDONE 30
@key %0d
@COMMANDDONE 2
%SET_IMAGE_PARTITION_AFTER_INSTALL%
exit
@# Answer to Save Configuration?
@key y
-----END SCRIPT-----
-----BEGIN SUCCESS "Firmware Download"-----
Image installed successfully
-----END SUCCESS-----
-----BEGIN FAILURE MAPPINGS "Firmware Download"-----
Downloading to Switchexit=The device was unable to contact the tftp server. Verify the TFTP server is running and connectivity is okay.
tftp: sendto: Network is unreachable=The device was unable to download the image.  Check that the correct VR is being used.
tftp: server error: (2) cannot access file=The device cannot access the image file.  Please check the permissions of the file.
is not an Extreme Networks image=The file selected to be downloaded to the device is NOT an Extreme Networks image.  Please select an appropriate image file.
Error: File could not be unwrapped=The image file selected is corrupt and cannot be downloaded.
Error: File is not properly formatted=The image file selected is not properly formatted.
Error: Illegal filename=The image filename is illegal.  Verify that the correct image file is being used.
Error: Failed to install image - version mismatch between XOS and xmod=The selected partition does not have the same firmware version as the .xmod image file.
Error: Failed to install image - Package exists, please uninstall existing package first=Package exists, please uninstall existing package first
active partitions must be the same across the stack=All devices in the stack must be using the same active partition.  Correct and repeat firmware download.
-----END FAILURE MAPPINGS-----
--
-----BEGIN SCRIPT "BootPROM Download"-----
download bootrom %TFTP_IP% %RELATIVE_TARGET_FILE_PATH% vr "%VR_VAR%"
@key y
@COMMANDDONE 30
exit
-----END SCRIPT-----
-----BEGIN SUCCESS "BootPROM Download"-----
Bootrom installed successfully
-----END SUCCESS-----
-----BEGIN FAILURE MAPPINGS "BootPROM Download"-----
-----END FAILURE MAPPINGS-----
--
-----BEGIN SCRIPT "Reset"-----
reboot
y
-----END SCRIPT-----
-----BEGIN SCRIPT "Timed Reset"-----
disable clipaging
reboot time %TIMED_RESET_ABSOLUTE_TIME%
y
show switch
exit
-----END SCRIPT-----
-----BEGIN SUCCESS "Timed Reset"-----
^Next Reboot:(?!.*None scheduled)
-----END SUCCESS-----
-----BEGIN FAILURE MAPPINGS "Timed Reset"-----
Error: Scheduled reboot time is in the past=Scheduled reboot time must be in the future.
-----END FAILURE MAPPINGS-----
--
-----BEGIN SCRIPT "Timed Reset Abort"-----
disable clipaging
reboot cancel
show switch
exit
-----END SCRIPT-----
-----BEGIN SUCCESS "Timed Reset Abort"-----
Next Reboot:\s*None scheduled
-----END SUCCESS-----
-----BEGIN USER-DEFINED VARIABLES -----
VR_VAR.Default=VR-Default
PUT_FILE_CMD.Default=tftp %TFTP_IP% -v "%VR_VAR%" -p -l %LOCAL_FILE_NAME% -r %REMOTE_FILE_NAME%
GET_FILE_CMD.Default=tftp %TFTP_IP% -v "%VR_VAR%" -g -l %LOCAL_FILE_NAME% -r %REMOTE_FILE_NAME%
RESTORE_PRIMARY_CMD.Default=tftp get %TFTP_IP% vr "%VR_VAR%" %RELATIVE_TARGET_FILE_PATH% primary.cfg force-overwrite
-----END USER-DEFINED VARIABLES -----

Photo of Marco Lorenz

Marco Lorenz

  • 694 Points 500 badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Taykin Izzet

Taykin Izzet , Employee

  • 2,924 Points 2k badge 2x thumb
Hi Marco,

Please make sure you are able to change the desc line as well. When testing this locally, the script populated in the drop down menu once the second line was modified.

-- Use these scripts to manage Extreme XOS devices
name="ExtremeXOSReceive15 - TFTP"
desc=""ExtremeXOSReceive15 -- TFTP Extreme SSH/TFTP Scripts using VR-Default interface"
protocol=TFTP
--
separator=UNIX_FILE_SEPARATOR
advanced_script_support=true
-- Recheck script output for success even if there was an error.
perform_success_test_always=true
--
-----BEGIN SCRIPT "Configuration Upload"-----
save configuration primary
Y

@receive 15
save configuration as-script nms
@key y
@key %0d
.....

(Edited)
Photo of Marco Lorenz

Marco Lorenz

  • 694 Points 500 badge 2x thumb

Thanks for the Reply. Nice try, but i doesn't work for me. I still cannot see the script in the dropdownmenu.

Anyone else an idea?


Kind Reagrds

Marco

Photo of Taykin Izzet

Taykin Izzet , Employee

  • 2,924 Points 2k badge 2x thumb
Marco,

I did have to close Inventory manager and reopen it for the menu to refresh. The script was also labeled with a .txt extension in the devicefiles folder.

DeviceFamilyDefTemplate.txt 
new.txt
/usr/local/Extreme_Networks/NetSight/appdata/InventoryMgr/properties/devicefiles$
Photo of Marco Lorenz

Marco Lorenz

  • 694 Points 500 badge 2x thumb
I tried it with .cfg and .txt. Restarted inventory manager and the whole server. No success....
Photo of Ronald Dvorak

Ronald Dvorak, Embassador

  • 45,306 Points 20k badge 2x thumb
Marco,

could you tell us the Netsight version that you use.

-Ron
Photo of Marco Lorenz

Marco Lorenz

  • 694 Points 500 badge 2x thumb
The most recent one. v6.3.x which I downloaded and installed today.
Photo of Ronald Dvorak

Ronald Dvorak, Embassador

  • 45,306 Points 20k badge 2x thumb
From the KB you've posted...
"NetSight 6.2 will have additional features in the scripts section so that this change will not be needed."

As you've already installed 6.3 you shouldn't need to change anything in the script to get the backup working so I'd think there is something wrong in the settings.

I've a X430 and the backup with Netsight is working fine with this settings.....


Make sure to use the correct interface (3rd pull-down) - in my case I use the VR-default as that is the interface which is in the same VLAN/subnet as my Netsight.

And also set the SCP settings....
https://gtacknowledge.extremenetworks.com/articles/How_To/How-to-use-Inventory-Manager-to-backup-Ide...

-Ron
Photo of Marco Lorenz

Marco Lorenz

  • 694 Points 500 badge 2x thumb

Hello,


I know that using this script is maybe not the solution to my problem. But I don't even want to have fixed the config download issue here. The goal is to make the scripts visible in NetSight InventoryManager.

Just to answer your question or to give feedback to it. I have several XOS-Devices grouped in one folder in InventoryManager. 2x X670, 2x X460, 2 Stacks und 20x X440. Every device within this group uses the same MIB Override Setting - "ExtremeXOS - TFTP (VR-Default)". Config download is fine for all X670, X460, Summitstack an 13 X440 Devices. Only 7 X440 are showing this issue. All devices have been configured out of the same defaultconfig. Every devices is shown "green" in NetSight. Every device can be accessed via ssh and every device shows PSU-Details and so on. So access via ssh or snmpv3 cannot be the problem.

All devices are located in a remote Location which only can be accessed over a BranchOffice VPN, so maybe latency is the problem. Thats why I wanted to try out the @receive 15 flag. I had the same issue with Netsight 6.2.x at another customer and there I had success with @receive 15 eventhough it shouldn't bee needed since v6.2.

Regards

Marco

Photo of Marco Lorenz

Marco Lorenz

  • 694 Points 500 badge 2x thumb

Hello Ron,


I also tried Configuration download "Controlled by DeviceType" but it didn't work either. By the way, you are using the Script "ExtremeXOS - SCP (VR-Default)" only for Firmware, not for Configuration.

I don't have a problem with Firmware up- and downloads, for me ist just configuration download which tells me "file not found / missing".


Regards

Marco

Photo of Andreas Friedli

Andreas Friedli

  • 100 Points 100 badge 2x thumb
Hello Marco

I had exact the same problem and found finaly a solution!

My Problem was, that I put the definition files in the default InventoryMgr folder instead into the manually changed location!

You can easily check the curren Inventory Mgr directory location by

1. Starting Inventory Manager

2. Go to Tools > Options > Inventory Manager > Data Storage Directory Path

That's it! After I've put the definition files into the correct Data Storage Directory Path, the Scripts showed up immediately.

What I can confirm is, every time I make script changes, they will show up in the preview not until a restart of the Inventory Manager.

By the way this article helped me a lot to solve my problem

https://gtacknowledge.extremenetworks.com/articles/Solution/Scripts-for-third-party-devices-are-not-...

Kind regards

Andreas
(Edited)