From 20fb15dc02a4d1a4b38335a988c0c1abafee7355 Mon Sep 17 00:00:00 2001 From: Pranith K Date: Fri, 12 Nov 2010 04:01:01 +0000 Subject: mgmt/glusterd: "peer probe new-hostname" should replace old-hostname of friend Signed-off-by: Pranith Kumar K Signed-off-by: Anand V. Avati BUG: 1995 (Gluster Peer probe command keeps ip address instead of server name in the destination server) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1995 --- xlators/mgmt/glusterd/src/glusterd-store.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-store.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c index 4b989521974..aa63226a5aa 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.c +++ b/xlators/mgmt/glusterd/src/glusterd-store.c @@ -1312,8 +1312,6 @@ glusterd_store_update_peerinfo (glusterd_peerinfo_t *peerinfo) char filepath[PATH_MAX] = {0,}; char str[512] = {0,}; char buf[4096] = {0,}; - glusterd_peer_hostname_t *hname = NULL; - int i = 0; char hostname_path[PATH_MAX] = {0,}; @@ -1383,15 +1381,9 @@ glusterd_store_update_peerinfo (glusterd_peerinfo_t *peerinfo) if (ret) goto out; - list_for_each_entry (hname, &peerinfo->hostnames, hostname_list) { - i++; - snprintf (buf, sizeof (buf), "%s%d", - GLUSTERD_STORE_KEY_PEER_HOSTNAME, i); - ret = glusterd_store_save_value (peerinfo->shandle, - buf, hname->hostname); - if (ret) - goto out; - } + ret = glusterd_store_save_value (peerinfo->shandle, + GLUSTERD_STORE_KEY_PEER_HOSTNAME "1", + peerinfo->hostname); out: gf_log ("", GF_LOG_DEBUG, "Returning with %d", ret); -- cgit