summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2016-12-14 07:03:28 -0500
committerNiels de Vos <ndevos@redhat.com>2017-01-08 03:00:57 -0800
commit11008e8b2a81a9b23d7a98e82db7a0ce0d9dbafb (patch)
tree7aee763cd871fe69b5fac17c98ab4f075194f3d8
parent303ae314787ee2d5e5f2fadf8576b87f9c0fb0bf (diff)
glusterd/geo-rep: Fix geo-rep config issue
Problem: Geo-replication config commands fail when geo-rep status is in 'Created'. Cause: During staging phase of geo-rep config, it checks for the existence of 'monitor.pid' file. But the pid file gets created only on start of geo-rep. Hence it fails. Fix: Do not check for the existence of pid-file during staging for config commands. It is not required. > Change-Id: I626d368b249cf0423c7f49b4284465508371f566 > BUG: 1404678 > Signed-off-by: Kotresh HR <khiremat@redhat.com> > Reviewed-on: http://review.gluster.org/16132 > Smoke: Gluster Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Aravinda VK <avishwan@redhat.com> > Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Change-Id: I626d368b249cf0423c7f49b4284465508371f566 BUG: 1410699 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/16342 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-geo-rep.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
index 7d990a07376..66f26fc5256 100644
--- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
+++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
@@ -3422,7 +3422,6 @@ glusterd_op_stage_gsync_set (dict_t *dict, char **op_errstr)
{
int ret = 0;
int type = 0;
- int pfd = -1;
char *volname = NULL;
char *slave = NULL;
char *slave_url = NULL;
@@ -3437,7 +3436,6 @@ glusterd_op_stage_gsync_set (dict_t *dict, char **op_errstr)
gf_boolean_t exists = _gf_false;
glusterd_volinfo_t *volinfo = NULL;
char errmsg[PATH_MAX] = {0,};
- char pidfile[PATH_MAX] = {0,};
dict_t *ctx = NULL;
gf_boolean_t is_force = 0;
gf_boolean_t is_running = _gf_false;
@@ -3684,16 +3682,6 @@ glusterd_op_stage_gsync_set (dict_t *dict, char **op_errstr)
goto out;
}
- pfd = gsyncd_getpidfile (volname, slave, pidfile,
- conf_path, &is_template_in_use);
- if (is_template_in_use || pfd == -1) {
- snprintf (errmsg, sizeof(errmsg), "pid-file entry "
- "missing in the config file(%s).",
- conf_path);
- ret = -1;
- goto out;
- }
-
ret = gsync_verify_config_options (dict, op_errstr, volname);
goto out;
break;
@@ -3741,8 +3729,6 @@ glusterd_op_stage_gsync_set (dict_t *dict, char **op_errstr)
}
out:
- if (pfd != -1)
- sys_close (pfd);
if (path_list)
GF_FREE (path_list);