diff --git a/cmd/cli/cli/disk.go b/cmd/cli/cli/disk.go index 5c775b068b8..4109644b373 100644 --- a/cmd/cli/cli/disk.go +++ b/cmd/cli/cli/disk.go @@ -19,6 +19,7 @@ import ( "github.com/NVIDIA/aistore/fs" "github.com/NVIDIA/aistore/ios" jsoniter "github.com/json-iterator/go" + "github.com/urfave/cli" "golang.org/x/sync/errgroup" ) @@ -60,7 +61,7 @@ func (ctx *dstatsCtx) get() error { return nil } -func getDiskStats(smap *meta.Smap, tid string) (_ []*teb.DiskStatsHelper, withCap bool, err error) { +func getDiskStats(c *cli.Context, smap *meta.Smap, tid string) (_ []*teb.DiskStatsHelper, withCap bool, err error) { var ( targets = smap.Tmap l = smap.CountActiveTs() @@ -97,9 +98,13 @@ func getDiskStats(smap *meta.Smap, tid string) (_ []*teb.DiskStatsHelper, withCa for name, stat := range res.stats { ds := &teb.DiskStatsHelper{TargetID: res.tid, DiskName: name, Stat: stat} if res.tcdf != nil { - for _, mi := range res.tcdf.Mountpaths { + for mpath, mi := range res.tcdf.Mountpaths { // TODO: multi-disk mountpath - if mi.Disks[0] == ds.DiskName { + if len(mi.Disks) == 0 { + if mi.Label.IsNil() { + actionWarn(c, "mountpath "+mpath+" has no disks") + } + } else if mi.Disks[0] == ds.DiskName { ds.Tcdf = res.tcdf withCap = true } diff --git a/cmd/cli/cli/storage_hdlr.go b/cmd/cli/cli/storage_hdlr.go index 273228217da..6dc4c3c12c8 100644 --- a/cmd/cli/cli/storage_hdlr.go +++ b/cmd/cli/cli/storage_hdlr.go @@ -305,7 +305,7 @@ func showDiskStats(c *cli.Context, tid string) error { } } - dsh, withCap, err := getDiskStats(smap, tid) + dsh, withCap, err := getDiskStats(c, smap, tid) if err != nil { return err } diff --git a/cmd/cli/test/mv_bucket.in b/cmd/cli/test/mv_bucket.in index 878a089b911..e07f71d3c89 100644 --- a/cmd/cli/test/mv_bucket.in +++ b/cmd/cli/test/mv_bucket.in @@ -1,6 +1,6 @@ ais wait rebalance // IGNORE ais archive gen-shards "ais://$BUCKET_1/tmp/shard-{0..9}.tar" --fcount 1 --fsize 1KB --conc 1 --cleanup // IGNORE -ais bucket mv ais://$BUCKET_1/ ais://$BUCKET_2/ --wait +ais bucket mv ais://$BUCKET_1/ ais://$BUCKET_2/ --wait --timeout 3m ais bucket mv ais://$BUCKET_2/ ais://$BUCKET_1/ ais archive gen-shards "ais://$BUCKET_3/tmp/shard-{0..9}.tar" --fcount 1 --fsize 1KB --conc 1 --cleanup // IGNORE ais bucket mv ais://$BUCKET_1/ ais://$BUCKET_3/ // FAIL "bucket "ais://$BUCKET_3" already exists" diff --git a/stats/target_stats.go b/stats/target_stats.go index 60b51eccd00..3070c48dd5a 100644 --- a/stats/target_stats.go +++ b/stats/target_stats.go @@ -534,7 +534,7 @@ func (r *Trunner) _fshcMaybe(config *cmn.Config) { return } - err := fmt.Errorf("## IO errors (%d) exceeded configured limit: (%d during %v)", d, c.IOErrTime, c.IOErrs) + err := fmt.Errorf("## IO errors (%d) exceeded configured limit, which is: (no more than %d in %v)", d, c.IOErrs, c.IOErrTime) nlog.Errorln(err) nlog.Warningln("waking up FSHC to check all mountpaths...") // _all_