Skip to content

Commit

Permalink
Revert "lxd/cluster: Print last dqlite entry on gateway shutdown"
Browse files Browse the repository at this point in the history
This reverts commit 76c9c9b.

Signed-off-by: Mark Laing <[email protected]>
  • Loading branch information
markylaing committed Nov 15, 2024
1 parent 8cdacef commit f8bf55f
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions lxd/cluster/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ func (g *Gateway) DemoteOfflineNode(raftID uint64) error {

// Shutdown this gateway, stopping the gRPC server and possibly the raft factory.
func (g *Gateway) Shutdown() error {
logger.Info("Stop database gateway")
logger.Infof("Stop database gateway")

var err error
if g.server != nil {
Expand All @@ -533,18 +533,6 @@ func (g *Gateway) Shutdown() error {
g.lock.Lock()
g.memoryDial = nil
g.lock.Unlock()

// Record the raft term and index in the logs on every shutdown. This
// allows an administrator to determine the furthest-ahead cluster member
// in case recovery is needed.
lastEntryInfo, err := dqlite.ReadLastEntryInfo(g.db.Dir())
if err != nil {
return err
}

// This isn't really a warning, but it's important that this break through
// the snap's default log level of 'Warn'.
logger.Warn("Dqlite last entry", logger.Ctx{"term": lastEntryInfo.Term, "index": lastEntryInfo.Index})
}

return err
Expand Down

0 comments on commit f8bf55f

Please sign in to comment.