Skip to content

Commit df7854a

Browse files
authored
DAOS-18494 control: Don't use default sys in daos pool list (#17384)
Removed a case where we were still substituting the default system name in the daos pool list command. Signed-off-by: Kris Jacque <kris.jacque@hpe.com>
1 parent bb2329c commit df7854a

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/control/lib/daos/api/pool.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313
"github.com/google/uuid"
1414
"github.com/pkg/errors"
1515

16-
"github.com/daos-stack/daos/src/control/build"
1716
"github.com/daos-stack/daos/src/control/lib/daos"
1817
"github.com/daos-stack/daos/src/control/lib/ranklist"
1918
"github.com/daos-stack/daos/src/control/logging"
@@ -670,11 +669,11 @@ func GetPoolList(ctx context.Context, req GetPoolListReq) ([]*daos.PoolInfo, err
670669
log := logging.FromContext(ctx)
671670
log.Debugf("GetPoolList(%+v)", req)
672671

673-
if req.SysName == "" {
674-
req.SysName = build.DefaultSystemName
672+
var cSysName *C.char
673+
if req.SysName != "" {
674+
cSysName = C.CString(req.SysName)
675+
defer freeString(cSysName)
675676
}
676-
cSysName := C.CString(req.SysName)
677-
defer freeString(cSysName)
678677

679678
var cPools []C.daos_mgmt_pool_info_t
680679
for {

src/control/lib/daos/api/pool_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -955,11 +955,11 @@ func TestAPI_GetPoolList(t *testing.T) {
955955
ctx: test.Context(t),
956956
expPools: defaultPoolInfoResp,
957957
},
958-
"default system name supplied": {
958+
"empty system name supplied": {
959959
ctx: test.Context(t),
960960
req: GetPoolListReq{},
961961
checkParams: func(t *testing.T) {
962-
test.CmpAny(t, "sysName", build.DefaultSystemName, daos_mgmt_list_pools_SetSys)
962+
test.CmpAny(t, "sysName", "", daos_mgmt_list_pools_SetSys)
963963
},
964964
expPools: defaultPoolInfoResp,
965965
},

0 commit comments

Comments
 (0)