Add CE plumbing for CensusManager reload (#27664)

This PR adds the CE plumbing and stubs for forcing agent instantiation
whenever the Vault license changes.

Resolves: VAULT-28583
Enterprise PR: hashicorp/vault-enterprise#6168
This commit is contained in:
Mike Palmiotto 2024-07-03 13:31:56 -04:00 committed by GitHub
parent c5c25fea33
commit 3229cf192b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 4 deletions

View File

@ -1711,7 +1711,7 @@ func (c *ServerCommand) Run(args []string) int {
sr.NotifyConfigurationReload(srConfig)
}
if err := core.ReloadCensusManager(); err != nil {
if err := core.ReloadCensusManager(false); err != nil {
c.UI.Error(err.Error())
}

View File

@ -24,6 +24,10 @@ func (c *ServerCommand) ReloadedCh() chan struct{} {
return c.reloadedCh
}
func (c *ServerCommand) LicenseReloadedCh() chan error {
return c.licenseReloadedCh
}
func testServerCommand(tb testing.TB) (*cli.MockUi, *ServerCommand) {
tb.Helper()

View File

@ -9,6 +9,6 @@ import "context"
//go:generate go run github.com/hashicorp/vault/tools/stubmaker
func (c *Core) StartCensusReports(ctx context.Context) {}
func (c *Core) SetRetentionMonths(months int) error { return nil }
func (c *Core) ReloadCensusManager() error { return nil }
func (c *Core) StartCensusReports(ctx context.Context) {}
func (c *Core) SetRetentionMonths(months int) error { return nil }
func (c *Core) ReloadCensusManager(licenseChange bool) error { return nil }