Upgrading from 3.3.24 => 2019.x

(DanskeCommodities) #1

Hi

Should I consider an upgrade path fx from my current 3.3.24 to 4.0?
or can go with a complete upgrade from current to 2019.x?

In any case what about my variables? Will they be messed up after upgrade due to the new variable editor and structure?

best regards
Rane

(Justin Walsh) #3

Hi @dc,

While it is generally possible to do a single upgrade from 3.3.24 up to the latest LTS, we do urge caution and proper preparation due to the large number of versions that you are upgrading through. We recommend performing a PoC upgrade first, to ensure that everything will run smoothly on your live upgrade.

If you do want to perform a multi-step upgrade, we generally recommend a step to 2018.10.7 (Our last LTS release in the 2018 series), then a final step up to 2019.3 or 2019.6 (which was just released today).

Migration scripts will perform all of the necessary data changes to the Octopus core components, so your variables, and the rest of the data should be transitioned to the latest schema.

I’ve included some informational links below, which should aid in your upgrade process:

I hope this helps! Please don’t hesitate to ask if you have any further questions.

1 Like
(DanskeCommodities) #4

thank you very much!

I’ll look into it.

(DanskeCommodities) #5

The PoC test upgrade went really well.

We choose the path of upgrading 3.3.24 -> 2019.6.0
We had one issue that was easy to fix. (see below)

It were fixed by enabling the machines that contained null in the JSON string and then run the health check followed by disabling the machine once again… This filled the null value in the Status type. and fixed the issue… After that the upgrade went smooth. :slight_smile:

SELECT TOP (1000) [Id]
,[Name]
,[IsDisabled]
,[Roles]
,[EnvironmentIds]
,[JSON]
FROM [Octopus].[dbo].[Machine]
WHERE [JSON] like ‘%null%’

Processing Machines-98
Processing Machines-99
Executing .NET Database Server script ‘Octopus.Core.UpgradeScripts.Script0046ConvertHealthCheckStatus.cs’
Processing Machines-1
Processing Machines-10
Error occured when executing scripts, transaction will be rolled back
Error: Upgrade failed due to an unexpected exception:
Error: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: ‘Newtonsoft.Json.Linq.JValue’ does not contain a definition for ‘Status’
Error: at CallSite.Target(Closure , CallSite , Object )
Error: at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
Error: at CallSite.Target(Closure , CallSite , Object )
Error: at Octopus.Core.UpgradeScripts.Script0046ConvertHealthCheckStatus.ConvertHealthCheckStatus(IDataRecord record, Func1 commandFactory, IUpgradeLog log) Error: at Octopus.Core.UpgradeScripts.Script0046ConvertHealthCheckStatus.Execute(Func1 commandFactory, IUpgradeLog log)
Error: at Octopus.Core.Initialization.DbCommandUpgradeScriptResolver.Execute(Func1 commandFactory, IUpgradeLog log) Error: at Octopus.Core.Initialization.DatabaseUpgrader.OctopusUpgradeScriptExecutor.<>c__DisplayClass6_0.<ExecuteDbCommandUpgradeScript>b__0(Func1 commandFactory)
Error: at DbUp.Engine.Transactions.SingleTrasactionStrategy.Execute(Action1 action) Error: at Octopus.Core.Initialization.DatabaseUpgrader.OctopusUpgradeScriptExecutor.ExecuteDbCommandUpgradeScript(IConnectionManager connectionManager, IJournal journal, IUpgradeLog log, IDbCommandUpgradeScript upgradeScript) Error: at Octopus.Core.Initialization.DatabaseUpgrader.OctopusUpgradeScriptExecutor.Execute(SqlScript script, IDictionary2 variables)
Error: at DbUp.Engine.UpgradeEngine.PerformUpgrade()
Error: We encountered an error during the schema upgrade. The schema upgrade was stopped and rolled back. Don’t worry, this means we haven’t made any changes to your data, and you should be able to get back up and running quickly.
Error: Here is the summary of the problems we encountered:
Error: -----------------------------------------
Error: ‘Newtonsoft.Json.Linq.JValue’ does not contain a definition for ‘Status’
Error: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException
Error: at CallSite.Target(Closure , CallSite , Object )
Error: at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
Error: at CallSite.Target(Closure , CallSite , Object )
Error: at Octopus.Core.UpgradeScripts.Script0046ConvertHealthCheckStatus.ConvertHealthCheckStatus(IDataRecord record, Func1 commandFactory, IUpgradeLog log) Error: at Octopus.Core.UpgradeScripts.Script0046ConvertHealthCheckStatus.Execute(Func1 commandFactory, IUpgradeLog log)
Error: at Octopus.Core.Initialization.DbCommandUpgradeScriptResolver.Execute(Func1 commandFactory, IUpgradeLog log) Error: at Octopus.Core.Initialization.DatabaseUpgrader.OctopusUpgradeScriptExecutor.<>c__DisplayClass6_0.<ExecuteDbCommandUpgradeScript>b__0(Func1 commandFactory)
Error: at DbUp.Engine.Transactions.SingleTrasactionStrategy.Execute(Action1 action) Error: at Octopus.Core.Initialization.DatabaseUpgrader.OctopusUpgradeScriptExecutor.ExecuteDbCommandUpgradeScript(IConnectionManager connectionManager, IJournal journal, IUpgradeLog log, IDbCommandUpgradeScript upgradeScript) Error: at Octopus.Core.Initialization.DatabaseUpgrader.OctopusUpgradeScriptExecutor.Execute(SqlScript script, IDictionary2 variables)
Error: at DbUp.Engine.UpgradeEngine.PerformUpgrade()