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
HridoyRoy committed 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
@@ -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
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
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.