Skip to content

Commit

Permalink
Backport: Don't use autogenerated licenses in diagnose when config is…
Browse files Browse the repository at this point in the history
… specified (#12235)

* backport disk usage print fixes

* diagnose license fix backport
  • Loading branch information
Hridoy Roy authored Aug 2, 2021
1 parent 6748c7d commit 7f2cfd0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelog/_2071.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
core (enterprise): Disallow autogenerated licenses to be used in diagnose even when config is specified
```
2 changes: 1 addition & 1 deletion command/operator_diagnose.go
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ SEALFAIL:
if envLicense := os.Getenv(EnvVaultLicense); envLicense != "" {
coreConfig.License = envLicense
}
vault.DiagnoseCheckLicense(licenseCtx, vaultCore, coreConfig)
vault.DiagnoseCheckLicense(licenseCtx, vaultCore, coreConfig, false)
}
licenseSpan.End()

Expand Down
2 changes: 1 addition & 1 deletion vault/core_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,6 @@ func (c *Core) MissingRequiredState(raw []string, perfStandby bool) bool {
return false
}

func DiagnoseCheckLicense(ctx context.Context, vaultCore *Core, coreConfig CoreConfig) (bool, []string) {
func DiagnoseCheckLicense(ctx context.Context, vaultCore *Core, coreConfig CoreConfig, generate bool) (bool, []string) {
return false, nil
}

0 comments on commit 7f2cfd0

Please sign in to comment.