From 734da9d94566dbf37984b88df787569fd5209ee2 Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Wed, 14 Dec 2016 07:03:28 -0500 Subject: 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 Reviewed-on: http://review.gluster.org/16132 Smoke: Gluster Build System CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Aravinda VK Reviewed-by: Atin Mukherjee --- xlators/mgmt/glusterd/src/glusterd-geo-rep.c | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'xlators') diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c index 8d11d95d915..eed4070859a 100644 --- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c +++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c @@ -3428,7 +3428,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; @@ -3443,7 +3442,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; @@ -3690,16 +3688,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; @@ -3747,8 +3735,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); -- cgit