From 723c57faa30e102732aa29c8c4608703081970f3 Mon Sep 17 00:00:00 2001 From: Pranith K Date: Wed, 29 Sep 2010 05:08:34 +0000 Subject: mgmt/glusterd: resolve uuid if null Signed-off-by: Pranith Kumar K Signed-off-by: Vijay Bellur BUG: 1734 (replace brick should accept both ipaddress and hostname for bricks) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1734 --- xlators/mgmt/glusterd/src/glusterd-utils.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index cfa782e02..177322937 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -686,6 +686,11 @@ glusterd_brickinfo_get (char *brick, glusterd_volinfo_t *volinfo, ret = -1; list_for_each_entry (tmp, &volinfo->bricks, brick_list) { + if (uuid_is_null (tmp->uuid)) { + ret = glusterd_resolve_brick (tmp); + if (ret) + goto out; + } if ((!uuid_compare (uuid, tmp->uuid)) && !strcmp (tmp->path, path)) { gf_log ("", GF_LOG_NORMAL, "Found brick"); -- cgit