diff --git a/src/control/cmd/daos/pool.go b/src/control/cmd/daos/pool.go index 2aae717766e8..7a917b1a9e44 100644 --- a/src/control/cmd/daos/pool.go +++ b/src/control/cmd/daos/pool.go @@ -224,9 +224,8 @@ type poolCmd struct { type poolQueryCmd struct { poolBaseCmd - ShowEnabledRanks bool `short:"e" long:"show-enabled" description:"Show engine unique identifiers (ranks) which are enabled"` - ShowDisabledRanks bool `short:"b" long:"show-disabled" description:"Show engine unique identifiers (ranks) which are disabled"` - HealthOnly bool `short:"t" long:"health-only" description:"Only perform pool health related queries"` + ShowEnabledRanks bool `short:"e" long:"show-enabled" description:"Show engine unique identifiers (ranks) which are enabled"` + HealthOnly bool `short:"t" long:"health-only" description:"Only perform pool health related queries"` } func convertPoolSpaceInfo(in *C.struct_daos_pool_space, mt C.uint) *daos.StorageUsageStats { @@ -340,15 +339,10 @@ func (cmd *poolQueryCmd) Execute(_ []string) error { if cmd.HealthOnly { queryMask = daos.HealthOnlyPoolQueryMask } - if cmd.ShowEnabledRanks && cmd.ShowDisabledRanks { - return errors.New("show-enabled and show-disabled can't be used at the same time.") - } if cmd.ShowEnabledRanks { queryMask.SetOptions(daos.PoolQueryOptionEnabledEngines) } - if cmd.ShowDisabledRanks { - queryMask.SetOptions(daos.PoolQueryOptionDisabledEngines) - } + queryMask.SetOptions(daos.PoolQueryOptionDisabledEngines) cleanup, err := cmd.resolveAndConnect(C.DAOS_PC_RO, nil) if err != nil { diff --git a/src/control/cmd/daos/pretty/pool.go b/src/control/cmd/daos/pretty/pool.go index aa70115152df..a9f685b536f6 100644 --- a/src/control/cmd/daos/pretty/pool.go +++ b/src/control/cmd/daos/pretty/pool.go @@ -50,7 +50,7 @@ func PrintPoolInfo(pi *daos.PoolInfo, out io.Writer) error { if pi.EnabledRanks != nil && pi.EnabledRanks.Count() > 0 { fmt.Fprintf(w, "- Enabled ranks: %s\n", pi.EnabledRanks) } - if pi.DisabledRanks != nil && pi.DisabledRanks.Count() > 0 { + if pi.DisabledRanks.Count() > 0 { fmt.Fprintf(w, "- Disabled ranks: %s\n", pi.DisabledRanks) } if pi.Rebuild != nil { diff --git a/src/control/cmd/dmg/pool.go b/src/control/cmd/dmg/pool.go index d7d267fbbe3b..1127ab2b6f68 100644 --- a/src/control/cmd/dmg/pool.go +++ b/src/control/cmd/dmg/pool.go @@ -590,9 +590,8 @@ func (cmd *PoolReintegrateCmd) Execute(args []string) error { // PoolQueryCmd is the struct representing the command to query a DAOS pool. type PoolQueryCmd struct { poolCmd - ShowEnabledRanks bool `short:"e" long:"show-enabled" description:"Show engine unique identifiers (ranks) which are enabled"` - ShowDisabledRanks bool `short:"b" long:"show-disabled" description:"Show engine unique identifiers (ranks) which are disabled"` - HealthOnly bool `short:"t" long:"health-only" description:"Only perform pool health related queries"` + ShowEnabledRanks bool `short:"e" long:"show-enabled" description:"Show engine unique identifiers (ranks) which are enabled"` + HealthOnly bool `short:"t" long:"health-only" description:"Only perform pool health related queries"` } // Execute is run when PoolQueryCmd subcommand is activated @@ -608,9 +607,7 @@ func (cmd *PoolQueryCmd) Execute(args []string) error { if cmd.ShowEnabledRanks { req.QueryMask.SetOptions(daos.PoolQueryOptionEnabledEngines) } - if cmd.ShowDisabledRanks { - req.QueryMask.SetOptions(daos.PoolQueryOptionDisabledEngines) - } + req.QueryMask.SetOptions(daos.PoolQueryOptionDisabledEngines) resp, err := control.PoolQuery(cmd.MustLogCtx(), cmd.ctlInvoker, req) if cmd.JSONOutputEnabled() {