Skip to content

Commit

Permalink
lxd/cluster: Write global patch on every node during recovery
Browse files Browse the repository at this point in the history
Signed-off-by: Wesley Hershberger <[email protected]>
  • Loading branch information
MggMuggins committed Jul 16, 2024
1 parent 1d49286 commit c5b3187
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lxd/cluster/recover.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,11 @@ func MaybeUnpackRecoveryTarball(database *db.Node) error {
return err
}

err = writeGlobalNodesPatch(database, incomingRaftNodes)
if err != nil {
return fmt.Errorf("Failed to create global db patch for cluster recover: %w", err)
}

// Now that we're as sure as we can be that the recovery DB is valid, we can
// replace the existing DB
err = os.RemoveAll(globalDBDir)
Expand Down

0 comments on commit c5b3187

Please sign in to comment.