Skip to content

Commit

Permalink
follow-up
Browse files Browse the repository at this point in the history
* CLI: warn mountpath with no disks (and labels)
* CLI e2e: need to wait longer when cluster has a lot of data
* stats/target: fix error message typo

Signed-off-by: Alex Aizman <[email protected]>
  • Loading branch information
alex-aizman committed Aug 20, 2024
1 parent 88902b5 commit 3fdb3e6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
11 changes: 8 additions & 3 deletions cmd/cli/cli/disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/cli/storage_hdlr.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/test/mv_bucket.in
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion stats/target_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -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_

Expand Down

0 comments on commit 3fdb3e6

Please sign in to comment.