Upgrading Netshot¶
Common instructions¶
Warning
Downgrades are only supported by restoring a backup of the database.
- Get the version from the Netshot Release Page, and unzip it on your Netshot server, in a temporary folder:
-
Backup your data. Backup the following:
- Your installation folder, e.g.
/usr/local/netshot - Your drivers (if you have customized any), e.g.
/usr/local/netshot/drivers - Your database (using
pg_dumpfor example) - Your configuration file, e.g.
/etc/netshot.conf
- Your installation folder, e.g.
-
Stop Netshot
- Copy the updated package
-
Check the release notes for any required additional actions. You might have to upgrade the Java version on the system. See the special update notes section in the
UPDATE.txtfile distributed with the release. -
Ensure compatibility of your own drivers. If you have made local changes to your drivers, or have written your own drivers, you should ensure that they are compatible with the new version, and you might want to adapt them.
-
Start Netshot
Specific update steps¶
Any version to 0.25.2+¶
Java/GraalVM: the container image now ships Oracle GraalVM for JDK 21.0.12, for the latest Java security fixes. On a Linux installation, upgrade the Java environment to GraalVM 21.0.12 as described in the install guide.
CVE-2026-114938: this Java vulnerability (heap overflow in the JIT-compiled Base64 decoding, on x86-64 CPUs with AVX-512 VBMI) also affects GraalVM 21.0.12. It is fixed in Oracle GraalVM for JDK 21.0.13.1, but that build is released under the GraalVM OTN license (no longer the GraalVM Free Terms and Conditions), so it can't be shipped in the container image; you may install it on your Linux server if your Oracle license allows. Netshot is now started with -XX:-UseBASE64Intrinsics, which disables the vulnerable code: the container image, systemd-netshot and initd-netshot include it. If you start Netshot with your own service file or command line, add -XX:-UseBASE64Intrinsics to the java options.
Any version to 0.25.1+¶
Clustering: the tasks working on a device (snapshot, diagnostics, compliance check) are now always assigned to the same runner while the set of available runners doesn't change; they went to a random runner, as the other tasks still do (according to the runner weights). The distribution of the tasks between the runners may change after the upgrade.
Reverse proxy: the session cookie is now marked as Secure (only sent over HTTPS) when netshot.http.trustxforwardedfor is enabled (as in the provided compose.yaml), in addition to when Netshot serves HTTPS itself. If users access Netshot over plain HTTP through a reverse proxy, set the new netshot.http.securecookie option to false, otherwise they won't be able to log in. If Netshot is accessed over HTTPS through a reverse proxy without trustxforwardedfor, set netshot.http.securecookie to true.
Static groups: since 0.25.0, a device was removed from all its static groups each time its dynamic groups were refreshed, that is after a snapshot, a compliance check, diagnostics, a script run, a device type discovery, or a device creation or update through the API (#413). This is fixed, but the lost memberships can't be restored automatically: check your static groups after the upgrade, and add the missing devices again (or restore them from a database backup taken before the upgrade to 0.25).
Search by IP: since the upgrade to 0.25.0, the devices created with an earlier version were missing their resolved management IP address until their next successful snapshot. Until then, a search by IP (such as typing an address in the device search box) couldn't find them by their management address, and an SNMP trap or a syslog message from that address didn't trigger an automatic snapshot. A device that is never successfully snapshotted, such as a [NONAME] device, stayed in that state. The upgrade sets the missing address of all the devices whose management address is an IP address.
Tasks: the upgrade indexes the device columns of the task table, which lost their indexes in 0.25.0: listing the tasks of a device (device page) and deleting a device scanned the whole table, which got slower as the task history grew. Building the indexes may take a little while on a large task table.
HPE ArubaOS-Switch driver: the family of these switches is now Aruba <platform> (e.g. Aruba 2530) instead of Avaya <platform>, and the disabled ports are now shown as disabled (all the ports were shown as enabled). The family changes at the next snapshot of each device: update the dynamic groups, compliance rules and reports which select these switches by an Avaya family.
REST API: a null name in a domain or group request now answers 400 (NETSHOT_INVALID_DOMAIN_NAME, NETSHOT_INVALID_GROUP_NAME) instead of 500, and a null domain description is stored as empty. Updating a hook with "triggers": null (PUT /hooks/{id}) now removes all its triggers, as on creation, instead of failing with a 500 error.
Repeating tasks: the next run of a repeating task is now computed from its reference date by whole periods. When the reference date was in an earlier year, it was moved to the previous year (same month and day), so a weekly task changed its weekday each year (a task created on a Tuesday in 2023 ran on Fridays in 2026), a task every N days or weeks lost its phase, and a monthly task on the 31st moved to the 28th after February. Such tasks go back to their original schedule at their next run.
Device comments: they can now be 4096 characters long (255 before). A script (driver, device script or diagnostic) setting longer comments now fails with a clear script error; before, comments over 255 characters set by a script made the save of the device fail with a database error. The REST API answers 400 (NETSHOT_INVALID_REQUEST_PARAMETER) to longer comments in a device update (it answered 500, with a database error).
Interrupted tasks: a task found running when Netshot starts (Netshot was stopped, crashed or was killed during its run), or running on a cluster member which is lost, is now marked as failed instead of being run again from the start (a script could be applied twice); the next occurrence of a repeating task is scheduled, and a group task still resumes. A running task interrupted at a past fixed date is now failed instead of cancelled as "too late to run".
Any version to 0.20+¶
Java environment must be upgraded to GraalVM for Java 21. Check the install guide for version details.
Any version to 0.19+¶
Java environment must be upgraded to GraalVM for Java 17. Check the install guide for version details.
Any version to 0.16+¶
Starting with version 0.16, Netshot relies on GraalVM capabilities to execute JavaScript and Python driver, compliance and diagnostic scripts. Thus the standard Oracle or OpenJDK JRE must be replaced by a GraalVM JRE.
Please refer to the install guide to set up GraalVM.
Note
For each version, check the install guide for the proper GraalVM version to use.