OpenSync in-place upgrade

General

Some CSP have very strict FW upgrade policy, resulting in outdated versions of OpenSync deployed in the field. Some of the reasons for a strict upgrade policy are: certification, quality assurance, relying on ODM to build the firmware, etc. However some may be willing to upgrade just the OpenSync component, which would reduce the required effort because the base FW (including kernel, drivers, and other ODM software) can remain unchanged.

This feature introduces a method of upgrading OpenSync without requiring a full FW image upgrade.

Northbound API

The in-place upgrade uses existing OVSDB fields that are currently used for the full FW image upgrade:

AWLAN_Node

Fields used for the upgrade process:

firmware_url

firmware_pass

Version reporting also uses existing fields:

firmware_version

platform_version

Field firmware_version shows the currently installed OpenSync version, while platform_version shows the underlying FW image version.

Southbound API

The in-place upgrade is handled by the Upgrade Manager (UM) and the safeupdate tool, meaning that existing well-known tools are used for both the full FW image upgrade, as well as for the OpenSync in-place upgrade.

Requirements

Storage

This feature increases the storage requirements by a factor of three compared to normal OpenSync storage requirements, because there can be up to three copies of OpenSync present on the system:

  1. the preinstalled “built-in” copy

  2. currently installed version

  3. previously installed version.

Usage

The installable package is built in core/images/opensync-*.ospkg.

It can be installed using safeupdate -u or ospkg install.

Example using safeupdate:

root@opensync:/# safeupdate -u /tmp/opensync-TARGET-6.4.0-2-g8319ff Starting image upgrade: /tmp/opensync-TARGET-6.4.0-2-g8319ff-local.ospkg [24005] 30 Jan 12:30:39 GMT SU: <INFO> MISC: | + ospkg install /tmp/opensync-TARGET-6.4.0-2-g8319ff-local.ospkg [24005] 30 Jan 12:30:39 GMT SU: <INFO> MISC: > Installing /tmp/opensync-TARGET-6.4.0-2-g8319ff-local.ospkg [24005] 30 Jan 12:30:47 GMT SU: <INFO> MISC: > ... [24005] 30 Jan 12:30:47 GMT SU: <INFO> MISC: > Version: 6.4.0-2-g8319ff-local (opensync@opensync) [Tue Jan 30 10:38:25 UTC 2024] [24005] 30 Jan 12:30:47 GMT SU: <INFO> MISC: > Installed to: /ospkg/data/pkg1 osp_reboot: Reboot in 0.00 seconds. Type: UPGRADE Reason: System upgrade. [24005] 30 Jan 12:30:47 GMT SU: <INFO> MISC: | + /bin/busybox reboot safeupdate -u successfully completed!

ospkg usage:

root@opensync:/# ospkg Usage: ospkg COMMAND [OPTIONS] COMMANDS: status [-v] install [--reboot] [--force-{version|precheck}] revert [--builtin] next PKGID

Example status:

root@opensync:/# ospkg status current=pkg1: 6.4.0-2-g8319ff-local prev=none: next=none: builtin: 6.4.0-25762-g250862--local