-
Notifications
You must be signed in to change notification settings - Fork 935
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cluster recovery improvements (#13754)
Fixes #13524 A detailed description of the problem this resolves is in the issue. This PR: - `lxd cluster edit`: - Prompts the user with a warning & link to the docs prior to cluster edit - Includes more information about member roles in the yaml during editing - Generates a tarball (`/var/snap/lxd/common/lxd/database/recovery_db.tar.gz`) with the contents of the database & the new raft configuration as yaml - Creates a `patch.global.sql` to update the addresses of any nodes that were changed in the global `nodes` table - On Daemon startup, looks for & loads a recovery tarball at `/var/snap/lxd/common/lxd/database/recovery_db.tar.gz` and: - Replaces the existing database contents with the incoming contents - Updates cluster member addresses in the local DB's `raft_nodes` table Currently the unpack code also creates the global sql patch on each node; in general this should only be done on one node. Since the patch is idempotent ([it's just a couple of `UPDATE`](https://github.com/MggMuggins/lxd/blob/cluster-recovery/lxd/cluster/recover.go#L157)), it works fine, but it's unideal. See my comment below. LXD-1194
- Loading branch information
Showing
6 changed files
with
502 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.