@@ -255,7 +255,7 @@ func (cmd *PoolCreateCmd) Execute(args []string) error {
255
255
// TODO (DAOS-9556) Update the protocol with a new message allowing to perform the
256
256
// queries of storage request and the pool creation from the management server
257
257
scmBytes , nvmeBytes , err := control .GetMaxPoolSize (
258
- context . Background (),
258
+ cmd . MustLogCtx (),
259
259
cmd .Logger ,
260
260
cmd .ctlInvoker ,
261
261
ranklist .RankList (req .Ranks ))
@@ -375,7 +375,7 @@ func (cmd *PoolListCmd) Execute(_ []string) (errOut error) {
375
375
NoQuery : cmd .NoQuery ,
376
376
}
377
377
378
- resp , err := control .ListPools (context . Background (), cmd .ctlInvoker , req )
378
+ resp , err := control .ListPools (cmd . MustLogCtx (), cmd .ctlInvoker , req )
379
379
if err != nil {
380
380
return err // control api returned an error, disregard response
381
381
}
@@ -435,7 +435,7 @@ func (cmd *PoolDestroyCmd) Execute(args []string) error {
435
435
Recursive : cmd .Recursive ,
436
436
}
437
437
438
- err := control .PoolDestroy (context . Background (), cmd .ctlInvoker , req )
438
+ err := control .PoolDestroy (cmd . MustLogCtx (), cmd .ctlInvoker , req )
439
439
if err != nil {
440
440
msg = errors .WithMessage (err , "failed" ).Error ()
441
441
}
@@ -457,7 +457,7 @@ func (cmd *PoolEvictCmd) Execute(args []string) error {
457
457
458
458
req := & control.PoolEvictReq {ID : cmd .PoolID ().String ()}
459
459
460
- err := control .PoolEvict (context . Background (), cmd .ctlInvoker , req )
460
+ err := control .PoolEvict (cmd . MustLogCtx (), cmd .ctlInvoker , req )
461
461
if err != nil {
462
462
msg = errors .WithMessage (err , "failed" ).Error ()
463
463
}
@@ -485,7 +485,7 @@ func (cmd *PoolExcludeCmd) Execute(args []string) error {
485
485
486
486
req := & control.PoolExcludeReq {ID : cmd .PoolID ().String (), Rank : ranklist .Rank (cmd .Rank ), Targetidx : idxlist }
487
487
488
- err := control .PoolExclude (context . Background (), cmd .ctlInvoker , req )
488
+ err := control .PoolExclude (cmd . MustLogCtx (), cmd .ctlInvoker , req )
489
489
if err != nil {
490
490
msg = errors .WithMessage (err , "failed" ).Error ()
491
491
}
@@ -514,7 +514,7 @@ func (cmd *PoolDrainCmd) Execute(args []string) error {
514
514
515
515
req := & control.PoolDrainReq {ID : cmd .PoolID ().String (), Rank : ranklist .Rank (cmd .Rank ), Targetidx : idxlist }
516
516
517
- err := control .PoolDrain (context . Background (), cmd .ctlInvoker , req )
517
+ err := control .PoolDrain (cmd . MustLogCtx (), cmd .ctlInvoker , req )
518
518
if err != nil {
519
519
msg = errors .WithMessage (err , "failed" ).Error ()
520
520
}
@@ -539,7 +539,7 @@ func (cmd *PoolExtendCmd) Execute(args []string) error {
539
539
Ranks : cmd .RankList .Ranks (),
540
540
}
541
541
542
- err := control .PoolExtend (context . Background (), cmd .ctlInvoker , req )
542
+ err := control .PoolExtend (cmd . MustLogCtx (), cmd .ctlInvoker , req )
543
543
if err != nil {
544
544
msg = errors .WithMessage (err , "failed" ).Error ()
545
545
}
@@ -572,7 +572,7 @@ func (cmd *PoolReintegrateCmd) Execute(args []string) error {
572
572
Targetidx : idxlist ,
573
573
}
574
574
575
- err := control .PoolReintegrate (context . Background (), cmd .ctlInvoker , req )
575
+ err := control .PoolReintegrate (cmd . MustLogCtx (), cmd .ctlInvoker , req )
576
576
if err != nil {
577
577
msg = errors .WithMessage (err , "failed" ).Error ()
578
578
}
@@ -602,7 +602,7 @@ func (cmd *PoolQueryCmd) Execute(args []string) error {
602
602
req .IncludeEnabledRanks = cmd .ShowEnabledRanks
603
603
req .IncludeDisabledRanks = cmd .ShowDisabledRanks
604
604
605
- resp , err := control .PoolQuery (context . Background (), cmd .ctlInvoker , req )
605
+ resp , err := control .PoolQuery (cmd . MustLogCtx (), cmd .ctlInvoker , req )
606
606
607
607
if cmd .JSONOutputEnabled () {
608
608
return cmd .OutputJSON (resp , err )
@@ -642,7 +642,7 @@ func (cmd *PoolQueryTargetsCmd) Execute(args []string) error {
642
642
Targets : tgtsList ,
643
643
}
644
644
645
- resp , err := control .PoolQueryTargets (context . Background (), cmd .ctlInvoker , req )
645
+ resp , err := control .PoolQueryTargets (cmd . MustLogCtx (), cmd .ctlInvoker , req )
646
646
647
647
if cmd .JSONOutputEnabled () {
648
648
return cmd .OutputJSON (resp , err )
@@ -671,7 +671,7 @@ func (cmd *PoolUpgradeCmd) Execute(args []string) error {
671
671
ID : cmd .PoolID ().String (),
672
672
}
673
673
674
- err := control .PoolUpgrade (context . Background (), cmd .ctlInvoker , req )
674
+ err := control .PoolUpgrade (cmd . MustLogCtx (), cmd .ctlInvoker , req )
675
675
if err != nil {
676
676
return errors .Wrap (err , "pool upgrade failed" )
677
677
}
@@ -708,7 +708,7 @@ func (cmd *PoolSetPropCmd) Execute(_ []string) error {
708
708
Properties : cmd .Args .Props .ToSet ,
709
709
}
710
710
711
- err := control .PoolSetProp (context . Background (), cmd .ctlInvoker , req )
711
+ err := control .PoolSetProp (cmd . MustLogCtx (), cmd .ctlInvoker , req )
712
712
if cmd .JSONOutputEnabled () {
713
713
return cmd .OutputJSON (nil , err )
714
714
}
@@ -736,7 +736,7 @@ func (cmd *PoolGetPropCmd) Execute(_ []string) error {
736
736
Properties : cmd .Args .Props .ToGet ,
737
737
}
738
738
739
- resp , err := control .PoolGetProp (context . Background (), cmd .ctlInvoker , req )
739
+ resp , err := control .PoolGetProp (cmd . MustLogCtx (), cmd .ctlInvoker , req )
740
740
if cmd .JSONOutputEnabled () {
741
741
return cmd .OutputJSON (resp , err )
742
742
}
@@ -765,7 +765,7 @@ type PoolGetACLCmd struct {
765
765
func (cmd * PoolGetACLCmd ) Execute (args []string ) error {
766
766
req := & control.PoolGetACLReq {ID : cmd .PoolID ().String ()}
767
767
768
- resp , err := control .PoolGetACL (context . Background (), cmd .ctlInvoker , req )
768
+ resp , err := control .PoolGetACL (cmd . MustLogCtx (), cmd .ctlInvoker , req )
769
769
if cmd .JSONOutputEnabled () {
770
770
return cmd .OutputJSON (resp , err )
771
771
}
@@ -835,7 +835,7 @@ func (cmd *PoolOverwriteACLCmd) Execute(args []string) error {
835
835
ACL : acl ,
836
836
}
837
837
838
- resp , err := control .PoolOverwriteACL (context . Background (), cmd .ctlInvoker , req )
838
+ resp , err := control .PoolOverwriteACL (cmd . MustLogCtx (), cmd .ctlInvoker , req )
839
839
if cmd .JSONOutputEnabled () {
840
840
return cmd .OutputJSON (resp , err )
841
841
}
@@ -883,7 +883,7 @@ func (cmd *PoolUpdateACLCmd) Execute(args []string) error {
883
883
ACL : acl ,
884
884
}
885
885
886
- resp , err := control .PoolUpdateACL (context . Background (), cmd .ctlInvoker , req )
886
+ resp , err := control .PoolUpdateACL (cmd . MustLogCtx (), cmd .ctlInvoker , req )
887
887
if cmd .JSONOutputEnabled () {
888
888
return cmd .OutputJSON (resp , err )
889
889
}
@@ -913,7 +913,7 @@ func (cmd *PoolDeleteACLCmd) Execute(args []string) error {
913
913
Principal : cmd .Principal ,
914
914
}
915
915
916
- resp , err := control .PoolDeleteACL (context . Background (), cmd .ctlInvoker , req )
916
+ resp , err := control .PoolDeleteACL (cmd . MustLogCtx (), cmd .ctlInvoker , req )
917
917
if cmd .JSONOutputEnabled () {
918
918
return cmd .OutputJSON (resp , err )
919
919
}
0 commit comments