From a0ff84805e8ed3a510225770d9960375a220c21f Mon Sep 17 00:00:00 2001 From: Alexey Kostin Date: Tue, 19 Feb 2019 18:39:34 +0300 Subject: [PATCH] Deal with device class for root --- ceph-gobench.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ceph-gobench.go b/ceph-gobench.go index 9eadc4c..c83c05f 100644 --- a/ceph-gobench.go +++ b/ceph-gobench.go @@ -137,7 +137,7 @@ func GetOsdForLocations(params Params, osdcrushdump OsdCrushDump, osddump OsdDum } } else { for _, hostbucket := range bucketitems { - if strings.HasPrefix(hostbucket.Name, params.define) { + if strings.Split(hostbucket.Name, "~")[0] == strings.Split(params.define, "~")[0] { //purge device class for _, item := range hostbucket.Items { for _, device := range osdcrushdump.Devices { if device.ID == item.ID {