diff options
author | Amar Tumballi <amarts@redhat.com> | 2019-07-22 10:23:56 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2019-07-23 03:21:37 +0000 |
commit | f4480d6369098869a5a5f53a39ea0da7f152d227 (patch) | |
tree | 16d5c2f5f355b6b1129a98823f30009636d4c3f3 /libglusterfs | |
parent | 8f7112264f76306a12eb29fffc458ef4f657689e (diff) |
backup-volfile-server: ignore duplicate entries
Erroring out for duplicate entries for backup_volfile_servers would
cause failures for some script. This option is harmless if it is
duplicate, we just need to ignore this.
Fixes: bz#1730953
Change-Id: I950064501a7bb61b90e99f2c079564f9c923d4c1
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r-- | libglusterfs/src/common-utils.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c index 132e63e520a..df30507e3ae 100644 --- a/libglusterfs/src/common-utils.c +++ b/libglusterfs/src/common-utils.c @@ -3787,8 +3787,10 @@ gf_set_volfile_server_common(cmd_args_t *cmd_args, const char *host, if ((!strcmp(tmp->volfile_server, server->volfile_server) && !strcmp(tmp->transport, server->transport) && (tmp->port == server->port))) { - errno = EEXIST; - ret = -1; + /* Duplicate option given, log and ignore */ + gf_msg("gluster", GF_LOG_INFO, EEXIST, LG_MSG_INVALID_ENTRY, + "duplicate entry for volfile-server"); + ret = 0; goto out; } } |