When running under systemd, send ready when server completed reloading config #7028 (#15041)

This commit is contained in:
Alexander Tischenko 2022-05-03 15:34:11 +03:00 committed by GitHub
parent 33de0a0a49
commit b89fc5af96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

3
changelog/15041.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
core: fixed systemd reloading notification
```

View File

@ -1627,6 +1627,9 @@ func (c *ServerCommand) Run(args []string) int {
// changes in kms_libraries) // changes in kms_libraries)
core.ReloadManagedKeyRegistryConfig() core.ReloadManagedKeyRegistryConfig()
// Notify systemd that the server has completed reloading config
c.notifySystemd(systemd.SdNotifyReady)
case <-c.SigUSR2Ch: case <-c.SigUSR2Ch:
logWriter := c.logger.StandardWriter(&hclog.StandardLoggerOptions{}) logWriter := c.logger.StandardWriter(&hclog.StandardLoggerOptions{})
pprof.Lookup("goroutine").WriteTo(logWriter, 2) pprof.Lookup("goroutine").WriteTo(logWriter, 2)