1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
$NetBSD: patch-db,v 1.1 2012/10/19 04:15:22 manu Exp $
Always enable DHT so that scaling from 1 brick to more does not raise
spurious EINVAL
From upstream http://review.gluster.org/3838
--- xlators/mgmt/glusterd/src/glusterd-volgen.c.orig
+++ xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -2362,7 +2362,6 @@ volgen_graph_build_dht_cluster (volgen_graph_t *graph,
char *decommissioned_children = NULL;
xlator_t *dht = NULL;
- GF_ASSERT (child_count > 1);
clusters = volgen_graph_build_clusters (graph, volinfo,
"cluster/distribute", "%s-dht",
child_count, child_count);
@@ -2455,12 +2454,16 @@ volume_volgen_graph_build_clusters (volgen_graph_t *graph,
build_distribute:
dist_count = volinfo->brick_count / volinfo->dist_leaf_count;
- if (dist_count > 1) {
- ret = volgen_graph_build_dht_cluster (graph, volinfo,
- dist_count);
- if (ret)
- goto out;
+ if (!dist_count) {
+ ret = -1;
+ goto out;
}
+
+ ret = volgen_graph_build_dht_cluster (graph, volinfo,
+ dist_count);
+ if (ret)
+ goto out;
+
ret = 0;
out:
return ret;
|