From c12fccc4732df63273e8d013fd471e1c8f3b7d22 Mon Sep 17 00:00:00 2001 From: Timothy Asir Date: Tue, 23 Apr 2013 12:30:35 +0530 Subject: cli: Add server uuid into volume brick info xml Add server uuid as an attribute to the existing brick details in the volume info cli xml output. Currently, when a node has more than one ip, the oVirt-engine fails to map the corresponding server using the ip alone. If we get the host uuid along with brick details in volume info command it will be easy for ovirt-engine to find out the server and thereby we can avoid confusion in finding the server. Change-Id: I3c9c9acea80e10e0b2977477759d9af045e48959 BUG: 955588 Signed-off-by: Timothy Asir Reviewed-on: http://review.gluster.org/4875 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- tests/bugs/bug-955588.t | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 tests/bugs/bug-955588.t (limited to 'tests/bugs') diff --git a/tests/bugs/bug-955588.t b/tests/bugs/bug-955588.t new file mode 100755 index 000000000..3f0361167 --- /dev/null +++ b/tests/bugs/bug-955588.t @@ -0,0 +1,27 @@ +#!/bin/bash + +. $(dirname $0)/../include.rc +. $(dirname $0)/../volume.rc + +cleanup; +TEST glusterd +TEST pidof glusterd + +function get_brick_host_uuid() +{ + local vol=$1; + local uuid_regex='[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}' + local host_uuid_list=$($CLI volume info $vol --xml | grep "brick.uuid" | grep -o -E "$uuid_regex"); + + echo $host_uuid_list | awk '{print $1}' +} + +TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{0,1} + +uuid=`grep UUID /var/lib/glusterd/glusterd.info | cut -f2 -d=` +EXPECT $uuid get_brick_host_uuid $V0 + +TEST $CLI volume delete $V0; +TEST ! $CLI volume info $V0; + +cleanup; -- cgit