Hello,
I’m getting a RuntimeBinderException, when upgrading:
2018-04-21 00:33:07.2538 1040 1 INFO ===================================================
2018-04-21 00:33:07.7225 1040 1 INFO Making sure it’s safe to upgrade the database schema…
2018-04-21 00:33:07.7538 1040 1 INFO Checking to see if database schema upgrade is required…
2018-04-21 00:33:07.8319 1040 1 INFO Database schema changes are required.
2018-04-21 00:33:07.9413 1040 1 INFO Executing pre-upgrade scripts…
2018-04-21 00:33:07.9725 1040 1 INFO Executing SQL Server script ‘Octopus.Core.UpgradeScriptsPre.Script0000 - Database options.sql’
2018-04-21 00:33:08.0350 1040 1 INFO Enabling read committed snapshot isolation on octopus
2018-04-21 00:33:08.0350 1040 1 INFO Read committed snapshot isolation is already on
2018-04-21 00:33:08.0975 1040 1 INFO Searching for indexes that might upset the database upgrade process…
2018-04-21 00:33:08.1131 1040 1 INFO Beginning transaction
2018-04-21 00:33:08.1288 1040 1 INFO Executing SQL Server script ‘Octopus.Core.UpgradeScripts.Script0045AddDefaultMachinePolicyToExistingTentacles.cs’
2018-04-21 00:33:08.6288 1040 1 INFO Processing Machines-1
2018-04-21 00:33:08.8944 1040 1 ERROR Upgrade failed due to an unexpected exception:
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Die Laufzeitbindung kann für einen NULL-Verweis nicht ausgeführt werden.
bei CallSite.Target(Closure , CallSite , Object , Type )
bei System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
bei Octopus.Core.UpgradeScripts.Script0045AddDefaultMachinePolicyToExistingTentacles.ApplyDefaultMachinePoliciesIfRequired(IDataRecord record, Func1 commandFactory, String tentacleMachinePolicyId) bei Octopus.Core.UpgradeScripts.Script0045AddDefaultMachinePolicyToExistingTentacles.ProvideScript(Func
1 commandFactory)
bei DbUp.Engine.LazySqlScript.get_Contents()
bei DbUp.Support.SqlServer.SqlScriptExecutor.Execute(SqlScript script, IDictionary`2 variables)
bei DbUp.Engine.UpgradeEngine.PerformUpgrade()
Further the upgrade process seems not running transactional. When I’m executing the upgrade command a second time a primary key violation in the table MachinePolicy occurs, bacause the previous failed update already inserted a row in this table.
Best regards,
Sergej