Resolution
In the event of a failed upgrade, it is a good idea to save a copy of the Octopus server logs before taking any further action as this will preserve the reason for the failed upgrade.
Examining the logs will provide more detail as to why the upgrade failed, if these can't be resolved easily then contacting Octopus support and providing the logs will enable them to assist.
Symptom
The Octopus upgrade has failed.
Cause
There are various checks carried out prior to an upgrade taking place, such as confirming the shape of the database, and license compliance. A failure in these areas can prevent the upgrade from succeeding.
It is also possible for one of the database schema change scripts to encounter unexpected data, such as a missing index, and fail to run successfully.
Diagnosis and fix
The upgrade logs will describe the reason for the failure. If the upgrade is on a production server, in most cases you will want to save a copy of the Octopus server logs and then perform a rollback to the previous server version. Re-installing the previous version of Octopus wil typically be enough to bring your service back online, however, it is often worthwhile restoring a backup of the database from before the upgrade as well to be safe.
If you are unsure what version was previously installed, this can be found within the database by checking the dbo.OctopusServerInstallationHistory table.
Once that is done and your Octopus server is back online you will want to check the reason for the upgrade failure. If it is something clear like a license compliance issue, then this can be resolved directly in the production server before attempting the upgrade again. Otherwise, you will want to create a test instance to perform the upgrade on where troubleshooting can be performed. Doing this before reaching out to support may save time.