-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
fix(core): Ensure only the leader's license manager handles renewal #9210
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -173,10 +173,10 @@ export class Start extends BaseCommand { | |
await super.init(); | ||
this.activeWorkflowRunner = Container.get(ActiveWorkflowRunner); | ||
|
||
await this.initLicense(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. License needs to be init first because orchestration depends on the enterprise features, so we cannot put it afterwards. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
await this.initOrchestration(); | ||
this.logger.debug('Orchestration init complete'); | ||
console.log('Orchestration init complete'); | ||
await this.initLicense(); | ||
console.log('License init complete'); | ||
await this.initBinaryDataService(); | ||
this.logger.debug('Binary data service init complete'); | ||
await this.initExternalHooks(); | ||
|
@@ -192,8 +192,6 @@ export class Start extends BaseCommand { | |
} | ||
|
||
async initOrchestration() { | ||
if (config.getEnv('executions.mode') !== 'queue') return; | ||
|
||
if ( | ||
config.getEnv('multiMainSetup.enabled') && | ||
!Container.get(License).isMultipleMainInstancesLicensed() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,8 @@ export class OrchestrationService { | |
} | ||
|
||
/** | ||
* Whether this instance is the leader in a multi-main setup. Always `false` in single-main setup. | ||
* Whether this instance is the leader. This is always `true` in single-main setup, | ||
* once `OrchestrationService` has been initialized. | ||
Comment on lines
+47
to
+48
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Ideally |
||
*/ | ||
get isLeader() { | ||
return config.getEnv('multiMainSetup.instanceType') === 'leader'; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think only
autoRenewEnabled
needs to change, the others can stay as they are probably.The problem is then that we need to change the
autoRenewEnabled
setting whenever a follower becomes a leader, right?