summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-08-14 04:36:47 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-08-15 11:28:40 -0700
commit2b8545f1a21efe5e9944bccdebdff49e22fb6e6b (patch)
tree2195f781bfaaf95cda486792645cf9675d5f2b2c /xlators/mgmt/glusterd
parentdd6c4b0e0db5fbe05a0c7927c780c96d5a97a966 (diff)
new option to volgen '--portmapper-mode'
* without which, it generates volume files in old fashioned way. * with portmapper mode, no port option is taken, and there will be one process per one export. * corresponding changes in 'mgmt/glusterd' is made Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1341 (glusterfs-volgen should behave differently for flag '--internal') URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1341
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c16
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c2
2 files changed, 10 insertions, 8 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 57ec659f999..b3d27efa0fb 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -287,10 +287,10 @@ glusterd_volume_create_generate_volfiles (glusterd_volinfo_t *volinfo)
case GF_CLUSTER_TYPE_REPLICATE:
{
snprintf (cmd_str, 8192,
- "glusterfs-volgen -n %s -c %s -r 1 %s -p %d "
- "--num-replica %d",
- volinfo->volname, path, bricks,
- volinfo->port, volinfo->sub_count);
+ "glusterfs-volgen --portmapper-mode -n %s "
+ " -c %s -r 1 %s -p %d --num-replica %d",
+ volinfo->volname, path, bricks,
+ volinfo->port, volinfo->sub_count);
ret = system (cmd_str);
break;
}
@@ -298,8 +298,8 @@ glusterd_volume_create_generate_volfiles (glusterd_volinfo_t *volinfo)
case GF_CLUSTER_TYPE_STRIPE:
{
snprintf (cmd_str, 8192,
- "glusterfs-volgen -n %s -c %s -r 0 %s -p %d "
- "--num-stripe %d",
+ "glusterfs-volgen --portmapper-mode -n %s "
+ " -c %s -r 0 %s -p %d --num-stripe %d",
volinfo->volname, path, bricks,
volinfo->port, volinfo->sub_count);
ret = system (cmd_str);
@@ -309,9 +309,11 @@ glusterd_volume_create_generate_volfiles (glusterd_volinfo_t *volinfo)
case GF_CLUSTER_TYPE_NONE:
{
snprintf (cmd_str, 8192,
- "glusterfs-volgen -n %s -c %s %s -p %d",
+ "glusterfs-volgen --portmapper-mode -n %s "
+ " -c %s %s -p %d",
volinfo->volname, path, bricks,
volinfo->port);
+ gf_log ("", 1, "%s", cmd_str);
ret = system (cmd_str);
break;
}
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index c135e75264f..81c6cb2f4e4 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -754,7 +754,7 @@ glusterd_volume_start_glusterfs (glusterd_volinfo_t *volinfo,
brickinfo->hostname, volinfo->volname, count);
snprintf (cmd_str, 8192,
- "glusterfs --xlator-option server-tcp.listen-port=%d -f %s -p %s",
+ "glusterfs --xlator-option server-*.listen-port=%d -f %s -p %s",
port, volfile, pidfile);
ret = system (cmd_str);