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 /geo-replication/syncdaemon/argsupgrade.py | |
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 'geo-replication/syncdaemon/argsupgrade.py')
-rw-r--r-- | geo-replication/syncdaemon/argsupgrade.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/geo-replication/syncdaemon/argsupgrade.py b/geo-replication/syncdaemon/argsupgrade.py index a97c748c40b..d20f18ea84d 100644 --- a/geo-replication/syncdaemon/argsupgrade.py +++ b/geo-replication/syncdaemon/argsupgrade.py @@ -258,7 +258,9 @@ def upgrade(): p = ArgumentParser() p.add_argument("master") p.add_argument("slave") - p.add_argument("--config-set", nargs=2) + p.add_argument("--config-set", action='store_true') + p.add_argument("name") + p.add_argument("--value") p.add_argument("-c") pargs = p.parse_known_args(sys.argv[1:])[0] @@ -270,8 +272,8 @@ def upgrade(): "config-set", pargs.master.strip(":"), slave_url(pargs.slave), - pargs.config_set[0], - pargs.config_set[1] + "--name=%s" % pargs.name, + "--value=%s" % pargs.value ] elif "--config-check" in sys.argv: # --config-check georep_session_working_dir |