summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHari Gowtham <hgowtham@redhat.com>2015-11-03 18:23:56 +0530
committerDan Lambright <dlambrig@redhat.com>2015-11-04 10:55:06 -0800
commitace96bd16a462bda91b471a33296dbcf41375607 (patch)
treea30beefce99a79f60f4d4f557c6b8d19b16c61a9
parentc2c7a4e472ef737a2f3d8e97e4cd007442a5f5a2 (diff)
v info for disperse count fails while upgrading
back-port of : http://review.gluster.org/#/c/12495/ The upgrade from 3.7.5-3 to 3.7.5-5 causes the type and number of bricks for the cold tier to be printed wrong. >Change-Id: Ia45b97c35fef88f9c66e15e5bdb93fd30cb342af >BUG: 1277481 >Signed-off-by: Hari Gowtham <hgowtham@redhat.com> >Reviewed-on: http://review.gluster.org/12495 >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Dan Lambright <dlambrig@redhat.com> >Tested-by: Dan Lambright <dlambrig@redhat.com> Change-Id: Ic61dd1378c8efe37d797328719ba16e64ff76f55 BUG: 1277984 Signed-off-by: Hari Gowtham <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/12506 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index 44f137a3c04..02291b1f838 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -2767,10 +2767,18 @@ glusterd_store_update_volinfo (glusterd_volinfo_t *volinfo)
break;
case GF_CLUSTER_TYPE_TIER:
- volinfo->tier_info.cold_dist_leaf_count =
- glusterd_calc_dist_leaf_count (
- volinfo->tier_info.cold_replica_count, 1);
- break;
+ if (volinfo->tier_info.cold_type ==
+ GF_CLUSTER_TYPE_DISPERSE)
+ volinfo->tier_info.cold_dist_leaf_count
+ = volinfo->disperse_count;
+ else
+ volinfo->tier_info.cold_dist_leaf_count
+ = glusterd_calc_dist_leaf_count (
+ volinfo->tier_info.
+ cold_replica_count,
+ 1);
+
+ break;
default:
GF_ASSERT (0);