From f4480d6369098869a5a5f53a39ea0da7f152d227 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Mon, 22 Jul 2019 10:23:56 +0530 Subject: 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 --- libglusterfs/src/common-utils.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libglusterfs') 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; } } -- cgit