summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-utils.c
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2014-06-04 12:30:44 +0000
committerVenky Shankar <vshankar@redhat.com>2014-06-12 05:48:54 -0700
commit1f21201a434dd37b621efd3cc5d2ef1fd077c303 (patch)
tree138ebbea13840f091450f35bdc8dc39f1035dcfd /xlators/mgmt/glusterd/src/glusterd-utils.c
parent665366a72b720d2eee61aba8b3108e12747db767 (diff)
glusterd/geo-rep: Create the conf file path correctly
In case of mount brocker, the conf file path needs to be correctly created, and then fetch the status file Change-Id: Iaa1b04ee46f10961a7056e834170d68282c36efa BUG: 1104649 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/7977 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kotresh HR <khiremat@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 94949e79111..d79ff249535 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -6716,7 +6716,7 @@ _local_gsyncd_start (dict_t *this, char *key, data_t *value, void *data)
{
char *path_list = NULL;
char *slave = NULL;
- char *slave_ip = NULL;
+ char *slave_url = NULL;
char *slave_vol = NULL;
char *slave_host = NULL;
char *statefile = NULL;
@@ -6751,7 +6751,7 @@ _local_gsyncd_start (dict_t *this, char *key, data_t *value, void *data)
ret = glusterd_get_local_brickpaths (volinfo, &path_list);
/*Generating the conf file path needed by gsyncd */
- ret = glusterd_get_slave_info (slave, &slave_ip, &slave_host,
+ ret = glusterd_get_slave_info (slave, &slave_url, &slave_host,
&slave_vol, &op_errstr);
if (ret) {
gf_log ("", GF_LOG_ERROR,
@@ -6763,7 +6763,7 @@ _local_gsyncd_start (dict_t *this, char *key, data_t *value, void *data)
ret = snprintf (confpath, sizeof(confpath) - 1,
"%s/"GEOREP"/%s_%s_%s/gsyncd.conf",
priv->workdir, volinfo->volname,
- slave_ip, slave_vol);
+ slave_host, slave_vol);
confpath[ret] = '\0';
/* Fetching the last status of the node */
@@ -6822,7 +6822,7 @@ _local_gsyncd_start (dict_t *this, char *key, data_t *value, void *data)
gf_log ("", GF_LOG_INFO,
"Geo-Rep Session was not started between "
"%s and %s::%s. Not Restarting", volinfo->volname,
- slave_ip, slave_vol);
+ slave_url, slave_vol);
goto out;
} else if (strstr(buf, "Paused")) {
is_paused = _gf_true;
@@ -6832,7 +6832,7 @@ _local_gsyncd_start (dict_t *this, char *key, data_t *value, void *data)
"Not Restarting. Use start (force) to "
"start the session between %s and %s::%s.",
volinfo->volname,
- slave_ip, slave_vol);
+ slave_url, slave_vol);
goto out;
}
@@ -6849,7 +6849,7 @@ out:
if (is_template_in_use) {
ret = glusterd_create_status_file (volinfo->volname, slave,
- slave_ip, slave_vol,
+ slave_host, slave_vol,
"Config Corrupted");
if (ret) {
gf_log ("", GF_LOG_ERROR,