Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with license check #218

Open
adhodgson1 opened this issue Sep 23, 2019 · 0 comments
Open

Problem with license check #218

adhodgson1 opened this issue Sep 23, 2019 · 0 comments

Comments

@adhodgson1
Copy link

Hi,

DSC module version: 4.0.713

I am hitting a bug with the license whereby if your current license has expired, then an upgrade (including a new license) causes Octopus to error during the DB upgrade with a license violation message. I am using Azure Automation as the pull server, the compilation of the MOF goes through successfully including the new license, but in the log when the DSC runs through on a new set of servers I get an error (see log) that the license condition has not been met. I think what is happening here is the DB check is run first to get access to our database, then the schema needs upgrading which then gets us a license violation. I can fix this by manually pushing the new license using Octopus.Server license command, and then the DSC runs through ok.

I did also try to set SkipLicenseCheck to $True in the DSC but had the same results.

Our old license expired some time ago and I believe it was updated by someone else using the GUI or a local tool but the existing MOFs in the automation account put it back.

Is there any way we can run the license command before connecting to the DB to cope with such situations in the future?

Thanks.
Andrew.

2019-09-23 12:34:55.4661 3424 1 INFO ================================================================================
2019-09-23 12:34:55.4661 3424 1 INFO Changed log folder from C:\Users[redacted]\AppData\Local\Octopus\Logs to E:\Octopus\Logs
2019-09-23 12:34:57.4348 4172 1 INFO ================================================================================
2019-09-23 12:34:57.4348 4172 1 INFO Changed log folder from C:\Users[redacted]\AppData\Local\Octopus\Logs to E:\Octopus\Logs
2019-09-23 12:34:57.4348 4172 1 INFO Octopus.Server.exe version 2019.6.8 (2019.6.8+Branch.tags-2019.6.8.Sha.2813706b187ebc8c2f63ed14cd888df3dc271563) instance OctopusServer
2019-09-23 12:34:57.4504 4172 1 INFO Environment Information:
OperatingSystem: Microsoft Windows 10.0.14393
OsBitVersion: x64
Is64BitProcess: True
CurrentUser: [redacted]
MachineName: [redacted]
ProcessorCount: 1
CurrentDirectory: C:\windows\system32
TempDirectory: C:\Users[redacted]\AppData\Local\Temp
HostProcessName: Octopus.Server
PID: 4172
2019-09-23 12:34:57.4661 4172 1 INFO Loading plugins from: C:\Program Files\Octopus Deploy\Octopus\BuiltInExtensions
2019-09-23 12:34:57.5286 4172 1 INFO Loading BuiltIn extension: AzureAD (5.5.7.0)
2019-09-23 12:34:57.5602 4172 1 INFO Loading BuiltIn extension: Directory Services (5.6.5.0)
2019-09-23 12:34:57.5754 4172 1 INFO Loading BuiltIn extension: GoogleApps (5.5.7.0)
2019-09-23 12:34:57.5754 4172 1 INFO Loading BuiltIn extension: Guest (1.0.0.0)
2019-09-23 12:34:57.5911 4172 1 INFO Loading BuiltIn extension: Okta (5.5.7.0)
2019-09-23 12:34:57.6067 4172 1 INFO Loading BuiltIn extension: UsernamePassword (0.0.0.0)
2019-09-23 12:34:57.6067 4172 1 INFO Loading BuiltIn extension: GitHub Issue Tracker (1.1.5.0)
2019-09-23 12:34:57.6223 4172 1 INFO Loading BuiltIn extension: Jira Issue Tracker (1.2.4.0)
2019-09-23 12:34:58.4348 4172 1 INFO ==== DatabaseCommand ====
2019-09-23 12:34:58.4511 4172 1 INFO CommandLine: C:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe database --instance OctopusServer --connectionstring Data Source=[redacted]; Initial Catalog=Octopus; Integrated Security=SSPI;Max Pool Size=200 --create --masterKey ********
2019-09-23 12:34:58.4817 4172 1 INFO Setting master key
2019-09-23 12:34:58.7473 4172 1 INFO Setting database connection string to: data source=[redacted];initial catalog=Octopus;integrated security=SSPI;max pool size=200
2019-09-23 12:34:58.7630 4172 1 INFO ========== SQL Database Connection Details ========
2019-09-23 12:34:58.7630 4172 1 INFO SQL Server: [redacted]
SQL Database: Octopus
Authentication Type: Windows Integrated Security
User: [redacted]

2019-09-23 12:34:58.7786 4172 1 INFO ===================================================
2019-09-23 12:34:58.7786 4172 1 INFO Testing connection to the 'master' database...
2019-09-23 12:34:59.1692 4172 1 INFO Successfully connected to 'master' database!
2019-09-23 12:34:59.2317 4172 1 INFO Database 'Octopus' already exists on SQL Server at '[redacted]', no need to create it.
2019-09-23 12:34:59.7786 4172 1 INFO Checking the Octopus Master Key has been configured.
2019-09-23 12:34:59.8098 4172 1 INFO Making sure it's safe to upgrade the database schema...
2019-09-23 12:34:59.8098 4172 1 INFO Checking to see if database schema upgrade is required...
2019-09-23 12:34:59.9504 4172 1 INFO ====================================================================================
Database schema changes are required. Execution plan:

Planned pre-upgrade scripts (non-transactional):

  • Octopus.Core.UpgradeScriptsPre.Script0000 - Database options.sql

Planned schema upgrade scripts (single transaction for all scripts):

  • Octopus.Core.UpgradeScripts.Script0001RemoveTaskViewLogPermissionAgain.cs
  • Octopus.Core.UpgradeScripts.Script0134MigrateArtifactRelatedDocumentsToColumn.cs
  • Octopus.Core.UpgradeScripts.Script0136 - MachinePolicy Proxy Account DataVersion.sql
  • Octopus.Core.UpgradeScripts.Script0136 - Smaller ServerTask index.sql
  • Octopus.Core.UpgradeScripts.Script0137 - Add IX_Artifact_ServerTaskId.sql
  • Octopus.Core.UpgradeScripts.Script0157 - Spaces - Create Space table.sql
  • Octopus.Core.UpgradeScripts.Script0158 - Spaces - Add SpaceId.sql
  • Octopus.Core.UpgradeScripts.Script0159 - Spaces - Migrate Tasks To Spaces.sql
  • Octopus.Core.UpgradeScripts.Script0159 - Spaces - SpeedUpSplitReferenceCollectionFunction.sql
  • Octopus.Core.UpgradeScripts.Script0159MigrateEventsToSpaces.cs
  • Octopus.Core.UpgradeScripts.Script0162MigrateTeamsToNewStructure.cs
  • Octopus.Core.UpgradeScripts.Script0163 - Spaces - DropScopeColumnsOnTeams.sql
  • Octopus.Core.UpgradeScripts.Script0164 - Spaces - Fix contraints for spaces.sql
  • Octopus.Core.UpgradeScripts.Script0165 - Spaces - Add spaceId to Release_WithDeploymentProcess.sql
  • Octopus.Core.UpgradeScripts.Script0166 - Spaces - Add spaceId to EventSourceDeployments.sql
  • Octopus.Core.UpgradeScripts.Script0167 - Spaces - SpaceId and Name Unique Constraint.sql
  • Octopus.Core.UpgradeScripts.Script0168 - Spaces - Add spaceId to Dashboard.sql
  • Octopus.Core.UpgradeScripts.Script0168 - Spaces - Create ScopedUserRole table.sql
  • Octopus.Core.UpgradeScripts.Script0168 - Spaces - Setup first space.sql
  • Octopus.Core.UpgradeScripts.Script0168MigrateConfigurationToFeed.cs
  • Octopus.Core.UpgradeScripts.Script0168MigrateScopedUserRoleToTheirOwnTable.cs
  • Octopus.Core.UpgradeScripts.Script0169 - Spaces - Add spaceId to MultiTenancyDashboard.sql
  • Octopus.Core.UpgradeScripts.Script0169 - Spaces - Add spaceId to Workers.sql
  • Octopus.Core.UpgradeScripts.Script0173 - Spaces - Add spaceId to LatestSuccessfulDeploymentsToMachine.sql
  • Octopus.Core.UpgradeScripts.Script0174 - Spaces - Add spaceId to IdsInUse.sql
  • Octopus.Core.UpgradeScripts.Script0175 - Spaces - Add spaceId to UpdateDeploymentHistory.sql
  • Octopus.Core.UpgradeScripts.Script0176MigrationBuiltInFeedType.cs
  • Octopus.Core.UpgradeScripts.Script0177 - Spaces - Create DeletedSpace table.sql
  • Octopus.Core.UpgradeScripts.Script0177AddSystemToggleSupportToRoles.cs
  • Octopus.Core.UpgradeScripts.Script0178 - Spaces - Fix Worker Uniqueness Constraints.sql
  • Octopus.Core.UpgradeScripts.Script0179 - Add Space to IdsInUse.sql
  • Octopus.Core.UpgradeScripts.Script0180 - Add Default Worker Pool.sql
  • Octopus.Core.UpgradeScripts.Script0180BuiltInFeedMigration.cs
  • Octopus.Core.UpgradeScripts.Script0181AddSpaceManagerRoleToTeamsWhichHadHigherAccess.cs
  • Octopus.Core.UpgradeScripts.Script0182AddUserIdToDashboardConfiguration.cs
  • Octopus.Core.UpgradeScripts.Script0182ModifyPackagesId.cs
  • Octopus.Core.UpgradeScripts.Script0184 - Add AutoId_SpaceId Event index.sql
  • Octopus.Core.UpgradeScripts.Script0186 - Add ServerTask to IdsInUse.sql
  • Octopus.Core.UpgradeScripts.Script0187ArchiveOrphanedArtifacts.cs
  • Octopus.Core.UpgradeScripts.Script0187ArtifactCleanup.cs
  • Octopus.Core.UpgradeScripts.Script0188 - Remove LatestSuccessfulDeploymentsToMachine View.sql
  • Octopus.Core.UpgradeScripts.Script0188MigrateCfCapabilityToJsonArray.cs
  • Octopus.Core.UpgradeScripts.Script0189AddInterruptionViewPermission.cs
  • Octopus.Core.UpgradeScripts.Script0190RemoveTaskViewLogPermission.cs
  • Octopus.Core.UpgradeScripts.Script0190RemoveTaskViewLogPermissionAgain.cs
  • Octopus.Core.UpgradeScripts.Script0191 - Add SpaceId to Invite Table.sql
  • Octopus.Core.UpgradeScripts.Script0191 - PackageMetadata - Create table.sql
  • Octopus.Core.UpgradeScripts.Script0191 - Split OctopusServerNodes table.sql
  • Octopus.Core.UpgradeScripts.Script0192AddPackageMetadataPushPermission.cs
  • Octopus.Core.UpgradeScripts.Script0193RemoveInvalidPermissionsFromUserRoles_A.cs
  • Octopus.Core.UpgradeScripts.Script0194ConvertMachinePolicies.cs
  • Octopus.Core.UpgradeScripts.Script0194NormalizeVCSRootURLs.cs
  • Octopus.Core.UpgradeScripts.Script0195 - Add DataVersion column to spaces.sql
  • Octopus.Core.UpgradeScripts.Script0196 - Team and UserRole DataVersion.sql
  • Octopus.Core.UpgradeScripts.Script0197PreSeedFeedKeyAllocationTable.cs
  • Octopus.Core.UpgradeScripts.Script0200 - Add BlockConcurrentDeployments to interruption.sql
  • Octopus.Core.UpgradeScripts.Script0201EnsureSystemAndSpacePermissionAreCorrect.cs
  • Octopus.Core.UpgradeScripts.Script0202EnsureArtifactScopesAreConsistent.cs

Planned post-upgrade scripts (non-transactional):

  • Octopus.Core.UpgradeScriptsPost.Script0001 - Rebuild indexes.sql

2019-09-23 12:34:59.9661 4172 1 INFO Ensuring pre-conditions for upgrading the database are satisfied...
2019-09-23 12:35:00.2006 4172 1 INFO Searching for indexes that might upset the database upgrade process...
2019-09-23 12:35:00.2317 4172 1 INFO - PASS: All columns use the default collation.
2019-09-23 12:35:00.2317 4172 1 INFO - FAIL: Your Octopus Server would not be compliant with your license if we allowed the upgrade to continue. Here is the summary of the license check: You are not licensed to run Octopus Server 2019.6.8 which is considered to be part of the 2019.6 feature release. It was released on Monday, 01 July 2019. Your maintenance period ended on Sunday, 24 March 2019 (99 days before this version of Octopus Server was released). You will be prevented from performing certain key actions, like creating and deploying releases. Please visit https://g.octopushq.com/licenseupgrade to renew your license.
2019-09-23 12:35:00.2317 4172 1 INFO - PASS: We've done our best to remove any unexpected database indexes.
2019-09-23 12:35:00.2473 4172 1 FATAL One of the pre-conditions to safely upgrade your database has failed, and the upgrade cannot continue.

  • PASS: All columns use the default collation.
  • FAIL: Your Octopus Server would not be compliant with your license if we allowed the upgrade to continue. Here is the summary of the license check: You are not licensed to run Octopus Server 2019.6.8 which is considered to be part of the 2019.6 feature release. It was released on Monday, 01 July 2019. Your maintenance period ended on Sunday, 24 March 2019 (99 days before this version of Octopus Server was released). You will be prevented from performing certain key actions, like creating and deploying releases. Please visit https://g.octopushq.com/licenseupgrade to renew your license.
  • PASS: We've done our best to remove any unexpected database indexes.
    Please take the following steps to get your Octopus Server back up and running:
    Step 1: Re-run the installer for the version of Octopus Server you were using just before trying this upgrade. Your data hasn't been changed and everything will go back to how it was beforehand. This will give you time to solve the problem and try the upgrade again.
    Step 2: Contact [email protected] with a copy of your Octopus Server log file so we can help you upgrade successfully.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant