diff options
author | Kotresh HR <khiremat@redhat.com> | 2018-09-14 03:42:26 -0400 |
---|---|---|
committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2018-09-21 13:25:43 +0000 |
commit | e50a6ee2c913b5b4df53f0efca4de66c5262d1e1 (patch) | |
tree | a949c7c9241bd5beedeb3d0ee0478e2af77b4b63 /xlators | |
parent | 72514f20d2ae947529cd1c4b4b009f27bae7032a (diff) |
geo-rep: Fix issues related config set
1. '--ignore-mising-args' option for rsync is not
being used even though the rsync version is
greater than 3.1.0. Fixed the same.
2. '--existing' option for rsync is also not being
used. Fixed the same.
3. geo-rep config fails to set rsync-options as the
value contains '--'. Interestingly, python argsparse
treats the value with '--' (e.g., --ignore-missing-args)
as option. But when passed with something like
--value=--ignore-missing-args, it succeeds. Fixed the
same.
Backport of:
> Patch: https://review.gluster.org/21191
> Change-Id: Iaeb838acaff1c2920fee9c7f920c99edce13a0a1
> Signed-off-by: Kotresh HR <khiremat@redhat.com>
> BUG: 1629561
Change-Id: Iaeb838acaff1c2920fee9c7f920c99edce13a0a1
Signed-off-by: Kotresh HR <khiremat@redhat.com>
fixes: bz#1630140
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-geo-rep.c | 5 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c index 688b995f0e1..51d4da5d738 100644 --- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c +++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c @@ -4185,8 +4185,9 @@ glusterd_gsync_configure (glusterd_volinfo_t *volinfo, char *slave, runner_add_arg (&runner, slave); runner_argprintf (&runner, "--config-%s", subop); runner_add_arg (&runner, op_name); - if (op_value) - runner_add_arg (&runner, op_value); + if (op_value) { + runner_argprintf (&runner, "--value=%s", op_value); + } if ( strcmp(op_name,"checkpoint") != 0 && strtail (subop, "set")) { ret = glusterd_gsync_op_already_set(master,slave,conf_path, diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index ad337251b27..a1fd62da078 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -7943,8 +7943,8 @@ glusterd_start_gsync (glusterd_volinfo_t *master_vol, char *slave, path_list, "-c", NULL); runner_argprintf (&runner, "%s", conf_path); runner_argprintf (&runner, ":%s", master_vol->volname); - runner_add_args (&runner, slave, "--config-set", "session-owner", - uuid_str, NULL); + runner_add_args (&runner, slave, "--config-set", "session-owner", NULL); + runner_argprintf (&runner, "--value=%s", uuid_str); synclock_unlock (&priv->big_lock); ret = runner_run (&runner); synclock_lock (&priv->big_lock); |