You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return"NOK", fmt.Errorf("bad command format, should be: .reconfigure <dir> <clusteryaml>\n"+
252
-
"Args:\n"+
253
-
"\tdir - Directory of node with up to date data\n"+
254
-
"\tclusteryaml - Path to a .yaml file containing the desired cluster configuration\n\n"+
255
-
"Help:\n"+
256
-
"\tUse this command when trying to preserve the data from your cluster while changing the\n"+
257
-
"\tconfiguration of the cluster because e.g. your cluster is broken due to unreachablee nodes.\n"+
258
-
"\t0. BACKUP ALL YOUR NODE DATA DIRECTORIES BEFORE PROCEEDING!\n"+
259
-
"\t1. Stop all cowsql nodes.\n"+
260
-
"\t2. Identify the dir of the node with the most up to date raft term and log, this will be the <dir> argument.\n"+
261
-
"\t3. Create a .yaml file with the same format as cluster.yaml (or use/adapt an existing cluster.yaml) with the\n "+
262
-
"\t desired cluster configuration. This will be the <clusteryaml> argument.\n"+
263
-
"\t Don't forget to make sure the ID's in the file line up with the ID's in the info.yaml files.\n"+
264
-
"\t4. Run the .reconfigure <dir> <clusteryaml> command, it should return \"OK\".\n"+
265
-
"\t5. Copy the snapshot-xxx-xxx-xxx, snapshot-xxx-xxx-xxx.meta, segment files (00000xxxxx-000000xxxxx), desired cluster.yaml\n"+
266
-
"\t from <dir> over to the directories of the other nodes identified in <clusteryaml>, deleting any leftover snapshot-xxx-xxx-xxx, snapshot-xxx-xxx-xxx.meta,\n"+
267
-
"\t segment (00000xxxxx-000000xxxxx, open-xxx) and metadata{1,2} files that it contains.\n"+
268
-
"\t Make sure an info.yaml is also present that is in line with cluster.yaml.\n"+
269
-
"\t6. Start all the cowsql nodes.\n"+
270
-
"\t7. If, for some reason, this fails or gives undesired results, try again with data from another node (you should still have this from step 0).\n")
251
+
msg:=`bad command format, should be: .reconfigure <dir> <clusteryaml>
252
+
Args:
253
+
dir - Directory of node with up to date data\n" +
254
+
clusteryaml - Path to a .yaml file containing the desired cluster configuration
255
+
256
+
257
+
Help:
258
+
Use this command when trying to preserve the data from your cluster while changing the
259
+
configuration of the cluster because e.g. your cluster is broken due to unreachablee nodes.
260
+
0. BACKUP ALL YOUR NODE DATA DIRECTORIES BEFORE PROCEEDING!
261
+
1. Stop all cowsql nodes.
262
+
2. Identify the dir of the node with the most up to date raft term and log, this will be the <dir> argument.
263
+
3. Create a .yaml file with the same format as cluster.yaml (or use/adapt an existing cluster.yaml) with the
264
+
desired cluster configuration. This will be the <clusteryaml> argument.
265
+
Don't forget to make sure the ID's in the file line up with the ID's in the info.yaml files.
266
+
4. Run the .reconfigure <dir> <clusteryaml> command, it should return "OK".
267
+
5. Copy the snapshot-xxx-xxx-xxx, snapshot-xxx-xxx-xxx.meta, segment files (00000xxxxx-000000xxxxx), desired cluster.yaml
268
+
from <dir> over to the directories of the other nodes identified in <clusteryaml>, deleting any leftover snapshot-xxx-xxx-xxx, snapshot-xxx-xxx-xxx.meta,
269
+
segment (00000xxxxx-000000xxxxx, open-xxx) and metadata{1,2} files that it contains.
270
+
Make sure an info.yaml is also present that is in line with cluster.yaml.
271
+
6. Start all the cowsql nodes.
272
+
7. If, for some reason, this fails or gives undesired results, try again with data from another node (you should still have this from step 0).
273
+
`
274
+
return"NOK", shellError(msg)
271
275
}
272
276
dir:=parts[1]
273
277
clusteryamlpath:=parts[2]
@@ -379,23 +383,8 @@ func (s *Shell) processQuery(ctx context.Context, line string) (string, error) {
0 commit comments