diff options
author | Kotresh HR <khiremat@redhat.com> | 2016-12-14 07:03:28 -0500 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2016-12-26 04:59:44 -0800 |
commit | 734da9d94566dbf37984b88df787569fd5209ee2 (patch) | |
tree | fe6c00f30ed5b10004998cbb9c05a50067aa3726 | |
parent | c20febcb1ffaef3fa29563987e7a3b554aea27b3 (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>
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-geo-rep.c | 14 |
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 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); |