make admin obd deadline configurable (#3154)
This commit is contained in:
+7
-1
@@ -43,6 +43,12 @@ var adminOBDFlags = []cli.Flag{
|
||||
EnvVar: "MC_OBD_DATA",
|
||||
Hidden: true,
|
||||
},
|
||||
cli.DurationFlag{
|
||||
Name: "deadline",
|
||||
Usage: "maximum duration that OBD tests should be allowed to run",
|
||||
Value: 3600 * time.Second,
|
||||
EnvVar: "MC_OBD_DEADLINE",
|
||||
},
|
||||
}
|
||||
|
||||
var adminOBDCmd = cli.Command{
|
||||
@@ -253,7 +259,7 @@ func mainAdminOBD(ctx *cli.Context) error {
|
||||
}
|
||||
|
||||
// Fetch info of all servers (cluster or single server)
|
||||
obdChan := client.ServerOBDInfo(cont, options)
|
||||
obdChan := client.ServerOBDInfo(cont, options, ctx.Duration("deadline"))
|
||||
for adminOBDInfo := range obdChan {
|
||||
if adminOBDInfo.Error != "" {
|
||||
clusterOBDInfo.Status = "Error"
|
||||
|
||||
@@ -16,7 +16,7 @@ require (
|
||||
github.com/mattn/go-isatty v0.0.8
|
||||
github.com/mattn/go-runewidth v0.0.5 // indirect
|
||||
github.com/minio/cli v1.22.0
|
||||
github.com/minio/minio v0.0.0-20200410044517-3184205519cb
|
||||
github.com/minio/minio v0.0.0-20200414184832-ec11e99667e9
|
||||
github.com/minio/minio-go/v6 v6.0.52
|
||||
github.com/minio/sha256-simd v0.1.1
|
||||
github.com/mitchellh/go-homedir v1.1.0
|
||||
|
||||
Reference in New Issue
Block a user