How the OESIS SDK distinguishes OS restart and application restart when patching products
Overview
When a product is upgraded to a new version, the upgrade may need an OS restart (reboot), an application restart, or no restart at all to complete.
The SDK tells your agent or server which kind of restart is needed, both before and after installation.
Before installation
On the endpoint, GetLatestInstaller (50300) reports the restart requirement with two fields:
reboot_required: whether a restart is needed.restart_type: what kind of restart is needed. Values areos_restart,application_restart,noneandunspecified.
On the server, read restart_type together with requires_reboot (in patch_aggregation.json) or requires_restart (in patch_aggregation_v2.json):
|
| Meaning |
|---|---|---|
|
| No restart at all. These two values always go together. |
|
| OS reboot after a successful install. |
|
| Application restart after a successful install. |
|
| OS reboot only when the installer reports a pending reboot. |
|
| Application restart only when the installer reports a pending restart. |
|
| The kind of restart depends on endpoint conditions at install time. |
After installation
On the endpoint, InstallFromFiles (50301) reports the restart requirement by:
returning a success code:
WA_VMOD_INSTALLATION_NEED_RESTART (1003)for an OS restart,WA_VMOD_INSTALLATION_NEED_APPLICATION_RESTART (1005)for an application restart, orWAAPI_OK (0)when no restart is needed.setting the
require_restartflag to0or1in its output.
Workflow for checking restart requirements
Call
GetLatestInstaller (50300)and readrestart_type, or read it from the patch catalog files on your server.Decide whether to deploy the patch:
noneorapplication_restart: no OS reboot is expected.os_restart: plan for an OS reboot.unspecified: treat it as a possible OS reboot.
Close the application first if the patch requires it, then call
InstallFromFiles (50301).Act on the return code: restart the OS for
WA_VMOD_INSTALLATION_NEED_RESTART (1003), or restart the application forWA_VMOD_INSTALLATION_NEED_APPLICATION_RESTART (1005). The return code reflects what actually happened on the endpoint, so it is the final answer.
restart_type and requires_close_first
These two fields answer different questions and are read independently:
requires_close_first(inpatch_aggregation_v2.json) orrequire_close_first(inInstallFromFiles (50301)): running instances of the product must be closed before installation.restart_type: what must be restarted after installation to complete the upgrade.
Coverage and limitations
Operating system updates:
restart_typeis determined for third-party patches only. For OS updates, the field is present but always returnsunspecified. Rely on theInstallFromFiles (50301)return code for these updates.Patch data changes: the patch catalog is updated regularly, and a patch's restart requirement can change between updates. Read
restart_typefor each patch rather than keeping a fixed list of products.
Compatible SDK version
restart_type in GetLatestInstaller, patch_aggregation.json and patch_aggregation_v2.json:
Windows: 4.3.6788.0 or later
macOS: 4.3.6181.0 or later
Linux: 4.3.5785.0 or later
Return code WA_VMOD_INSTALLATION_NEED_APPLICATION_RESTART (1005) in InstallFromFiles:
Windows: 4.3.5434 or later
Windows V3V4 Adapter: 4.3.3552 or later
macOS: 4.3.4881 or later
macOS V3V4 Adapter: 4.3.3473 or later
Linux: 4.3.4481 or later
Linux V3V4 Adapter: 4.3.3462 or later
If Further Assistance is required, please proceed to log a support case or chatting with our support engineer.