[shell] use constant for hdd of type (#6337)

use constant for hdd of type
This commit is contained in:
Konstantin Lebedev authored and GitHub committed 2024-12-10 08:43:59 -08:00
1 parent 4f6c989309
commit ff1392f7f4
5 files changed
+11 -7

No files matched your search

+2 -1
View File
@@ -4,6 +4,7 @@ import (
"context"
"flag"
"fmt"
"github.com/seaweedfs/seaweedfs/weed/storage/types"
"io"
"github.com/seaweedfs/seaweedfs/weed/cluster"
@@ -79,7 +80,7 @@ func (c *commandClusterCheck) Do(args []string, commandEnv *CommandEnv, writer i
if len(filers) > 0 {
genericDiskInfo, genericDiskInfoOk := topologyInfo.DiskInfos[""]
hddDiskInfo, hddDiskInfoOk := topologyInfo.DiskInfos["hdd"]
hddDiskInfo, hddDiskInfoOk := topologyInfo.DiskInfos[types.HddType]
if !genericDiskInfoOk && !hddDiskInfoOk {
return fmt.Errorf("filer metadata logs need generic or hdd disk type to be defined")