mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 02:00:56 +00:00
fix(blobnode): only parse files with the .iostat suffix for blobnode iostat
Problem: error: invalid iostat file RootCause: there are unexpected files from other processes in directories /tmp/shm or /dev/shm . #1001088459 Signed-off-by: zhangjianwei2 <zhangjianwei2@cmss.chinamobile.com>
This commit is contained in:
parent
6d424e5ef5
commit
d5b0b72e81
@ -26,6 +26,7 @@ import (
|
||||
|
||||
"github.com/desertbit/grumble"
|
||||
|
||||
"github.com/cubefs/cubefs/blobstore/blobnode/base/flow"
|
||||
"github.com/cubefs/cubefs/blobstore/cli/common/fmt"
|
||||
"github.com/cubefs/cubefs/blobstore/common/iostat"
|
||||
)
|
||||
@ -158,6 +159,10 @@ func scanVDevices(dir string, filters []string) ([]*vdevice, error) {
|
||||
continue
|
||||
}
|
||||
|
||||
if !strings.HasSuffix(name, flow.IOStatFileSuffix) {
|
||||
continue
|
||||
}
|
||||
|
||||
dev, err := newVDevice(dir, name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Loading…
Reference in New Issue
Block a user