SRM/SMR- 6.1.0.0 | Device Discovery status to be retained post 6.1.0.0 upgrade

SRM/SMR- 6.1.0.0 | Device Discovery status to be retained post 6.1.0.0 upgrade

Symptoms

Device discovery status greyed out post upgrade to SRM and SMR 6.1.0.0 environment.

Cause

Discovery status results are stored in h2 database. h2 database has been upgraded from version 2.1.x to 2.4.x in 6.1.0.0 release as the older version of h2 database has security vulnerabilities.
As per h2 database documentation, the h2 database that is created in older version will not be working in latest version as this is not a simple update.
So, the devicesInfo files that has been created before the upgrade have to be deleted after the upgrade to 6.1.0.0 which will resolve the issue.

Resolution

The below workaround helps to export data from older version of H2 database and to import into newer version of H2 database in order to retain the status of device discovery post upgrade of SRM/SMR to 6.1.0.0.

Notes
Note:
Below steps to be performed on the SRM/SMR 6.1.0.0 setup where the issue is seen.
This has to be run as a one-time activity after upgrade to SRM/SMR 6.1.0.0.

1. Login to Frontend VM
2. Navigate to below path
    /opt/APG/Java/SUN-JRE/<java_version>/bin
3. Execute below command to export data from older version of h2 database to zip file
    ./java -cp /opt/APG/Tools/Module-Manager/<Module-Manager_version>/.rollback/usage-intelligence@Generic-Usage-Intelligence/<Generic-Usage_version_instance>/files/lib/h2-<h2 version>.jar org.h2.tools.Script -url "jdbc:h2:/opt/APG/Custom/WebApps-Resources/Default/centralized-management/devicesInfo" -user "admin" -password "changeme" -script h2db.zip -options compression zip
4. This will create a zip file in the same path.
5. Navigate to below path
     /opt/APG/Custom/WebApps-Resources/Default/centralized-management/
6. Take backup of existing devicesInfo*.db files
7.  Rename devicesInfo.mv.db 
8.  Navigate to below path
     /opt/APG/Java/Sun-JRE/<java_version>/bin
9.  Execute below command to import data to new version of h2 database from the zip file exported in Step 3
      ./java -cp /opt/APG/Web-Applications/Centralized-Management/centralized-management/lib/h2-<h2 version>.jar org.h2.tools.RunScript -url "jdbc:h2:/opt/APG/Custom/WebApps-Resources/Default/centralized-management/devicesInfo" -user "admin" -password "changeme" -script h2db.zip -options compression zip FROM_1X
10. Navigate to below path
       /opt/APG/Custom/WebApps-Resources/Default/centralized-management/
11. Modify the permissions of file  
       chmod +x devicesInfo.mv.db
12. Restart Tomcat

Notes
Note :
In the above workaround steps the versions highlighted will vary respective of SRM/SMR Versions

SRM and SMR Version: 6.1.0.0 Versions:
Java: 17.0.18
Module Manager: 1.17.15
step3 - H2 jar Version: h2-2.1.214.jar
step9 - H2 jar Version: h2-2.4.240.jar


    • Related Articles

    • Post-Upgrade Update of Encrypted Keystore Password Parameters

      Issue Description: The SRM 6.1.x.x upgrade installs a fresh Tomcat 10 instance, overwriting the existing Tomcat configuration, resulting in the loss of any custom server.xml configurations, including the encrypted keystore password. Summary: After ...
    • Storage MnR vApp External Automated Upgrade Script

      Overview This script automates the SMR update process for vApp environments. Important Notes Windows servers are not updated by this script; they are skipped and must be handled manually. Prerequisites Before running the script, ensure the following ...
    • SRM vApp External Automated Upgrade Script

      Overview This script automates the SRM update process for vApp environments. It supports both All-in-One (AIO) and Distributed deployments. Important Notes Windows SRM environments are not updated by this script they are skipped and must be handled ...
    • SRM Linux External Automated Upgrade Script

      Overview This script automates the update process for SRM binary linux platforms, including RHEL and SLES. It supports both All-in-One (AIO) and Distributed environments. Important Notes Windows SRM environments are not updated by this script; they ...
    • SRM 6.1.x.x: vApp External Automated Upgrade Script

      Overview This script automates the SRM update process for vApp environments. It supports both All-in-One (AIO) and Distributed deployments. Important Notes Windows SRM environments are not updated by this script they are skipped and must be handled ...