Managing Hotfixes
This section describes the management of Key Manager hotfixes.
The high-level workflow for applying a hotfix is following:
-
Upload the hotfix file to Key Manager database.
-
Patch all the Key Manager servers with the uploaded hotfix.
The high-level workflow for removing a hotfix is following:
-
Remove the hotfix from a Key Manager server
-
Delete the hotfix from the Key Manager database.
Applying a Hotfix
-
Copy the hotfix file to a Key Manager server.
Hotfix files are named as follows:
sshmgr-<version>-hotfix_<component>_<description>_<issue_id>.gzFor example:
sshmgr-3.0.0-hotfix_common_fix_tags_and_stats_UKM-1291.gznoteEnsure the hotfix file is accessible and executable by the
sshmgruser. For example you can put the hotfix file to thesshmgrhome directory/var/lib/sshmgr, then ensure the hotfix file is owned and executable by thesshmgruser. -
Register the hotfix to your Key Manager system, by running the following on any Key Manager server (replace
path/to/the/hotfix.gzwith the path to the hotfix file):# ssh-mgr-controller --upload-hotfix=path/to/the/hotfix.gz -
Verify the Name of the hotfix from the GUI, on the System→Hotfixes page. The Name is typically in
hotfix_<component>_<description>format. For example:hotfix_common_fix_tags_and_stats -
To apply the hotfix on a Key Manager server, run (replace
hotfix_namewith the Name of the hotfix):# ssh-mgr-controller --apply-hotfix=hotfix_nameThen restart its services:
# supervisorctl restart allTo verify that the hotfix was applied, check the Key Manager GUI at System→Hotfixes Applied.
In production environments, we recommend first testing the hotfix on a single Key Manager Server. Contact support at SSH Communications Security to help you with the verification process.
-
Hotfixes named
hotfix_frontend_*are to be applied to a front end first. You must specifically be connected to the fixed front-end server to verify the fix. This is especially important if when a load-balancer is in use. -
Hotfixes named
hotfix_backend_*are to be applied to a back end first. You must ensure that the operation is run by the patched server. You may do this by setting the Maximum Processes setting to 0 on all unpatched back-end servers for the duration of the verification. -
Hotfixes named
hotfix_common_*may be first applied to any Key Manager server.
After you have verified the hotfix, apply the hotfix to the rest of your Key Manager servers.
Removing a Hotfix from Key Manager
To remove a hotfix from a Key Manager server:
-
Connect to the Key Manager server that you want to remove a hotfix from. Run the following command (replace
hotfix_namewith the Name of the hotfix):# ssh-mgr-controller --unapply-hotfix=hotfix_nameThen restart its services:
# supervisorctl restart allTo verify that the hotfix was removed, check the Key Manager GUI at System→Hotfixes Applied.
-
Hotfixes that are not applied to any Key Manager servers may be deleted from the system via the Key Manager GUI, from System→Hotfixes.
Troubleshooting Hotfix Management
Symptom: Applying the hotfix fails with a checksum mismatch error
If you encounter an error like the following when applying a hotfix:
Exception: File /opt/sshmgr/api/v2/operations.pyc's SHA checksum
on disk 227957ee4fa02838e9ebbc7832e301df9f6978b2 does not match
what we expected to override: f2e536bef2ed21552e21af703935b6d259f49dc5
The hotfix is not intended for the current version of Key Manager, and can not be applied. Contact support at SSH Communications Security for additional solutions.