summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-op-sm.c
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-08-21 01:53:42 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-08-21 05:17:32 -0700
commitad0e7a86c256b6e49daddafd954809b6040804b2 (patch)
tree058a454d2944376b1091fa9b8e772f98d74c6a61 /xlators/mgmt/glusterd/src/glusterd-op-sm.c
parentdaf868e13511d97492ca4ece5fe60a2a4f69a20f (diff)
glusterd: prefix added to gluster commands
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1283 ([3.1.0qa3] gluster volume create and volume start fail on when glusterfs is installed on prefixed path) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1283
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 2419fa3b916..d24a4f15994 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -290,34 +290,36 @@ glusterd_volume_create_generate_volfiles (glusterd_volinfo_t *volinfo)
case GF_CLUSTER_TYPE_REPLICATE:
{
snprintf (cmd_str, 8192,
- "glusterfs-volgen --portmapper-mode -n %s "
+ "%s/bin/glusterfs-volgen --portmapper-mode -n %s "
" -c %s -r 1 %s -p %d --num-replica %d",
- volinfo->volname, path, bricks,
+ GFS_PREFIX, volinfo->volname, path, bricks,
volinfo->port, volinfo->sub_count);
ret = system (cmd_str);
+ gf_log ("", 1, "%s", cmd_str);
break;
}
case GF_CLUSTER_TYPE_STRIPE:
{
snprintf (cmd_str, 8192,
- "glusterfs-volgen --portmapper-mode -n %s "
+ "%s/bin/glusterfs-volgen --portmapper-mode -n %s "
" -c %s -r 0 %s -p %d --num-stripe %d",
- volinfo->volname, path, bricks,
+ GFS_PREFIX, volinfo->volname, path, bricks,
volinfo->port, volinfo->sub_count);
ret = system (cmd_str);
+ gf_log ("", 1, "%s", cmd_str);
break;
}
case GF_CLUSTER_TYPE_NONE:
{
snprintf (cmd_str, 8192,
- "glusterfs-volgen --portmapper-mode -n %s "
- " -c %s %s -p %d",
- volinfo->volname, path, bricks,
+ "%s/bin/glusterfs-volgen --portmapper-mode "
+ " -n %s -c %s %s -p %d",
+ GFS_PREFIX, volinfo->volname, path, bricks,
volinfo->port);
- gf_log ("", 1, "%s", cmd_str);
ret = system (cmd_str);
+ gf_log ("", 1, "%s", cmd_str);
break;
}
@@ -1004,8 +1006,9 @@ rb_spawn_dst_brick (glusterd_volinfo_t *volinfo,
priv = THIS->private;
- snprintf (cmd_str, 8192, "glusterfs -f %s/vols/%s/%s -p %s/vols/%s/%s",
- priv->workdir, volinfo->volname,
+ snprintf (cmd_str, 8192,
+ "%s/sbin/glusterfs -f %s/vols/%s/%s -p %s/vols/%s/%s",
+ GFS_PREFIX, priv->workdir, volinfo->volname,
RB_DSTBRICKVOL_FILENAME,
priv->workdir, volinfo->volname,
RB_DSTBRICK_PIDFILE);
@@ -1038,8 +1041,9 @@ rb_spawn_glusterfs_client (glusterd_volinfo_t *volinfo,
priv = THIS->private;
- snprintf (cmd_str, 4096, "glusterfs -f %s/vols/%s/%s %s/vols/%s/%s",
- priv->workdir, volinfo->volname,
+ snprintf (cmd_str, 4096,
+ "%s/sbin/glusterfs -f %s/vols/%s/%s %s/vols/%s/%s",
+ GFS_PREFIX, priv->workdir, volinfo->volname,
RB_CLIENTVOL_FILENAME,
priv->workdir, volinfo->volname,
RB_CLIENT_MOUNTPOINT);